Opal-Estate-Pro/node_modules/browser-sync-ui/public/js/app.js.map
2019-09-13 09:44:33 +07:00

1 line
3.2 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"sources":["webpack:///js/app.js","webpack:///webpack/bootstrap dbdfcc42c882e3972c4b","webpack:///./app.js","webpack:////Users/shakyshane/Sites/oss/UI/~/angular/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/angular/angular.js","webpack:////Users/shakyshane/Sites/oss/UI/~/angular-route/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/angular-route/angular-route.js","webpack:////Users/shakyshane/Sites/oss/UI/~/angular-sanitize/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/angular-sanitize/angular-sanitize.js","webpack:////Users/shakyshane/Sites/oss/UI/~/angular-touch/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/angular-touch/angular-touch.js","webpack:///./modules/bsDisconnect.js","webpack:///./angular.js","webpack:///./modules/bsNotify.js","webpack:///./modules/bsHistory.js","webpack:///./modules/bsClients.js","webpack:///./modules/bsSocket.js","webpack:////Users/shakyshane/Sites/oss/UI/~/socket.io-client/lib/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/socket.io-client/lib/url.js","webpack:////Users/shakyshane/Sites/oss/UI/~/socket.io-client/~/parseuri/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/socket.io-client/~/debug/src/browser.js","webpack:////Users/shakyshane/Sites/oss/UI/~/process/browser.js","webpack:////Users/shakyshane/Sites/oss/UI/~/socket.io-client/~/debug/src/debug.js","webpack:////Users/shakyshane/Sites/oss/UI/~/socket.io-client/~/ms/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/socket.io-client/~/socket.io-parser/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/component-emitter/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/has-binary2/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/has-binary2/~/isarray/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/socket.io-client/~/socket.io-parser/binary.js","webpack:////Users/shakyshane/Sites/oss/UI/~/socket.io-client/~/isarray/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/socket.io-client/~/socket.io-parser/is-buffer.js","webpack:////Users/shakyshane/Sites/oss/UI/~/socket.io-client/lib/manager.js","webpack:////Users/shakyshane/Sites/oss/UI/~/engine.io-client/lib/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/engine.io-client/lib/socket.js","webpack:////Users/shakyshane/Sites/oss/UI/~/engine.io-client/lib/transports/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/engine.io-client/lib/xmlhttprequest.js","webpack:////Users/shakyshane/Sites/oss/UI/~/has-cors/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/engine.io-client/lib/transports/polling-xhr.js","webpack:////Users/shakyshane/Sites/oss/UI/~/engine.io-client/lib/transports/polling.js","webpack:////Users/shakyshane/Sites/oss/UI/~/engine.io-client/lib/transport.js","webpack:////Users/shakyshane/Sites/oss/UI/~/engine.io-client/~/engine.io-parser/lib/browser.js","webpack:////Users/shakyshane/Sites/oss/UI/~/engine.io-client/~/engine.io-parser/lib/keys.js","webpack:////Users/shakyshane/Sites/oss/UI/~/arraybuffer.slice/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/engine.io-client/~/after/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/engine.io-client/~/engine.io-parser/lib/utf8.js","webpack:///(webpack)/buildin/module.js","webpack:////Users/shakyshane/Sites/oss/UI/~/base64-arraybuffer/lib/base64-arraybuffer.js","webpack:////Users/shakyshane/Sites/oss/UI/~/blob/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/parseqs/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/component-inherit/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/yeast/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/engine.io-client/~/debug/src/browser.js","webpack:////Users/shakyshane/Sites/oss/UI/~/engine.io-client/~/debug/src/debug.js","webpack:////Users/shakyshane/Sites/oss/UI/~/engine.io-client/~/ms/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/engine.io-client/lib/transports/polling-jsonp.js","webpack:////Users/shakyshane/Sites/oss/UI/~/engine.io-client/lib/transports/websocket.js","webpack:////Users/shakyshane/Sites/oss/UI/~/indexof/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/engine.io-client/~/parseuri/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/socket.io-client/lib/socket.js","webpack:////Users/shakyshane/Sites/oss/UI/~/to-array/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/socket.io-client/lib/on.js","webpack:////Users/shakyshane/Sites/oss/UI/~/component-bind/index.js","webpack:////Users/shakyshane/Sites/oss/UI/~/backo2/index.js","webpack:///./services/Pages.js","webpack:///./module.js","webpack:///./services/Options.js","webpack:///./modules/bsStore.js","webpack:////Users/shakyshane/Sites/oss/UI/~/store/store.js","webpack:////Users/shakyshane/Sites/oss/UI/~/object-path/index.js","webpack:///./main/controller.js","webpack:///./filters.js","webpack:///./utils.js","webpack:///./directives.js","webpack:///./directives/icon.js","webpack:///./directives/link-to.js","webpack:///./directives/switch.js","webpack:///./directives/new-tab.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","Config","$locationProvider","html5Mode","enabled","requireBase","angular","window","config","document","undefined","minErr","ErrorConstructor","Error","paramPrefix","i","SKIP_INDEXES","templateArgs","arguments","code","message","template","replace","match","index","slice","shiftedIndex","length","toDebugString","encodeURIComponent","isArrayLike","obj","isWindow","isArray","isString","jqLite","Object","isNumber","Array","item","forEach","iterator","context","key","isFunction","hasOwnProperty","isPrimitive","isBlankObject","forEachSorted","keys","sort","reverseParams","iteratorFn","value","nextUid","uid","setHashKey","h","$$hashKey","baseExtend","dst","objs","deep","ii","isObject","j","jj","src","isDate","Date","valueOf","isRegExp","RegExp","nodeName","cloneNode","isElement","clone","extend","merge","toInt","str","parseInt","inherit","parent","extra","create","noop","identity","$","valueFn","hasCustomToString","toString","isUndefined","isDefined","getPrototypeOf","isScope","$evalAsync","$watch","isFile","isFormData","isBlob","isBoolean","isPromiseLike","then","isTypedArray","TYPED_ARRAY_REGEXP","test","node","prop","attr","find","makeMap","items","split","nodeName_","element","lowercase","arrayRemove","array","indexOf","splice","copy","source","destination","copyRecurse","push","copyElement","stackSource","stackDest","ngMinErr","needsRecurse","constructor","getTime","lastIndex","type","shallowCopy","charAt","equals","o1","o2","keySet","t1","t2","createMap","concat","array1","array2","sliceArgs","args","startIndex","bind","self","fn","curryArgs","apply","toJsonReplacer","val","toJson","pretty","JSON","stringify","fromJson","json","parse","timezoneToOffset","timezone","fallback","ALL_COLONS","requestedTimezoneOffset","isNaN","addDateMinutes","date","minutes","setMinutes","getMinutes","convertTimezoneToLocal","reverse","dateTimezoneOffset","getTimezoneOffset","timezoneOffset","startingTag","empty","e","elemHtml","append","html","nodeType","NODE_TYPE_TEXT","tryDecodeURIComponent","decodeURIComponent","parseKeyValue","keyValue","splitPoint","substring","toKeyValue","parts","arrayValue","encodeUriQuery","join","encodeUriSegment","pctEncodeSpaces","getNgAttribute","ngAttr","ngAttrPrefixes","getAttribute","angularInit","bootstrap","appElement","prefix","name","hasAttribute","candidate","querySelector","strictDi","defaultConfig","doBootstrap","injector","tag","unshift","$provide","debugInfoEnabled","$compileProvider","createInjector","invoke","scope","compile","$apply","data","NG_ENABLE_DEBUG_INFO","NG_DEFER_BOOTSTRAP","resumeBootstrap","extraModules","resumeDeferredBootstrap","reloadWithDebugInfo","location","reload","getTestability","rootElement","get","snake_case","separator","SNAKE_CASE_REGEXP","letter","pos","toLowerCase","bindJQuery","originalCleanData","bindJQueryFired","jqName","jq","jQuery","on","JQLitePrototype","isolateScope","controller","inheritedData","cleanData","elems","events","skipDestroyOnNextJQueryCleanData","elem","_data","$destroy","triggerHandler","JQLite","assertArg","arg","reason","assertArgFn","acceptArrayAnnotation","assertNotHasOwnProperty","getter","path","bindFnToScope","lastInstance","len","getBlockNodes","nodes","blockNodes","endNode","nextSibling","setupModuleLoader","ensure","factory","$injectorMinErr","$$minErr","requires","configFn","invokeLater","provider","method","insertMethod","queue","invokeQueue","moduleInstance","invokeLaterAndSetModuleName","recipeName","factoryFunction","$$moduleName","configBlocks","runBlocks","_invokeQueue","_configBlocks","_runBlocks","service","constant","decorator","animation","filter","directive","run","block","this","serializeObject","seen","publishExternalAPI","version","uppercase","callbacks","counter","$$csp","csp","angularModule","$$sanitizeUri","$$SanitizeUriProvider","$CompileProvider","a","htmlAnchorDirective","input","inputDirective","textarea","form","formDirective","script","scriptDirective","select","selectDirective","style","styleDirective","option","optionDirective","ngBind","ngBindDirective","ngBindHtml","ngBindHtmlDirective","ngBindTemplate","ngBindTemplateDirective","ngClass","ngClassDirective","ngClassEven","ngClassEvenDirective","ngClassOdd","ngClassOddDirective","ngCloak","ngCloakDirective","ngController","ngControllerDirective","ngForm","ngFormDirective","ngHide","ngHideDirective","ngIf","ngIfDirective","ngInclude","ngIncludeDirective","ngInit","ngInitDirective","ngNonBindable","ngNonBindableDirective","ngPluralize","ngPluralizeDirective","ngRepeat","ngRepeatDirective","ngShow","ngShowDirective","ngStyle","ngStyleDirective","ngSwitch","ngSwitchDirective","ngSwitchWhen","ngSwitchWhenDirective","ngSwitchDefault","ngSwitchDefaultDirective","ngOptions","ngOptionsDirective","ngTransclude","ngTranscludeDirective","ngModel","ngModelDirective","ngList","ngListDirective","ngChange","ngChangeDirective","pattern","patternDirective","ngPattern","required","requiredDirective","ngRequired","minlength","minlengthDirective","ngMinlength","maxlength","maxlengthDirective","ngMaxlength","ngValue","ngValueDirective","ngModelOptions","ngModelOptionsDirective","ngIncludeFillContentDirective","ngAttributeAliasDirectives","ngEventDirectives","$anchorScroll","$AnchorScrollProvider","$animate","$AnimateProvider","$animateCss","$CoreAnimateCssProvider","$$animateJs","$$CoreAnimateJsProvider","$$animateQueue","$$CoreAnimateQueueProvider","$$AnimateRunner","$$AnimateRunnerFactoryProvider","$$animateAsyncRun","$$AnimateAsyncRunFactoryProvider","$browser","$BrowserProvider","$cacheFactory","$CacheFactoryProvider","$controller","$ControllerProvider","$document","$DocumentProvider","$exceptionHandler","$ExceptionHandlerProvider","$filter","$FilterProvider","$$forceReflow","$$ForceReflowProvider","$interpolate","$InterpolateProvider","$interval","$IntervalProvider","$http","$HttpProvider","$httpParamSerializer","$HttpParamSerializerProvider","$httpParamSerializerJQLike","$HttpParamSerializerJQLikeProvider","$httpBackend","$HttpBackendProvider","$xhrFactory","$xhrFactoryProvider","$location","$LocationProvider","$log","$LogProvider","$parse","$ParseProvider","$rootScope","$RootScopeProvider","$q","$QProvider","$$q","$$QProvider","$sce","$SceProvider","$sceDelegate","$SceDelegateProvider","$sniffer","$SnifferProvider","$templateCache","$TemplateCacheProvider","$templateRequest","$TemplateRequestProvider","$$testability","$$TestabilityProvider","$timeout","$TimeoutProvider","$window","$WindowProvider","$$rAF","$$RAFProvider","$$jqLite","$$jqLiteProvider","$$HashMap","$$HashMapProvider","$$cookieReader","$$CookieReaderProvider","jqNextId","jqId","camelCase","SPECIAL_CHARS_REGEXP","_","offset","toUpperCase","MOZ_HACK_REGEXP","jqLiteIsTextNode","HTML_REGEXP","jqLiteAcceptsData","NODE_TYPE_ELEMENT","NODE_TYPE_DOCUMENT","jqLiteHasData","jqCache","ng339","jqLiteBuildFragment","tmp","wrap","fragment","createDocumentFragment","createTextNode","appendChild","createElement","TAG_NAME_REGEXP","exec","wrapMap","_default","innerHTML","XHTML_TAG_REGEXP","lastChild","childNodes","firstChild","textContent","jqLiteParseHTML","parsed","SINGLE_TAG_REGEXP","jqLiteWrapNode","wrapper","parentNode","replaceChild","argIsString","trim","jqLiteMinErr","jqLiteAddNodes","jqLiteClone","jqLiteDealoc","onlyDescendants","jqLiteRemoveData","querySelectorAll","descendants","l","jqLiteOff","unsupported","expandoStore","jqLiteExpandoStore","handle","removeHandler","listenerFns","removeEventListenerFn","MOUSE_EVENT_MAP","expandoId","createIfNecessary","jqLiteData","isSimpleSetter","isSimpleGetter","massGetter","jqLiteHasClass","selector","jqLiteRemoveClass","cssClasses","setAttribute","cssClass","jqLiteAddClass","existingClasses","root","elements","jqLiteController","jqLiteInheritedData","documentElement","names","NODE_TYPE_DOCUMENT_FRAGMENT","host","jqLiteEmpty","removeChild","jqLiteRemove","keepData","jqLiteDocumentLoaded","action","win","readyState","setTimeout","getBooleanAttrName","booleanAttr","BOOLEAN_ATTR","BOOLEAN_ELEMENTS","getAliasedAttrName","ALIASED_ATTR","createEventHandler","eventHandler","event","isDefaultPrevented","defaultPrevented","eventFns","eventFnsLength","immediatePropagationStopped","originalStopImmediatePropagation","stopImmediatePropagation","stopPropagation","isImmediatePropagationStopped","handlerWrapper","specialHandlerWrapper","defaultHandlerWrapper","handler","specialMouseHandlerWrapper","target","related","relatedTarget","jqLiteContains","$get","hasClass","classes","addClass","removeClass","hashKey","nextUidFn","objType","HashMap","isolatedUid","put","anonFn","fnText","STRIP_COMMENTS","FN_ARGS","annotate","$inject","argDecl","last","FN_ARG_SPLIT","FN_ARG","all","underscore","modulesToLoad","supportObject","delegate","provider_","providerInjector","instantiate","providerCache","providerSuffix","enforceReturnValue","result","instanceInjector","factoryFn","enforce","$injector","instanceCache","serviceName","decorFn","origProvider","orig$get","origInstance","$delegate","loadModules","moduleFn","runInvokeQueue","invokeArgs","loadedModules","stack","createInternalInjector","cache","getService","caller","INSTANTIATING","err","shift","locals","$$annotate","Type","instance","prototype","returnedValue","has","autoScrollingEnabled","disableAutoScrolling","getFirstAnchor","list","some","getYOffset","scroll","yOffset","getComputedStyle","position","getBoundingClientRect","bottom","scrollTo","scrollIntoView","elemTop","top","scrollBy","hash","elm","getElementById","getElementsByName","newVal","oldVal","mergeClasses","b","extractElementNode","ELEMENT_NODE","splitClasses","klass","prepareAnimateOptions","options","Browser","completeOutstandingRequest","outstandingRequestCount","outstandingRequestCallbacks","pop","error","getHash","url","substr","cacheStateAndFireUrlChange","pendingLocation","cacheState","fireUrlChange","getCurrentState","history","state","cachedState","lastCachedState","lastBrowserUrl","lastHistoryState","urlChangeListeners","listener","clearTimeout","pendingDeferIds","isMock","$$completeOutstandingRequest","$$incOutstandingRequestCount","notifyWhenNoOutstandingRequests","callback","href","baseElement","sameState","sameBase","stripHash","urlChangeInit","onUrlChange","$$applicationDestroyed","off","$$checkUrlChange","baseHref","defer","delay","timeoutId","cancel","deferId","cacheFactory","cacheId","refresh","entry","freshEnd","staleEnd","n","link","nextEntry","prevEntry","caches","size","stats","capacity","Number","MAX_VALUE","lruHash","lruEntry","remove","removeAll","destroy","info","$$sanitizeUriProvider","parseIsolateBindings","directiveName","isController","LOCAL_REGEXP","bindings","definition","scopeName","bindingCache","$compileMinErr","mode","collection","optional","attrName","parseDirectiveBindings","bindToController","controllerAs","identifierForController","assertValidDirectiveName","hasDirectives","Suffix","COMMENT_DIRECTIVE_REGEXP","CLASS_DIRECTIVE_REGEXP","ALL_OR_NOTHING_ATTRS","REQUIRE_PREFIX_REGEXP","EVENT_HANDLER_ATTR_REGEXP","registerDirective","directiveFactory","directives","priority","require","restrict","aHrefSanitizationWhitelist","regexp","imgSrcSanitizationWhitelist","safeAddClass","$element","className","$compileNodes","transcludeFn","maxPriority","ignoreDirective","previousCompileContext","NOT_EMPTY","domNode","nodeValue","compositeLinkFn","compileNodes","$$addScopeClass","namespace","cloneConnectFn","needsNewScope","$parent","$new","parentBoundTranscludeFn","transcludeControllers","futureParentElement","$$boundTransclude","detectNamespaceForChildElements","$linkNode","wrapTemplate","controllerName","$$addScopeInfo","parentElement","nodeList","$rootElement","nodeLinkFn","childLinkFn","childScope","idx","childBoundTranscludeFn","stableNodeList","nodeLinkFnFound","nodeListLength","linkFns","transcludeOnThisElement","createBoundTranscludeFn","transclude","templateOnThisElement","attrs","linkFnFound","Attributes","collectDirectives","applyDirectivesToNode","$$element","terminal","previousBoundTranscludeFn","boundTranscludeFn","transcludedScope","cloneFn","controllers","containingScope","$$transcluded","attrsMap","$attr","addDirective","directiveNormalize","nName","ngAttrName","isNgAttr","nAttrs","attributes","attrStartName","attrEndName","NG_ATTR_BINDING","PREFIX_REGEXP","multiElementMatch","MULTI_ELEMENT_DIR_RE","directiveIsMultiElement","addAttrInterpolateDirective","animVal","msie","addTextInterpolateDirective","NODE_TYPE_COMMENT","byPriority","groupScan","attrStart","attrEnd","depth","groupElementsLinkFnWrapper","linkFn","compileNode","templateAttrs","jqCollection","originalReplaceDirective","preLinkFns","postLinkFns","addLinkFns","pre","post","newIsolateScopeDirective","$$isolateScope","cloneAndAnnotateFn","getControllers","elementControllers","inheritType","dataName","setupControllers","controllerDirectives","controllerKey","$scope","$attrs","$transclude","controllerInstance","linkNode","controllersBoundTransclude","cloneAttachFn","hasElementTranscludeDirective","scopeToChild","controllerScope","removeScopeBindingWatches","removeControllerBindingWatches","newScopeDirective","templateDirective","$$originalDirective","$$isolateBindings","initializeDirectiveBindings","$on","controllerDirective","$$bindings","identifier","controllerResult","invokeLinkFn","templateUrl","$template","directiveValue","terminalPriority","nonTlbTranscludeDirective","hasTranscludeDirective","hasTemplate","$compileNode","replaceDirective","childTranscludeFn","$$start","$$end","assertNoDuplicate","$$tlb","createComment","replaceWith","contents","$$newScope","denormalizeTemplate","removeComments","templateNamespace","newTemplateAttrs","templateDirectives","unprocessedDirectives","markDirectiveScope","mergeTemplateAttributes","compileTemplateUrl","Math","max","newScope","tDirectives","startAttrName","endAttrName","multiElement","srcAttr","dstAttr","$set","tAttrs","afterTemplateNodeLinkFn","afterTemplateChildLinkFn","linkQueue","beforeTemplateCompileNode","origAsyncDirective","derivedSyncDirective","content","tempTemplateAttrs","beforeTemplateLinkNode","linkRootElement","$$destroyed","oldClasses","ignoreChildLinkFn","diff","what","previousDirective","wrapModuleNameIfDefined","moduleName","text","interpolateFn","templateNode","templateNodeParent","hasCompileParent","$$addBindingClass","$$addBindingInfo","expressions","getTrustedContext","attrNormalizedName","HTML","RESOURCE_URL","allOrNothing","trustedContext","$$observers","newValue","$$inter","$$scope","oldValue","$updateClass","elementsToRemove","newNode","firstElementToRemove","removeCount","j2","hasData","expando","k","kk","annotation","removeWatchCollection","lastValue","parentGet","parentSet","compare","$observe","literal","assign","parentValueWatch","parentValue","$stateful","removeWatch","$watchCollection","attributesToCopy","$normalize","$addClass","classVal","$removeClass","newClasses","toAdd","tokenDifference","toRemove","writeAttr","booleanKey","aliasedKey","observer","trimmedSrcset","srcPattern","rawUris","nbrUrisWith2parts","floor","innerIdx","lastTuple","removeAttr","listeners","startSymbol","endSymbol","binding","isolated","noTemplate","str1","str2","values","tokens1","tokens2","outer","token","jqNodes","ident","CNTRL_REG","globals","register","allowGlobals","addIdentifier","expression","later","$controllerMinErr","controllerPrototype","exception","cause","serializeValue","v","toISOString","params","serialize","toSerialize","topLevel","defaultHttpResponseTransform","headers","tempData","JSON_PROTECTION_PREFIX","contentType","APPLICATION_JSON","isJsonLike","jsonStart","JSON_START","JSON_ENDS","parseHeaders","fillInParsed","line","headerVal","headerKey","headersGetter","headersObj","transformData","status","fns","isSuccess","defaults","transformResponse","transformRequest","d","common","Accept","CONTENT_TYPE_APPLICATION_JSON","patch","xsrfCookieName","xsrfHeaderName","paramSerializer","useApplyAsync","useLegacyPromise","useLegacyPromiseExtensions","interceptorFactories","interceptors","requestConfig","response","resp","reject","executeHeaderFns","headerContent","processedHeaders","headerFn","header","mergeHeaders","defHeaderName","lowercaseDefHeaderName","reqHeaderName","defHeaders","reqHeaders","defaultHeadersIteration","serverRequest","reqData","withCredentials","sendReq","chain","promise","when","reversedInterceptors","interceptor","request","requestError","responseError","thenFn","rejectFn","success","$httpMinErrLegacyFn","createShortMethods","createShortMethodsWithData","done","headersString","statusText","resolveHttpPromise","resolvePromise","$applyAsync","$$phase","deferred","resolve","resolvePromiseWithResult","removePendingReq","pendingRequests","cachedResp","buildUrl","defaultCache","xsrfValue","urlIsSameOrigin","timeout","responseType","serializedParams","interceptorFactory","XMLHttpRequest","createHttpBackend","createXhr","$browserDefer","rawDocument","jsonpReq","callbackId","async","body","called","addEventListenerFn","timeoutRequest","jsonpDone","xhr","abort","completeRequest","open","setRequestHeader","onload","responseText","urlResolve","protocol","getAllResponseHeaders","onerror","onabort","send","escape","ch","unescapeText","escapedStartRegexp","escapedEndRegexp","mustHaveExpression","parseStringifyInterceptor","getValue","$interpolateMinErr","interr","endIndex","exp","parseFns","textLength","expressionPositions","startSymbolLength","endSymbolLength","throwNoconcat","compute","getTrusted","$$watchDelegate","$watchGroup","oldValues","currValue","interval","count","invokeApply","hasParams","setInterval","clearInterval","iteration","skipApply","$$intervalId","notify","intervals","encodePath","segments","parseAbsoluteUrl","absoluteUrl","locationObj","parsedUrl","$$protocol","$$host","hostname","$$port","port","DEFAULT_PORTS","parseAppUrl","relativeUrl","prefixed","$$path","pathname","$$search","search","$$hash","beginsWith","begin","whole","trimEmptyHash","stripFile","lastIndexOf","serverBase","LocationHtml5Url","appBase","appBaseNoFile","basePrefix","$$html5","$$parse","pathUrl","$locationMinErr","$$compose","$$url","$$absUrl","$$parseLinkUrl","relHref","appUrl","prevAppUrl","rewrittenUrl","LocationHashbangUrl","hashPrefix","removeWindowsDriveName","base","firstPathSegmentMatch","windowsFilePathExp","withoutHashUrl","withoutBaseUrl","LocationHashbangInHtml5Url","locationGetter","property","locationGetterSetter","preprocess","rewriteLinks","setBrowserUrlWithFallback","oldUrl","oldState","$$state","afterLocationChange","$broadcast","absUrl","LocationMode","initialUrl","IGNORE_URI_REGEXP","ctrlKey","metaKey","shiftKey","which","button","absHref","preventDefault","initializing","newUrl","newState","$digest","currentReplace","$$replace","urlOrStateChanged","debug","debugEnabled","flag","formatError","sourceURL","consoleLog","console","logFn","log","hasApply","arg1","arg2","warn","ensureSafeMemberName","fullExpression","$parseMinErr","getStringValue","ensureSafeObject","children","ensureSafeFunction","CALL","APPLY","BIND","ensureSafeAssignContext","Function","ifDefined","plusFn","r","isStateless","filterName","findConstantAndWatchExpressions","ast","allConstants","argsToWatch","AST","Program","expr","Literal","toWatch","UnaryExpression","argument","BinaryExpression","left","right","LogicalExpression","ConditionalExpression","alternate","consequent","Identifier","MemberExpression","object","computed","CallExpression","callee","AssignmentExpression","ArrayExpression","ObjectExpression","properties","ThisExpression","getInputs","lastExpression","isAssignable","assignableAST","NGValueParameter","operator","isLiteral","isConstant","ASTCompiler","astBuilder","ASTInterpreter","isPossiblyDangerousMemberName","getValueOf","objectValueOf","cacheDefault","cacheExpensive","interceptorFn","expensiveChecks","parsedExpression","oneTime","cacheKey","runningChecksEnabled","parseOptions","$parseOptionsExpensive","$parseOptions","lexer","Lexer","parser","Parser","constantWatchDelegate","oneTimeLiteralWatchDelegate","oneTimeWatchDelegate","inputs","inputsWatchDelegate","expensiveChecksInterceptor","addInterceptor","expensiveCheckFn","expensiveCheckOldValue","expressionInputDirtyCheck","oldValueOfValue","objectEquality","prettyPrintExpression","lastResult","inputExpressions","oldInputValueOf","newInputValue","oldInputValueOfValues","oldInputValues","changed","unwatch","old","$$postDigest","isAllDefined","allDefined","watchDelegate","useInputs","regularWatch","noUnsafeEval","$$runningExpensiveChecks","qFactory","nextTick","exceptionHandler","callOnce","resolveFn","Promise","simpleBind","processQueue","pending","processScheduled","scheduleProcessQueue","Deferred","promises","results","$qMinErr","TypeError","onFulfilled","onRejected","progressBack","catch","finally","handleCallback","$$reject","$$resolve","progress","makePromise","resolved","isResolved","callbackOutput","errback","$Q","Q","resolver","requestAnimationFrame","webkitRequestAnimationFrame","cancelAnimationFrame","webkitCancelAnimationFrame","webkitCancelRequestAnimationFrame","rafSupported","raf","timer","supported","createChildScopeClass","ChildScope","$$watchers","$$nextSibling","$$childHead","$$childTail","$$listeners","$$listenerCount","$$watchersCount","$id","$$ChildScope","TTL","$rootScopeMinErr","lastDirtyWatch","applyAsyncId","digestTtl","destroyChildScope","$event","currentScope","cleanUpScope","$$prevSibling","$root","Scope","beginPhase","phase","clearPhase","incrementWatchersCount","current","decrementListenerCount","initWatchVal","flushApplyAsync","applyAsyncQueue","scheduleApplyAsync","isolate","child","watchExp","watcher","eq","watchExpressions","watchGroupAction","changeReactionScheduled","firstRun","newValues","deregisterFns","shouldCall","unwatchFn","$watchCollectionInterceptor","_value","newLength","bothNaN","newItem","oldItem","internalArray","oldLength","changeDetected","internalObject","$watchCollectionAction","initRun","veryOldValue","trackVeryOldValue","changeDetector","watch","watchers","dirty","next","logIdx","asyncTask","ttl","watchLog","asyncQueue","$eval","traverseScopesLoop","msg","postDigestQueue","eventName","$applyAsyncExpression","namedListeners","indexOfListener","$emit","targetScope","listenerArgs","$$asyncQueue","$$postDigestQueue","$$applyAsyncQueue","uri","isImage","normalizedVal","regex","adjustMatcher","matcher","$sceMinErr","escapeForRegexp","adjustMatchers","matchers","adjustedMatchers","SCE_CONTEXTS","resourceUrlWhitelist","resourceUrlBlacklist","matchUrl","isResourceUrlAllowedByPolicy","allowed","generateHolderType","Base","holderType","trustedValue","$$unwrapTrustedValue","trustAs","Constructor","byType","maybeTrusted","trustedValueHolderBase","htmlSanitizer","CSS","URL","JS","sce","isEnabled","parseAs","enumValue","lName","vendorPrefix","eventSupport","android","navigator","userAgent","boxee","vendorRegex","bodyStyle","transitions","animations","webkitTransition","webkitAnimation","pushState","hasEvent","divElm","handleRequestFn","tpl","ignoreRequestError","handleError","totalPendingRequests","getTrustedResourceUrl","transformer","httpOptions","testability","findBindings","opt_exactMatch","getElementsByClassName","matches","dataBinding","bindingName","findModels","prefixes","attributeEquals","getLocation","setLocation","whenStable","deferreds","$$timeoutId","urlParsingNode","requestUrl","originUrl","$$CookieReader","safeDecodeURIComponent","lastCookies","lastCookieString","cookieArray","cookie","currentCookieString","filters","suffix","currencyFilter","dateFilter","filterFilter","jsonFilter","limitToFilter","lowercaseFilter","numberFilter","orderByFilter","uppercaseFilter","comparator","predicateFn","matchAgainstAnyProp","expressionType","getTypeForFilter","createPredicateFn","shouldMatchPrimitives","actual","expected","deepCompare","dontMatchWholeObject","actualType","expectedType","expectedVal","matchAnyProperty","actualVal","$locale","formats","NUMBER_FORMATS","amount","currencySymbol","fractionSize","CURRENCY_SYM","PATTERNS","maxFrac","formatNumber","GROUP_SEP","DECIMAL_SEP","number","numStr","digits","numberOfIntegerDigits","zeros","exponent","ZERO_CHAR","MAX_DIGITS","roundNumber","parsedNumber","minFrac","fractionLen","min","roundAt","digit","carry","reduceRight","groupSep","decimalSep","isInfinity","isFinite","isZero","abs","formattedText","integerLen","decimals","reduce","groups","lgSize","gSize","negPre","negSuf","posPre","posSuf","padNumber","num","neg","dateGetter","dateStrGetter","shortForm","timeZoneGetter","zone","paddedZone","getFirstThursdayOfYear","year","dayOfWeekOnFirst","getDay","getThursdayThisWeek","datetime","getFullYear","getMonth","getDate","weekGetter","firstThurs","thisThurs","round","ampmGetter","getHours","AMPMS","eraGetter","ERAS","longEraGetter","ERANAMES","jsonStringToDate","string","R_ISO8601_STR","tzHour","tzMin","dateSetter","setUTCFullYear","setFullYear","timeSetter","setUTCHours","setHours","s","ms","parseFloat","format","DATETIME_FORMATS","NUMBER_STRING","DATE_FORMATS_SPLIT","DATE_FORMATS","spacing","limit","Infinity","processPredicates","sortPredicate","reverseOrder","map","predicate","descending","objectValue","getPredicateValue","v1","v2","getComparisonObject","predicateValues","predicates","doComparison","compareValues","ngDirective","nullFormRenameControl","control","$name","FormController","controls","$error","$$success","$pending","$dirty","$pristine","$valid","$invalid","$submitted","$$parentForm","nullFormCtrl","$rollbackViewValue","$commitViewValue","$addControl","$$renameControl","newName","oldName","$removeControl","$setValidity","addSetValidityMethod","ctrl","set","unset","$setDirty","PRISTINE_CLASS","DIRTY_CLASS","$setPristine","setClass","SUBMITTED_CLASS","$setUntouched","$setSubmitted","stringBasedInputType","$formatters","$isEmpty","textInputType","baseInputType","composing","ev","ngTrim","$viewValue","$$hasNativeValidators","$setViewValue","deferListener","origValue","keyCode","PARTIAL_VALIDATION_TYPES","PARTIAL_VALIDATION_EVENTS","validity","VALIDITY_STATE_PROPERTY","origBadInput","badInput","origTypeMismatch","typeMismatch","$render","weekParser","isoWeek","existingDate","WEEK_REGEXP","week","hours","seconds","milliseconds","addDays","getSeconds","getMilliseconds","NaN","createDateParser","mapping","iso","ISO_DATE_REGEXP","yyyy","MM","dd","HH","mm","ss","sss","part","createDateInputType","parseDate","isValidDate","parseObservedDateValue","badInputChecker","previousDate","$options","$$parserName","$parsers","parsedDate","ngModelMinErr","ngMin","minVal","$validators","$validate","ngMax","maxVal","nativeValidation","numberInputType","NUMBER_REGEXP","urlInputType","modelValue","viewValue","URL_REGEXP","emailInputType","email","EMAIL_REGEXP","radioInputType","checked","parseConstantExpr","parseFn","checkboxInputType","trueValue","ngTrueValue","falseValue","ngFalseValue","classDirective","arrayDifference","arrayClasses","addClasses","digestClassCounts","removeClasses","classCounts","classesToUpdate","updateClasses","ngClassWatchAction","$index","old$index","mod","setValidity","validationErrorKey","createAndSet","unsetAndCleanup","cachedToggleClass","PENDING_CLASS","toggleValidationCss","isObjectEmpty","combinedState","switchValue","classCache","isValid","VALID_CLASS","INVALID_CLASS","chromeHack","optionElement","selected","REGEX_STRING_REGEXP","manualLowercase","String","fromCharCode","charCodeAt","manualUppercase","documentMode","rules","ngCspElement","ngCspAttribute","noInlineStyle","name_","el","NODE_TYPE_ATTRIBUTE","full","major","minor","dot","codeName","addEventListener","removeEventListener","mouseleave","mouseenter","thead","col","tr","td","optgroup","tbody","tfoot","colgroup","caption","th","Node","contains","compareDocumentPosition","ready","trigger","fired","removeData","removeAttribute","css","lowercasedName","getNamedItem","specified","ret","getText","$dv","multiple","nodeCount","types","addHandler","noEventListener","one","onFn","replaceNode","insertBefore","contentDocument","prepend","wrapNode","detach","after","newElement","toggleClass","condition","classCondition","nextElementSibling","getElementsByTagName","extraParameters","dummyEvent","eventFnsCopy","handlerArgs","arg3","unbind","$animateMinErr","NG_ANIMATE_CLASSNAME","postDigestElements","updateData","handleCSSClassChanges","existing","addRemoveClassesPostDigest","add","classesAdded","classesRemoved","pin","domOperation","from","to","runner","complete","$$registeredAnimations","classNameFilter","$$classNameFilter","reservedRegex","domInsert","afterElement","afterNode","previousElementSibling","end","enter","move","leave","addclass","animate","tempClasses","waitForTick","waitQueue","passed","AnimateRunner","setHost","rafTick","timeoutTick","_doneCallbacks","_tick","doc","hidden","_state","INITIAL_STATE","DONE_PENDING_STATE","DONE_COMPLETE_STATE","runners","onProgress","getPromise","resolveHandler","rejectHandler","pause","resume","_resolve","initialOptions","applyAnimationContents","closed","$$prepared","cleanupStyles","start","offsetWidth","Content-Type","[","{","$httpMinErr","PATH_MATCH","http","https","ftp","locationPrototype","paramValue","Location","OPERATORS","ESCAPE","f","t","'","\"","lex","tokens","readString","peek","readNumber","isIdent","readIdent","is","isWhitespace","ch2","ch3","op1","op2","op3","throwError","chars","isExpOperator","colStr","peekCh","quote","rawString","hex","rep","ExpressionStatement","Property","program","expressionStatement","expect","filterChain","assignment","ternary","logicalOR","consume","logicalAND","equality","relational","additive","multiplicative","unary","primary","arrayDeclaration","constants","parseArguments","baseExpression","peekToken","kind","e1","e2","e3","e4","peekAhead","true","false","null","nextId","vars","own","assignable","stage","computing","recurse","return_","generateFunction","fnKey","intoId","watchId","fnString","USE","STRICT","filterPrefix","watchFns","varsPrefix","section","nameId","recursionFn","skipWatchIdCheck","if_","lazyAssign","computedMember","lazyRecurse","plus","not","getHasOwnProperty","nonComputedMember","addEnsureSafeObject","notNull","addEnsureSafeAssignContext","addEnsureSafeMemberName","addEnsureSafeFunction","member","defaultValue","stringEscapeRegex","stringEscapeFn","skip","init","rhs","lhs","unary+","unary-","unary!","binary+","binary-","binary*","binary/","binary%","binary===","binary!==","binary==","binary!=","binary<","binary>","binary<=","binary>=","binary&&","binary||","ternary?:","astCompiler","yy","y","MMMM","MMM","M","H","hh","EEEE","EEE","Z","ww","w","G","GG","GGG","GGGG","xlinkHref","propName","defaultLinkFn","normalized","htmlAttr","formDirectiveFactory","isNgForm","getSetter","formElement","nameAttr","ctrls","handleFormSubmission","parentFormCtrl","setter","DATE_REGEXP","DATETIMELOCAL_REGEXP","MONTH_REGEXP","TIME_REGEXP","inputType","datetime-local","time","month","radio","checkbox","submit","reset","file","CONSTANT_VALUE_REGEXP","tplAttr","$compile","templateElement","tElement","ngBindHtmlGetter","ngBindHtmlWatch","getTrustedHtml","$viewChangeListeners","forceAsyncEvents","blur","focus","previousElements","srcExp","onloadExp","autoScrollExp","autoscroll","previousElement","currentElement","changeCounter","cleanupLastIncludeContent","afterAnimation","thisChangeId","trimValues","UNTOUCHED_CLASS","TOUCHED_CLASS","NgModelController","$modelValue","$$rawModelValue","$asyncValidators","$untouched","$touched","parserValid","parsedNgModel","parsedNgModelAssign","ngModelGet","ngModelSet","pendingDebounce","$$setOptions","getterSetter","invokeModelGetter","invokeModelSetter","$$$p","currentValidationRunId","$setTouched","$$lastCommittedViewValue","prevValid","prevModelValue","allowInvalid","$$runValidators","allValid","$$writeModelToScope","doneCallback","processParseErrors","errorKey","processSyncValidators","syncValidatorsValid","validator","processAsyncValidators","validatorPromises","validationDone","localValidationRunId","$$parseAndValidate","writeToModelIfNeeded","updateOnDefault","$$debounceViewValueCommit","debounce","debounceDelay","formatters","modelCtrl","formCtrl","updateOn","DEFAULT_REGEXP","that","ngOptionsMinErr","NG_OPTIONS_REGEXP","parseOptionsExpression","optionsExp","selectElement","Option","selectValue","label","group","disabled","getOptionValuesKeys","optionValues","optionValuesKeys","keyName","itemKey","valueName","selectAs","trackBy","selectAsFn","viewValueFn","trackByFn","getTrackByValueFn","getTrackByValue","getLocals","displayFn","groupByFn","disableWhenFn","valuesFn","getWatchables","watchedArray","optionValuesLength","disableWhen","getOptions","optionItems","selectValueMap","optionItem","getOptionFromViewValue","getViewValueFromOption","ngOptionsPostLink","updateOptionElement","addOrReuseElement","removeExcessElements","skipEmptyAndUnknownOptions","emptyOption_","emptyOption","unknownOption_","unknownOption","updateOptions","previousValue","selectCtrl","readValue","groupMap","providedEmptyOption","groupElement","optGroupTemplate","currentOptionElement","optionTemplate","ngModelCtrl","nextValue","isNotPrimitive","renderEmptyOption","removeEmptyOption","renderUnknownOption","removeUnknownOption","writeValue","selectedValues","selections","selectedOption","registerOption","BRACE","IS_WHEN","updateElementText","newText","lastCount","numberExp","whenExp","whens","whensExpFns","braceReplacement","watchRemover","attributeName","tmpMatch","whenKey","countIsNaN","pluralCat","whenExpFn","NG_REMOVED","ngRepeatMinErr","updateScope","valueIdentifier","keyIdentifier","arrayLength","$first","$last","$middle","$odd","$even","getBlockStart","getBlockEnd","ngRepeatEndComment","aliasAs","trackByExp","trackByExpGetter","trackByIdExpFn","trackByIdArrayFn","trackByIdObjFn","hashFnLocals","lastBlockMap","nextNode","collectionLength","trackById","trackByIdFn","collectionKeys","nextBlockOrder","previousNode","nextBlockMap","blockKey","NG_HIDE_CLASS","NG_HIDE_IN_PROGRESS_CLASS","newStyles","oldStyles","cases","ngSwitchController","watchExpr","selectedTranscludes","selectedElements","previousLeaveAnimations","selectedScopes","spliceFactory","selectedTransclude","caseElement","selectedScope","anchor","noopNgModelController","SelectController","optionsMap","unknownVal","hasOption","addOption","removeOption","optionScope","optionAttrs","interpolateValueFn","interpolateTextFn","selectPreLink","lastView","lastViewRef","selectPostLink","selectCtrlName","patternExp","intVal","getDecimals","getVF","opt_precision","pow","PLURAL_CATEGORY","ZERO","ONE","TWO","FEW","MANY","OTHER","DAY","FIRSTDAYOFWEEK","MONTH","SHORTDAY","SHORTMONTH","STANDALONEMONTH","WEEKENDRANGE","fullDate","longDate","medium","mediumDate","mediumTime","short","shortDate","shortTime","minInt","localeID","vf","head","$RouteProvider","pathRegExp","opts","insensitive","caseInsensitiveMatch","originalPath","slash","star","routes","route","routeCopy","reloadOnSearch","redirectPath","redirectTo","otherwise","$routeParams","switchRouteMatcher","prepareRoute","$locationEvent","lastRoute","$route","preparedRoute","parseRoute","preparedRouteIsUpdateOnly","$$route","pathParams","forceReload","commitRoute","nextRoute","interpolate","loadedTemplateUrl","segment","segmentMatch","fakeLocationEvent","updateParams","newParams","$routeMinErr","$RouteParamsProvider","ngViewFactory","cleanupLastView","previousLeaveAnimation","update","ngViewFillContentFactory","ngRouteModule","$SanitizeProvider","buf","htmlParser","htmlSanitizeWriter","sanitizeText","writer","lowercaseKeys","parseStartTag","tagName","rest","blockElements","inlineElements","parseEndTag","optionalEndTagElements","voidElements","ATTR_REGEXP","doubleQuotedValue","singleQuotedValue","unquotedValue","decodeEntities","specialElements","COMMENT_REGEXP","CDATA_REGEXP","comment","DOCTYPE_REGEXP","BEGING_END_TAGE_REGEXP","END_TAG_REGEXP","BEGIN_TAG_REGEXP","START_TAG_REGEXP","$sanitizeMinErr","hiddenPre","encodeEntities","SURROGATE_PAIR_REGEXP","hi","low","NON_ALPHANUMERIC_REGEXP","uriValidator","ignore","out","validElements","lkey","validAttrs","uriAttrs","optionalEndTagBlockElements","optionalEndTagInlineElements","svgElements","htmlAttrs","svgAttrs","$sanitize","LINKY_URL_REGEXP","MAILTO_REGEXP","addText","addLink","raw","makeSwipeDirective","direction","ngTouch","$swipe","MAX_VERTICAL_DISTANCE","MAX_VERTICAL_RATIO","MIN_HORIZONTAL_DISTANCE","validSwipe","coords","startCoords","deltaY","deltaX","x","valid","swipeHandler","pointerTypes","getCoordinates","originalEvent","touches","changedTouches","clientX","clientY","getEvents","eventType","res","pointerType","POINTER_EVENTS","MOVE_BUFFER_RADIUS","mouse","touch","eventHandlers","totalX","totalY","lastPos","active","hit","x1","y1","x2","y2","CLICKBUSTER_THRESHOLD","checkAllowableRegions","touchCoordinates","onClick","now","lastPreventedTime","PREVENT_DURATION","lastLabelClickCoordinates","onTouchStart","preventGhostClick","TAP_DURATION","MOVE_TOLERANCE","ACTIVE_CLASS_NAME","resetState","tapping","tapElement","startTime","touchStartX","touchStartY","clickHandler","ngClick","srcElement","dist","sqrt","onclick","touchend","disconnectController","DEFAULT_HEADING","DEFAULT_MESSAGE","_disconnected","ui","visible","heading","socketEvents","connection","disconnect","notifyController","DEFAULT_STATUS","DEFAULT_TIMEOUT","show","evt","_timer","HistoryService","Socket","visited","updateStack","updateHistory","urls","getData","emit","clear","ClientsService","api","reloadAll","clientEvent","sendAllTo","scrollAllTo","proportional","override","highlight","SocketService","session","io","socket","prev","publicApi","removeEvent","removeListener","uiEvent","newSession","defineProperty","socketConfig","___browserSync___","socketUrl","lookup","sameNamespace","nsps","newConnection","forceNew","multiplex","Manager","query","managers","connect","global","loc","parseuri","ipv6","re","authority","ipv6uri","process","useColors","WebkitAppearance","firebug","table","$1","formatArgs","humanize","color","lastC","save","namespaces","storage","removeItem","load","env","DEBUG","localstorage","localStorage","chrome","local","colors","enable","defaultSetTimout","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","runClearTimeout","marker","cachedClearTimeout","cleanUpNextTick","draining","currentQueue","queueIndex","drainQueue","Item","title","browser","argv","versions","addListener","once","removeAllListeners","cwd","chdir","dir","umask","selectColor","createDebug","curr","prevTime","coerce","formatter","skips","disable","fmtShort","fmtLong","plural","ceil","long","Encoder","encodeAsString","BINARY_EVENT","BINARY_ACK","attachments","nsp","encodeAsBinary","writeEncoding","bloblessData","deconstruction","binary","deconstructPacket","pack","packet","buffers","removeBlobs","Decoder","reconstructor","decodeString","tryParse","BinaryReconstructor","reconPack","ERROR","Emitter","hasBin","isBuf","CONNECT","DISCONNECT","EVENT","ACK","encode","encoding","base64","takeBinaryData","finishedReconstruction","binData","reconstructPacket","mixin","_callbacks","cb","hasListeners","hasBinary","Buffer","isBuffer","ArrayBuffer","withNativeBlob","Blob","withNativeFile","File","toJSON","arr","_deconstructPacket","placeholder","_placeholder","newData","_reconstructPacket","packetData","_removeBlobs","curKey","containingObject","pendingBlobs","fileReader","FileReader","readAsArrayBuffer","subs","reconnection","reconnectionAttempts","reconnectionDelay","reconnectionDelayMax","randomizationFactor","backoff","Backoff","jitter","connecting","lastPing","packetBuffer","_parser","encoder","decoder","autoConnect","eio","emitAll","updateSocketIds","generateId","engine","_reconnection","_reconnectionAttempts","_reconnectionDelay","setMin","_randomizationFactor","setJitter","_reconnectionDelayMax","setMax","_timeout","maybeReconnectOnOpen","reconnecting","attempts","reconnect","skipReconnect","openSub","onopen","errorSub","cleanup","close","onping","onpong","ondata","ondecoded","onConnecting","encodedPackets","write","processPacketQueue","subsLength","sub","onclose","duration","onreconnect","attempt","secure","agent","parseqs","decode","upgrade","forceJSONP","jsonp","forceBase64","enablesXDR","timestampParam","timestampRequests","transports","transportOptions","writeBuffer","prevBufferLen","policyPort","rememberUpgrade","binaryType","onlyBinaryUpgrades","perMessageDeflate","threshold","pfx","passphrase","cert","ca","ciphers","rejectUnauthorized","forceNode","freeGlobal","extraHeaders","localAddress","upgrades","pingInterval","pingTimeout","pingIntervalTimer","pingTimeoutTimer","o","priorWebsocketSuccess","Transport","createTransport","EIO","transport","sid","requestTimeout","protocols","setTransport","onDrain","onPacket","onError","onClose","probe","onTransportOpen","upgradeLosesBinary","supportsBinary","failed","upgrading","flush","freezeTransport","onTransportClose","onupgrade","onOpen","onHandshake","setPing","filterUpgrades","onHeartbeat","ping","sendPacket","writable","compress","cleanupAndClose","waitForUpgrade","desc","filteredUpgrades","polling","xd","xs","isSSL","xdomain","xscheme","XHR","JSONP","websocket","hasCORS","XDomainRequest","Polling","Request","isBinary","unloadHandler","requests","doWrite","req","sendXhr","doPoll","onData","pollXhr","setDisableHeaderCheck","hasXDR","onLoad","onreadystatechange","getResponseHeader","requestsCount","onSuccess","fromError","attachEvent","hasXHR2","yeast","doOpen","poll","onPause","total","decodePayload","doClose","packets","callbackfn","encodePayload","schema","b64","description","decodePacket","encodeBase64Object","encodeArrayBuffer","encodeBase64Packet","contentArray","Uint8Array","resultBuffer","byteLength","buffer","encodeBlobAsArrayBuffer","fr","encodePacket","encodeBlob","dontSendBlobs","blob","tryDecode","utf8","strict","ary","each","eachWithIndex","base64encoder","sliceBuffer","isAndroid","isPhantomJS","pong","packetslist","utf8encode","encoded","readAsDataURL","b64data","typed","basic","btoa","utf8decode","decodeBase64Packet","asArray","setLengthHeader","encodeOne","encodePayloadAsBlob","encodePayloadAsArrayBuffer","decodePayloadAsBinary","chr","totalLength","acc","resultArray","bufferIndex","ab","view","lenStr","binaryIdentifier","lengthAry","bufferTail","tailArray","msgLength","arraybuffer","bytes","abv","err_cb","proxy","bail","__WEBPACK_AMD_DEFINE_RESULT__","ucs2decode","output","ucs2encode","stringFromCharCode","checkScalarValue","codePoint","createByte","encodeCodePoint","symbol","codePoints","byteString","readContinuationByte","byteIndex","byteCount","continuationByte","byteArray","decodeSymbol","byte1","byte2","byte3","byte4","freeExports","webpackPolyfill","deprecate","paths","encoded1","encoded2","encoded3","encoded4","bufferLength","mapArrayBufferViews","chunk","byteOffset","BlobBuilderConstructor","bb","BlobBuilder","getBlob","BlobConstructor","WebKitBlobBuilder","MSBlobBuilder","MozBlobBuilder","blobSupported","blobSupportsArrayBufferView","blobBuilderSupported","qs","qry","pairs","pair","alphabet","decoded","seed","JSONPPolling","___eio","rNewline","rEscapedNewline","iframe","insertAt","isUAgecko","initIframe","iframeId","area","WS","usingBrowserWebSocket","BrowserWebSocket","WebSocket","NodeWebSocket","MozWebSocket","check","ws","supports","addEventListeners","onmessage","ids","acks","receiveBuffer","sendBuffer","connected","disconnected","toArray","connect_error","connect_timeout","reconnect_attempt","reconnect_failed","reconnect_error","subEvents","flags","onpacket","onconnect","onevent","onack","ondisconnect","ack","sent","emitBuffered","factor","rand","random","deviation","ContentSections","pagesConfig","$section","transform","app","OptionsService","Store","ns","bs","store","objectPath","StoreModule","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","isLocalStorageNameSupported","localStorageName","scriptTag","defaultVal","transact","transactionFn","getAll","deserialize","setItem","getItem","addBehavior","storageOwner","storageContainer","ActiveXObject","frames","withIEStorage","storeFunction","forbiddenCharsRegex","ieKeyFix","XMLDocument","testKey","isEmpty","_hasOwnProperty","toStr","getKey","intKey","doNotReplace","currentPath","del","ensureExists","insert","at","coalesce","MainController","browsers","socketId","Pages","Clients","menu","sectionMenu","setActiveSection","toggleMenu","transformOptions","displayUrl","getDisplayUrl","external","utils","ucfirst","localRootUrl","orderObjectBy","scheme","localUrl","field","filtered","icon","iconName","pages","navi","toggle","switchid","tagline"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,GAGAV,EAAA,KDMM,SAASI,EAAQD,EAASH,GAE/BI,EAAOD,QAAUH,EAAoB,IAKhC,SAASI,EAAQD,EAASH,GE1BhC,QAAAW,GAAAC,GACAA,EAAAC,WACAC,SAAA,EACAC,aAAA,IA5BAf,EAAA,GACAA,EAAA,GACAA,EAAA,GACAA,EAAA,EAEA,IAAAgB,GAAAC,OAAAD,OAEAA,GACAZ,OAAA,eACA,YACA,YACA,eACA,WACA,WACA,UACA,UACA,UACA,eAEAc,QAAA,oBAAAP,GAmBAX,GAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,KF4DM,SAASI,EAAQD,EAASH,GG5GhCA,EAAA,GACAI,EAAAD,QAAAa,SHmHM,SAASZ,EAAQD;;;;;CI/GvB,SAAAc,EAAAE,EAAAC,GAAwC,YAgCxC,SAAAC,GAAAjB,EAAAkB,GAEA,MADAA,MAAAC,MACA,WACA,GAMAC,GAAAC,EANAC,EAAA,EAEAC,EAAAC,UACAC,EAAAF,EAAA,G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GAAAzO,GAAAqpG,EAAA56F,EACAw5F,GAAAre,OAAA5pF,GACA+Z,EAAAtL,c1E0xvCM,SAAStR,EAAQD,G2E3yvCvBC,EAAAD,QAAA,WACA,OACAuO,OACA89F,OAAA,IACAvpG,KAAA,IACAwpG,SAAA,IACA7e,MAAA,IACA8e,QAAA,IACApnB,OAAA,IACAh+E,KAAA,KAEAsrB,SAAA,IACA5wB,SAAA,EACA0zB,YAAA,EACAsF,YAAA,iBACAnJ,aAAA,OACArhB,YAAA,kBAAAipB,GACA,GAAAs4B,GAAA79C,IACA69C,GAAA9uD,KAAAw2B,EAAAx2B,U3EozvCM,SAAS7C,EAAQD,G4Et0vCvBC,EAAAD,QAAA,WACA,OACAuO,OACAue,IAAA,IACAsE,KAAA,KAEAqB,SAAA,IACA5wB,SAAA,EACAD,SAAA","file":"js/app.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(1);\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(2);\n\t__webpack_require__(4);\n\t__webpack_require__(6);\n\t__webpack_require__(8);\n\t\n\tvar angular = window.angular;\n\t\n\tangular\n\t .module(\"BrowserSync\", [\n\t \"bsHistory\",\n\t \"bsClients\",\n\t \"bsDisconnect\",\n\t \"bsNotify\",\n\t \"bsSocket\",\n\t \"bsStore\",\n\t \"ngRoute\",\n\t \"ngTouch\",\n\t \"ngSanitize\"\n\t ])\n\t .config([\"$locationProvider\", Config]);\n\t\n\t/**\n\t * @constructor\n\t * @param $locationProvider\n\t */\n\tfunction Config($locationProvider) {\n\t $locationProvider.html5Mode({\n\t enabled: true,\n\t requireBase: false\n\t });\n\t}\n\t\n\t\n\t/**\n\t * Modules\n\t * @type {exports}\n\t */\n\t/* jshint ignore:start */\n\tvar discon = __webpack_require__(10);\n\tvar notify = __webpack_require__(12);\n\tvar history = __webpack_require__(13);\n\tvar clients = __webpack_require__(14);\n\tvar socket = __webpack_require__(15);\n\tvar app = __webpack_require__(63);\n\tvar options = __webpack_require__(65);\n\tvar Store = __webpack_require__(66);\n\tvar mainCtrl = __webpack_require__(69);\n\tvar filter = __webpack_require__(70);\n\tvar directives = __webpack_require__(72);\n\t\n\t/* jshint ignore:end */\n\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(3);\n\tmodule.exports = angular;\n\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t/**\n\t * @license AngularJS v1.4.14\n\t * (c) 2010-2015 Google, Inc. http://angularjs.org\n\t * License: MIT\n\t */\n\t(function(window, document, undefined) {'use strict';\n\t\n\t/**\n\t * @description\n\t *\n\t * This object provides a utility for producing rich Error messages within\n\t * Angular. It can be called as follows:\n\t *\n\t * var exampleMinErr = minErr('example');\n\t * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);\n\t *\n\t * The above creates an instance of minErr in the example namespace. The\n\t * resulting error will have a namespaced error code of example.one. The\n\t * resulting error will replace {0} with the value of foo, and {1} with the\n\t * value of bar. The object is not restricted in the number of arguments it can\n\t * take.\n\t *\n\t * If fewer arguments are specified than necessary for interpolation, the extra\n\t * interpolation markers will be preserved in the final string.\n\t *\n\t * Since data will be parsed statically during a build step, some restrictions\n\t * are applied with respect to how minErr instances are created and called.\n\t * Instances should have names of the form namespaceMinErr for a minErr created\n\t * using minErr('namespace') . Error codes, namespaces and template strings\n\t * should all be static strings, not variables or general expressions.\n\t *\n\t * @param {string} module The namespace to use for the new minErr instance.\n\t * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning\n\t * error from returned function, for cases when a particular type of error is useful.\n\t * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance\n\t */\n\t\n\tfunction minErr(module, ErrorConstructor) {\n\t ErrorConstructor = ErrorConstructor || Error;\n\t return function() {\n\t var SKIP_INDEXES = 2;\n\t\n\t var templateArgs = arguments,\n\t code = templateArgs[0],\n\t message = '[' + (module ? module + ':' : '') + code + '] ',\n\t template = templateArgs[1],\n\t paramPrefix, i;\n\t\n\t message += template.replace(/\\{\\d+\\}/g, function(match) {\n\t var index = +match.slice(1, -1),\n\t shiftedIndex = index + SKIP_INDEXES;\n\t\n\t if (shiftedIndex < templateArgs.length) {\n\t return toDebugString(templateArgs[shiftedIndex]);\n\t }\n\t\n\t return match;\n\t });\n\t\n\t message += '\\nhttp://errors.angularjs.org/1.4.14/' +\n\t (module ? module + '/' : '') + code;\n\t\n\t for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {\n\t message += paramPrefix + 'p' + (i - SKIP_INDEXES) + '=' +\n\t encodeURIComponent(toDebugString(templateArgs[i]));\n\t }\n\t\n\t return new ErrorConstructor(message);\n\t };\n\t}\n\t\n\t/* We need to tell jshint what variables are being exported */\n\t/* global angular: true,\n\t msie: true,\n\t jqLite: true,\n\t jQuery: true,\n\t slice: true,\n\t splice: true,\n\t push: true,\n\t toString: true,\n\t ngMinErr: true,\n\t angularModule: true,\n\t uid: true,\n\t REGEX_STRING_REGEXP: true,\n\t VALIDITY_STATE_PROPERTY: true,\n\t\n\t lowercase: true,\n\t uppercase: true,\n\t manualLowercase: true,\n\t manualUppercase: true,\n\t nodeName_: true,\n\t isArrayLike: true,\n\t forEach: true,\n\t forEachSorted: true,\n\t reverseParams: true,\n\t nextUid: true,\n\t setHashKey: true,\n\t extend: true,\n\t toInt: true,\n\t inherit: true,\n\t merge: true,\n\t noop: true,\n\t identity: true,\n\t valueFn: true,\n\t isUndefined: true,\n\t isDefined: true,\n\t isObject: true,\n\t isBlankObject: true,\n\t isString: true,\n\t isNumber: true,\n\t isDate: true,\n\t isArray: true,\n\t isFunction: true,\n\t isRegExp: true,\n\t isWindow: true,\n\t isScope: true,\n\t isFile: true,\n\t isFormData: true,\n\t isBlob: true,\n\t isBoolean: true,\n\t isPromiseLike: true,\n\t trim: true,\n\t escapeForRegexp: true,\n\t isElement: true,\n\t makeMap: true,\n\t includes: true,\n\t arrayRemove: true,\n\t copy: true,\n\t shallowCopy: true,\n\t equals: true,\n\t csp: true,\n\t jq: true,\n\t concat: true,\n\t sliceArgs: true,\n\t bind: true,\n\t toJsonReplacer: true,\n\t toJson: true,\n\t fromJson: true,\n\t convertTimezoneToLocal: true,\n\t timezoneToOffset: true,\n\t startingTag: true,\n\t tryDecodeURIComponent: true,\n\t parseKeyValue: true,\n\t toKeyValue: true,\n\t encodeUriSegment: true,\n\t encodeUriQuery: true,\n\t angularInit: true,\n\t bootstrap: true,\n\t getTestability: true,\n\t snake_case: true,\n\t bindJQuery: true,\n\t assertArg: true,\n\t assertArgFn: true,\n\t assertNotHasOwnProperty: true,\n\t getter: true,\n\t getBlockNodes: true,\n\t hasOwnProperty: true,\n\t createMap: true,\n\t\n\t NODE_TYPE_ELEMENT: true,\n\t NODE_TYPE_ATTRIBUTE: true,\n\t NODE_TYPE_TEXT: true,\n\t NODE_TYPE_COMMENT: true,\n\t NODE_TYPE_DOCUMENT: true,\n\t NODE_TYPE_DOCUMENT_FRAGMENT: true,\n\t*/\n\t\n\t////////////////////////////////////\n\t\n\t/**\n\t * @ngdoc module\n\t * @name ng\n\t * @module ng\n\t * @description\n\t *\n\t * # ng (core module)\n\t * The ng module is loaded by default when an AngularJS application is started. The module itself\n\t * contains the essential components for an AngularJS application to function. The table below\n\t * lists a high level breakdown of each of the services/factories, filters, directives and testing\n\t * components available within this core module.\n\t *\n\t * <div doc-module-components=\"ng\"></div>\n\t */\n\t\n\tvar REGEX_STRING_REGEXP = /^\\/(.+)\\/([a-z]*)$/;\n\t\n\t// The name of a form control's ValidityState property.\n\t// This is used so that it's possible for internal tests to create mock ValidityStates.\n\tvar VALIDITY_STATE_PROPERTY = 'validity';\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.lowercase\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description Converts the specified string to lowercase.\n\t * @param {string} string String to be converted to lowercase.\n\t * @returns {string} Lowercased string.\n\t */\n\tvar lowercase = function(string) {return isString(string) ? string.toLowerCase() : string;};\n\tvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.uppercase\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description Converts the specified string to uppercase.\n\t * @param {string} string String to be converted to uppercase.\n\t * @returns {string} Uppercased string.\n\t */\n\tvar uppercase = function(string) {return isString(string) ? string.toUpperCase() : string;};\n\t\n\t\n\tvar manualLowercase = function(s) {\n\t /* jshint bitwise: false */\n\t return isString(s)\n\t ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})\n\t : s;\n\t};\n\tvar manualUppercase = function(s) {\n\t /* jshint bitwise: false */\n\t return isString(s)\n\t ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})\n\t : s;\n\t};\n\t\n\t\n\t// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish\n\t// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods\n\t// with correct but slower alternatives.\n\tif ('i' !== 'I'.toLowerCase()) {\n\t lowercase = manualLowercase;\n\t uppercase = manualUppercase;\n\t}\n\t\n\t\n\tvar\n\t msie, // holds major version number for IE, or NaN if UA is not IE.\n\t jqLite, // delay binding since jQuery could be loaded after us.\n\t jQuery, // delay binding\n\t slice = [].slice,\n\t splice = [].splice,\n\t push = [].push,\n\t toString = Object.prototype.toString,\n\t getPrototypeOf = Object.getPrototypeOf,\n\t ngMinErr = minErr('ng'),\n\t\n\t /** @name angular */\n\t angular = window.angular || (window.angular = {}),\n\t angularModule,\n\t uid = 0;\n\t\n\t/**\n\t * documentMode is an IE-only property\n\t * http://msdn.microsoft.com/en-us/library/ie/cc196988(v=vs.85).aspx\n\t */\n\tmsie = document.documentMode;\n\t\n\t\n\t/**\n\t * @private\n\t * @param {*} obj\n\t * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,\n\t * String ...)\n\t */\n\tfunction isArrayLike(obj) {\n\t\n\t // `null`, `undefined` and `window` are not array-like\n\t if (obj == null || isWindow(obj)) return false;\n\t\n\t // arrays, strings and jQuery/jqLite objects are array like\n\t // * jqLite is either the jQuery or jqLite constructor function\n\t // * we have to check the existance of jqLite first as this method is called\n\t // via the forEach method when constructing the jqLite object in the first place\n\t if (isArray(obj) || isString(obj) || (jqLite && obj instanceof jqLite)) return true;\n\t\n\t // Support: iOS 8.2 (not reproducible in simulator)\n\t // \"length\" in obj used to prevent JIT error (gh-11508)\n\t var length = \"length\" in Object(obj) && obj.length;\n\t\n\t // NodeList objects (with `item` method) and\n\t // other objects with suitable length characteristics are array-like\n\t return isNumber(length) &&\n\t (length >= 0 && ((length - 1) in obj || obj instanceof Array) || typeof obj.item == 'function');\n\t\n\t}\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.forEach\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * Invokes the `iterator` function once for each item in `obj` collection, which can be either an\n\t * object or an array. The `iterator` function is invoked with `iterator(value, key, obj)`, where `value`\n\t * is the value of an object property or an array element, `key` is the object property key or\n\t * array element index and obj is the `obj` itself. Specifying a `context` for the function is optional.\n\t *\n\t * It is worth noting that `.forEach` does not iterate over inherited properties because it filters\n\t * using the `hasOwnProperty` method.\n\t *\n\t * Unlike ES262's\n\t * [Array.prototype.forEach](http://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.18),\n\t * providing 'undefined' or 'null' values for `obj` will not throw a TypeError, but rather just\n\t * return the value provided.\n\t *\n\t ```js\n\t var values = {name: 'misko', gender: 'male'};\n\t var log = [];\n\t angular.forEach(values, function(value, key) {\n\t this.push(key + ': ' + value);\n\t }, log);\n\t expect(log).toEqual(['name: misko', 'gender: male']);\n\t ```\n\t *\n\t * @param {Object|Array} obj Object to iterate over.\n\t * @param {Function} iterator Iterator function.\n\t * @param {Object=} context Object to become context (`this`) for the iterator function.\n\t * @returns {Object|Array} Reference to `obj`.\n\t */\n\t\n\tfunction forEach(obj, iterator, context) {\n\t var key, length;\n\t if (obj) {\n\t if (isFunction(obj)) {\n\t for (key in obj) {\n\t // Need to check if hasOwnProperty exists,\n\t // as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function\n\t if (key != 'prototype' && key != 'length' && key != 'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) {\n\t iterator.call(context, obj[key], key, obj);\n\t }\n\t }\n\t } else if (isArray(obj) || isArrayLike(obj)) {\n\t var isPrimitive = typeof obj !== 'object';\n\t for (key = 0, length = obj.length; key < length; key++) {\n\t if (isPrimitive || key in obj) {\n\t iterator.call(context, obj[key], key, obj);\n\t }\n\t }\n\t } else if (obj.forEach && obj.forEach !== forEach) {\n\t obj.forEach(iterator, context, obj);\n\t } else if (isBlankObject(obj)) {\n\t // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty\n\t for (key in obj) {\n\t iterator.call(context, obj[key], key, obj);\n\t }\n\t } else if (typeof obj.hasOwnProperty === 'function') {\n\t // Slow path for objects inheriting Object.prototype, hasOwnProperty check needed\n\t for (key in obj) {\n\t if (obj.hasOwnProperty(key)) {\n\t iterator.call(context, obj[key], key, obj);\n\t }\n\t }\n\t } else {\n\t // Slow path for objects which do not have a method `hasOwnProperty`\n\t for (key in obj) {\n\t if (hasOwnProperty.call(obj, key)) {\n\t iterator.call(context, obj[key], key, obj);\n\t }\n\t }\n\t }\n\t }\n\t return obj;\n\t}\n\t\n\tfunction forEachSorted(obj, iterator, context) {\n\t var keys = Object.keys(obj).sort();\n\t for (var i = 0; i < keys.length; i++) {\n\t iterator.call(context, obj[keys[i]], keys[i]);\n\t }\n\t return keys;\n\t}\n\t\n\t\n\t/**\n\t * when using forEach the params are value, key, but it is often useful to have key, value.\n\t * @param {function(string, *)} iteratorFn\n\t * @returns {function(*, string)}\n\t */\n\tfunction reverseParams(iteratorFn) {\n\t return function(value, key) {iteratorFn(key, value);};\n\t}\n\t\n\t/**\n\t * A consistent way of creating unique IDs in angular.\n\t *\n\t * Using simple numbers allows us to generate 28.6 million unique ids per second for 10 years before\n\t * we hit number precision issues in JavaScript.\n\t *\n\t * Math.pow(2,53) / 60 / 60 / 24 / 365 / 10 = 28.6M\n\t *\n\t * @returns {number} an unique alpha-numeric string\n\t */\n\tfunction nextUid() {\n\t return ++uid;\n\t}\n\t\n\t\n\t/**\n\t * Set or clear the hashkey for an object.\n\t * @param obj object\n\t * @param h the hashkey (!truthy to delete the hashkey)\n\t */\n\tfunction setHashKey(obj, h) {\n\t if (h) {\n\t obj.$$hashKey = h;\n\t } else {\n\t delete obj.$$hashKey;\n\t }\n\t}\n\t\n\t\n\tfunction baseExtend(dst, objs, deep) {\n\t var h = dst.$$hashKey;\n\t\n\t for (var i = 0, ii = objs.length; i < ii; ++i) {\n\t var obj = objs[i];\n\t if (!isObject(obj) && !isFunction(obj)) continue;\n\t var keys = Object.keys(obj);\n\t for (var j = 0, jj = keys.length; j < jj; j++) {\n\t var key = keys[j];\n\t var src = obj[key];\n\t\n\t if (deep && isObject(src)) {\n\t if (isDate(src)) {\n\t dst[key] = new Date(src.valueOf());\n\t } else if (isRegExp(src)) {\n\t dst[key] = new RegExp(src);\n\t } else if (src.nodeName) {\n\t dst[key] = src.cloneNode(true);\n\t } else if (isElement(src)) {\n\t dst[key] = src.clone();\n\t } else {\n\t if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {};\n\t baseExtend(dst[key], [src], true);\n\t }\n\t } else {\n\t dst[key] = src;\n\t }\n\t }\n\t }\n\t\n\t setHashKey(dst, h);\n\t return dst;\n\t}\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.extend\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * Extends the destination object `dst` by copying own enumerable properties from the `src` object(s)\n\t * to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so\n\t * by passing an empty object as the target: `var object = angular.extend({}, object1, object2)`.\n\t *\n\t * **Note:** Keep in mind that `angular.extend` does not support recursive merge (deep copy). Use\n\t * {@link angular.merge} for this.\n\t *\n\t * @param {Object} dst Destination object.\n\t * @param {...Object} src Source object(s).\n\t * @returns {Object} Reference to `dst`.\n\t */\n\tfunction extend(dst) {\n\t return baseExtend(dst, slice.call(arguments, 1), false);\n\t}\n\t\n\t\n\t/**\n\t* @ngdoc function\n\t* @name angular.merge\n\t* @module ng\n\t* @kind function\n\t*\n\t* @description\n\t* Deeply extends the destination object `dst` by copying own enumerable properties from the `src` object(s)\n\t* to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so\n\t* by passing an empty object as the target: `var object = angular.merge({}, object1, object2)`.\n\t*\n\t* Unlike {@link angular.extend extend()}, `merge()` recursively descends into object properties of source\n\t* objects, performing a deep copy.\n\t*\n\t* @param {Object} dst Destination object.\n\t* @param {...Object} src Source object(s).\n\t* @returns {Object} Reference to `dst`.\n\t*/\n\tfunction merge(dst) {\n\t return baseExtend(dst, slice.call(arguments, 1), true);\n\t}\n\t\n\t\n\t\n\tfunction toInt(str) {\n\t return parseInt(str, 10);\n\t}\n\t\n\t\n\tfunction inherit(parent, extra) {\n\t return extend(Object.create(parent), extra);\n\t}\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.noop\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * A function that performs no operations. This function can be useful when writing code in the\n\t * functional style.\n\t ```js\n\t function foo(callback) {\n\t var result = calculateResult();\n\t (callback || angular.noop)(result);\n\t }\n\t ```\n\t */\n\tfunction noop() {}\n\tnoop.$inject = [];\n\t\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.identity\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * A function that returns its first argument. This function is useful when writing code in the\n\t * functional style.\n\t *\n\t ```js\n\t function transformer(transformationFn, value) {\n\t return (transformationFn || angular.identity)(value);\n\t };\n\t\n\t // E.g.\n\t function getResult(fn, input) {\n\t return (fn || angular.identity)(input);\n\t };\n\t\n\t getResult(function(n) { return n * 2; }, 21); // returns 42\n\t getResult(null, 21); // returns 21\n\t getResult(undefined, 21); // returns 21\n\t ```\n\t *\n\t * @param {*} value to be returned.\n\t * @returns {*} the value passed in.\n\t */\n\tfunction identity($) {return $;}\n\tidentity.$inject = [];\n\t\n\t\n\tfunction valueFn(value) {return function() {return value;};}\n\t\n\tfunction hasCustomToString(obj) {\n\t return isFunction(obj.toString) && obj.toString !== toString;\n\t}\n\t\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.isUndefined\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * Determines if a reference is undefined.\n\t *\n\t * @param {*} value Reference to check.\n\t * @returns {boolean} True if `value` is undefined.\n\t */\n\tfunction isUndefined(value) {return typeof value === 'undefined';}\n\t\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.isDefined\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * Determines if a reference is defined.\n\t *\n\t * @param {*} value Reference to check.\n\t * @returns {boolean} True if `value` is defined.\n\t */\n\tfunction isDefined(value) {return typeof value !== 'undefined';}\n\t\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.isObject\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not\n\t * considered to be objects. Note that JavaScript arrays are objects.\n\t *\n\t * @param {*} value Reference to check.\n\t * @returns {boolean} True if `value` is an `Object` but not `null`.\n\t */\n\tfunction isObject(value) {\n\t // http://jsperf.com/isobject4\n\t return value !== null && typeof value === 'object';\n\t}\n\t\n\t\n\t/**\n\t * Determine if a value is an object with a null prototype\n\t *\n\t * @returns {boolean} True if `value` is an `Object` with a null prototype\n\t */\n\tfunction isBlankObject(value) {\n\t return value !== null && typeof value === 'object' && !getPrototypeOf(value);\n\t}\n\t\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.isString\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * Determines if a reference is a `String`.\n\t *\n\t * @param {*} value Reference to check.\n\t * @returns {boolean} True if `value` is a `String`.\n\t */\n\tfunction isString(value) {return typeof value === 'string';}\n\t\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.isNumber\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * Determines if a reference is a `Number`.\n\t *\n\t * This includes the \"special\" numbers `NaN`, `+Infinity` and `-Infinity`.\n\t *\n\t * If you wish to exclude these then you can use the native\n\t * [`isFinite'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite)\n\t * method.\n\t *\n\t * @param {*} value Reference to check.\n\t * @returns {boolean} True if `value` is a `Number`.\n\t */\n\tfunction isNumber(value) {return typeof value === 'number';}\n\t\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.isDate\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * Determines if a value is a date.\n\t *\n\t * @param {*} value Reference to check.\n\t * @returns {boolean} True if `value` is a `Date`.\n\t */\n\tfunction isDate(value) {\n\t return toString.call(value) === '[object Date]';\n\t}\n\t\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.isArray\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * Determines if a reference is an `Array`.\n\t *\n\t * @param {*} value Reference to check.\n\t * @returns {boolean} True if `value` is an `Array`.\n\t */\n\tvar isArray = Array.isArray;\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.isFunction\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * Determines if a reference is a `Function`.\n\t *\n\t * @param {*} value Reference to check.\n\t * @returns {boolean} True if `value` is a `Function`.\n\t */\n\tfunction isFunction(value) {return typeof value === 'function';}\n\t\n\t\n\t/**\n\t * Determines if a value is a regular expression object.\n\t *\n\t * @private\n\t * @param {*} value Reference to check.\n\t * @returns {boolean} True if `value` is a `RegExp`.\n\t */\n\tfunction isRegExp(value) {\n\t return toString.call(value) === '[object RegExp]';\n\t}\n\t\n\t\n\t/**\n\t * Checks if `obj` is a window object.\n\t *\n\t * @private\n\t * @param {*} obj Object to check\n\t * @returns {boolean} True if `obj` is a window obj.\n\t */\n\tfunction isWindow(obj) {\n\t return obj && obj.window === obj;\n\t}\n\t\n\t\n\tfunction isScope(obj) {\n\t return obj && obj.$evalAsync && obj.$watch;\n\t}\n\t\n\t\n\tfunction isFile(obj) {\n\t return toString.call(obj) === '[object File]';\n\t}\n\t\n\t\n\tfunction isFormData(obj) {\n\t return toString.call(obj) === '[object FormData]';\n\t}\n\t\n\t\n\tfunction isBlob(obj) {\n\t return toString.call(obj) === '[object Blob]';\n\t}\n\t\n\t\n\tfunction isBoolean(value) {\n\t return typeof value === 'boolean';\n\t}\n\t\n\t\n\tfunction isPromiseLike(obj) {\n\t return obj && isFunction(obj.then);\n\t}\n\t\n\t\n\tvar TYPED_ARRAY_REGEXP = /^\\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\\]$/;\n\tfunction isTypedArray(value) {\n\t return value && isNumber(value.length) && TYPED_ARRAY_REGEXP.test(toString.call(value));\n\t}\n\t\n\t\n\tvar trim = function(value) {\n\t return isString(value) ? value.trim() : value;\n\t};\n\t\n\t// Copied from:\n\t// http://docs.closure-library.googlecode.com/git/local_closure_goog_string_string.js.source.html#line1021\n\t// Prereq: s is a string.\n\tvar escapeForRegexp = function(s) {\n\t return s.replace(/([-()\\[\\]{}+?*.$\\^|,:#<!\\\\])/g, '\\\\$1').\n\t replace(/\\x08/g, '\\\\x08');\n\t};\n\t\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.isElement\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * Determines if a reference is a DOM element (or wrapped jQuery element).\n\t *\n\t * @param {*} value Reference to check.\n\t * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).\n\t */\n\tfunction isElement(node) {\n\t return !!(node &&\n\t (node.nodeName // we are a direct element\n\t || (node.prop && node.attr && node.find))); // we have an on and find method part of jQuery API\n\t}\n\t\n\t/**\n\t * @param str 'key1,key2,...'\n\t * @returns {object} in the form of {key1:true, key2:true, ...}\n\t */\n\tfunction makeMap(str) {\n\t var obj = {}, items = str.split(','), i;\n\t for (i = 0; i < items.length; i++) {\n\t obj[items[i]] = true;\n\t }\n\t return obj;\n\t}\n\t\n\t\n\tfunction nodeName_(element) {\n\t return lowercase(element.nodeName || (element[0] && element[0].nodeName));\n\t}\n\t\n\tfunction includes(array, obj) {\n\t return Array.prototype.indexOf.call(array, obj) != -1;\n\t}\n\t\n\tfunction arrayRemove(array, value) {\n\t var index = array.indexOf(value);\n\t if (index >= 0) {\n\t array.splice(index, 1);\n\t }\n\t return index;\n\t}\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.copy\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * Creates a deep copy of `source`, which should be an object or an array.\n\t *\n\t * * If no destination is supplied, a copy of the object or array is created.\n\t * * If a destination is provided, all of its elements (for arrays) or properties (for objects)\n\t * are deleted and then all elements/properties from the source are copied to it.\n\t * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.\n\t * * If `source` is identical to 'destination' an exception will be thrown.\n\t *\n\t * @param {*} source The source that will be used to make a copy.\n\t * Can be any type, including primitives, `null`, and `undefined`.\n\t * @param {(Object|Array)=} destination Destination into which the source is copied. If\n\t * provided, must be of the same type as `source`.\n\t * @returns {*} The copy or updated `destination`, if `destination` was specified.\n\t *\n\t * @example\n\t <example module=\"copyExample\">\n\t <file name=\"index.html\">\n\t <div ng-controller=\"ExampleController\">\n\t <form novalidate class=\"simple-form\">\n\t Name: <input type=\"text\" ng-model=\"user.name\" /><br />\n\t E-mail: <input type=\"email\" ng-model=\"user.email\" /><br />\n\t Gender: <input type=\"radio\" ng-model=\"user.gender\" value=\"male\" />male\n\t <input type=\"radio\" ng-model=\"user.gender\" value=\"female\" />female<br />\n\t <button ng-click=\"reset()\">RESET</button>\n\t <button ng-click=\"update(user)\">SAVE</button>\n\t </form>\n\t <pre>form = {{user | json}}</pre>\n\t <pre>master = {{master | json}}</pre>\n\t </div>\n\t\n\t <script>\n\t angular.module('copyExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.master= {};\n\t\n\t $scope.update = function(user) {\n\t // Example with 1 argument\n\t $scope.master= angular.copy(user);\n\t };\n\t\n\t $scope.reset = function() {\n\t // Example with 2 arguments\n\t angular.copy($scope.master, $scope.user);\n\t };\n\t\n\t $scope.reset();\n\t }]);\n\t </script>\n\t </file>\n\t </example>\n\t */\n\tfunction copy(source, destination) {\n\t var stackSource = [];\n\t var stackDest = [];\n\t\n\t if (destination) {\n\t if (isTypedArray(destination)) {\n\t throw ngMinErr('cpta', \"Can't copy! TypedArray destination cannot be mutated.\");\n\t }\n\t if (source === destination) {\n\t throw ngMinErr('cpi', \"Can't copy! Source and destination are identical.\");\n\t }\n\t\n\t // Empty the destination object\n\t if (isArray(destination)) {\n\t destination.length = 0;\n\t } else {\n\t forEach(destination, function(value, key) {\n\t if (key !== '$$hashKey') {\n\t delete destination[key];\n\t }\n\t });\n\t }\n\t\n\t stackSource.push(source);\n\t stackDest.push(destination);\n\t return copyRecurse(source, destination);\n\t }\n\t\n\t return copyElement(source);\n\t\n\t function copyRecurse(source, destination) {\n\t var h = destination.$$hashKey;\n\t var result, key;\n\t if (isArray(source)) {\n\t for (var i = 0, ii = source.length; i < ii; i++) {\n\t destination.push(copyElement(source[i]));\n\t }\n\t } else if (isBlankObject(source)) {\n\t // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty\n\t for (key in source) {\n\t destination[key] = copyElement(source[key]);\n\t }\n\t } else if (source && typeof source.hasOwnProperty === 'function') {\n\t // Slow path, which must rely on hasOwnProperty\n\t for (key in source) {\n\t if (source.hasOwnProperty(key)) {\n\t destination[key] = copyElement(source[key]);\n\t }\n\t }\n\t } else {\n\t // Slowest path --- hasOwnProperty can't be called as a method\n\t for (key in source) {\n\t if (hasOwnProperty.call(source, key)) {\n\t destination[key] = copyElement(source[key]);\n\t }\n\t }\n\t }\n\t setHashKey(destination, h);\n\t return destination;\n\t }\n\t\n\t function copyElement(source) {\n\t // Simple values\n\t if (!isObject(source)) {\n\t return source;\n\t }\n\t\n\t // Already copied values\n\t var index = stackSource.indexOf(source);\n\t if (index !== -1) {\n\t return stackDest[index];\n\t }\n\t\n\t if (isWindow(source) || isScope(source)) {\n\t throw ngMinErr('cpws',\n\t \"Can't copy! Making copies of Window or Scope instances is not supported.\");\n\t }\n\t\n\t var needsRecurse = false;\n\t var destination;\n\t\n\t if (isArray(source)) {\n\t destination = [];\n\t needsRecurse = true;\n\t } else if (isTypedArray(source)) {\n\t destination = new source.constructor(source);\n\t } else if (isDate(source)) {\n\t destination = new Date(source.getTime());\n\t } else if (isRegExp(source)) {\n\t destination = new RegExp(source.source, source.toString().match(/[^\\/]*$/)[0]);\n\t destination.lastIndex = source.lastIndex;\n\t } else if (isBlob(source)) {\n\t destination = new source.constructor([source], {type: source.type});\n\t } else if (isFunction(source.cloneNode)) {\n\t destination = source.cloneNode(true);\n\t } else {\n\t destination = Object.create(getPrototypeOf(source));\n\t needsRecurse = true;\n\t }\n\t\n\t stackSource.push(source);\n\t stackDest.push(destination);\n\t\n\t return needsRecurse\n\t ? copyRecurse(source, destination)\n\t : destination;\n\t }\n\t}\n\t\n\t/**\n\t * Creates a shallow copy of an object, an array or a primitive.\n\t *\n\t * Assumes that there are no proto properties for objects.\n\t */\n\tfunction shallowCopy(src, dst) {\n\t if (isArray(src)) {\n\t dst = dst || [];\n\t\n\t for (var i = 0, ii = src.length; i < ii; i++) {\n\t dst[i] = src[i];\n\t }\n\t } else if (isObject(src)) {\n\t dst = dst || {};\n\t\n\t for (var key in src) {\n\t if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {\n\t dst[key] = src[key];\n\t }\n\t }\n\t }\n\t\n\t return dst || src;\n\t}\n\t\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.equals\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * Determines if two objects or two values are equivalent. Supports value types, regular\n\t * expressions, arrays and objects.\n\t *\n\t * Two objects or values are considered equivalent if at least one of the following is true:\n\t *\n\t * * Both objects or values pass `===` comparison.\n\t * * Both objects or values are of the same type and all of their properties are equal by\n\t * comparing them with `angular.equals`.\n\t * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)\n\t * * Both values represent the same regular expression (In JavaScript,\n\t * /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual\n\t * representation matches).\n\t *\n\t * During a property comparison, properties of `function` type and properties with names\n\t * that begin with `$` are ignored.\n\t *\n\t * Scope and DOMWindow objects are being compared only by identify (`===`).\n\t *\n\t * @param {*} o1 Object or value to compare.\n\t * @param {*} o2 Object or value to compare.\n\t * @returns {boolean} True if arguments are equal.\n\t */\n\tfunction equals(o1, o2) {\n\t if (o1 === o2) return true;\n\t if (o1 === null || o2 === null) return false;\n\t if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN\n\t var t1 = typeof o1, t2 = typeof o2, length, key, keySet;\n\t if (t1 == t2) {\n\t if (t1 == 'object') {\n\t if (isArray(o1)) {\n\t if (!isArray(o2)) return false;\n\t if ((length = o1.length) == o2.length) {\n\t for (key = 0; key < length; key++) {\n\t if (!equals(o1[key], o2[key])) return false;\n\t }\n\t return true;\n\t }\n\t } else if (isDate(o1)) {\n\t if (!isDate(o2)) return false;\n\t return equals(o1.getTime(), o2.getTime());\n\t } else if (isRegExp(o1)) {\n\t return isRegExp(o2) ? o1.toString() == o2.toString() : false;\n\t } else {\n\t if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) ||\n\t isArray(o2) || isDate(o2) || isRegExp(o2)) return false;\n\t keySet = createMap();\n\t for (key in o1) {\n\t if (key.charAt(0) === '$' || isFunction(o1[key])) continue;\n\t if (!equals(o1[key], o2[key])) return false;\n\t keySet[key] = true;\n\t }\n\t for (key in o2) {\n\t if (!(key in keySet) &&\n\t key.charAt(0) !== '$' &&\n\t isDefined(o2[key]) &&\n\t !isFunction(o2[key])) return false;\n\t }\n\t return true;\n\t }\n\t }\n\t }\n\t return false;\n\t}\n\t\n\tvar csp = function() {\n\t if (!isDefined(csp.rules)) {\n\t\n\t\n\t var ngCspElement = (document.querySelector('[ng-csp]') ||\n\t document.querySelector('[data-ng-csp]'));\n\t\n\t if (ngCspElement) {\n\t var ngCspAttribute = ngCspElement.getAttribute('ng-csp') ||\n\t ngCspElement.getAttribute('data-ng-csp');\n\t csp.rules = {\n\t noUnsafeEval: !ngCspAttribute || (ngCspAttribute.indexOf('no-unsafe-eval') !== -1),\n\t noInlineStyle: !ngCspAttribute || (ngCspAttribute.indexOf('no-inline-style') !== -1)\n\t };\n\t } else {\n\t csp.rules = {\n\t noUnsafeEval: noUnsafeEval(),\n\t noInlineStyle: false\n\t };\n\t }\n\t }\n\t\n\t return csp.rules;\n\t\n\t function noUnsafeEval() {\n\t try {\n\t /* jshint -W031, -W054 */\n\t new Function('');\n\t /* jshint +W031, +W054 */\n\t return false;\n\t } catch (e) {\n\t return true;\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * @ngdoc directive\n\t * @module ng\n\t * @name ngJq\n\t *\n\t * @element ANY\n\t * @param {string=} ngJq the name of the library available under `window`\n\t * to be used for angular.element\n\t * @description\n\t * Use this directive to force the angular.element library. This should be\n\t * used to force either jqLite by leaving ng-jq blank or setting the name of\n\t * the jquery variable under window (eg. jQuery).\n\t *\n\t * Since angular looks for this directive when it is loaded (doesn't wait for the\n\t * DOMContentLoaded event), it must be placed on an element that comes before the script\n\t * which loads angular. Also, only the first instance of `ng-jq` will be used and all\n\t * others ignored.\n\t *\n\t * @example\n\t * This example shows how to force jqLite using the `ngJq` directive to the `html` tag.\n\t ```html\n\t <!doctype html>\n\t <html ng-app ng-jq>\n\t ...\n\t ...\n\t </html>\n\t ```\n\t * @example\n\t * This example shows how to use a jQuery based library of a different name.\n\t * The library name must be available at the top most 'window'.\n\t ```html\n\t <!doctype html>\n\t <html ng-app ng-jq=\"jQueryLib\">\n\t ...\n\t ...\n\t </html>\n\t ```\n\t */\n\tvar jq = function() {\n\t if (isDefined(jq.name_)) return jq.name_;\n\t var el;\n\t var i, ii = ngAttrPrefixes.length, prefix, name;\n\t for (i = 0; i < ii; ++i) {\n\t prefix = ngAttrPrefixes[i];\n\t if (el = document.querySelector('[' + prefix.replace(':', '\\\\:') + 'jq]')) {\n\t name = el.getAttribute(prefix + 'jq');\n\t break;\n\t }\n\t }\n\t\n\t return (jq.name_ = name);\n\t};\n\t\n\tfunction concat(array1, array2, index) {\n\t return array1.concat(slice.call(array2, index));\n\t}\n\t\n\tfunction sliceArgs(args, startIndex) {\n\t return slice.call(args, startIndex || 0);\n\t}\n\t\n\t\n\t/* jshint -W101 */\n\t/**\n\t * @ngdoc function\n\t * @name angular.bind\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for\n\t * `fn`). You can supply optional `args` that are prebound to the function. This feature is also\n\t * known as [partial application](http://en.wikipedia.org/wiki/Partial_application), as\n\t * distinguished from [function currying](http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application).\n\t *\n\t * @param {Object} self Context which `fn` should be evaluated in.\n\t * @param {function()} fn Function to be bound.\n\t * @param {...*} args Optional arguments to be prebound to the `fn` function call.\n\t * @returns {function()} Function that wraps the `fn` with all the specified bindings.\n\t */\n\t/* jshint +W101 */\n\tfunction bind(self, fn) {\n\t var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];\n\t if (isFunction(fn) && !(fn instanceof RegExp)) {\n\t return curryArgs.length\n\t ? function() {\n\t return arguments.length\n\t ? fn.apply(self, concat(curryArgs, arguments, 0))\n\t : fn.apply(self, curryArgs);\n\t }\n\t : function() {\n\t return arguments.length\n\t ? fn.apply(self, arguments)\n\t : fn.call(self);\n\t };\n\t } else {\n\t // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)\n\t return fn;\n\t }\n\t}\n\t\n\t\n\tfunction toJsonReplacer(key, value) {\n\t var val = value;\n\t\n\t if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') {\n\t val = undefined;\n\t } else if (isWindow(value)) {\n\t val = '$WINDOW';\n\t } else if (value && document === value) {\n\t val = '$DOCUMENT';\n\t } else if (isScope(value)) {\n\t val = '$SCOPE';\n\t }\n\t\n\t return val;\n\t}\n\t\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.toJson\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * Serializes input into a JSON-formatted string. Properties with leading $$ characters will be\n\t * stripped since angular uses this notation internally.\n\t *\n\t * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.\n\t * @param {boolean|number} [pretty=2] If set to true, the JSON output will contain newlines and whitespace.\n\t * If set to an integer, the JSON output will contain that many spaces per indentation.\n\t * @returns {string|undefined} JSON-ified string representing `obj`.\n\t */\n\tfunction toJson(obj, pretty) {\n\t if (isUndefined(obj)) return undefined;\n\t if (!isNumber(pretty)) {\n\t pretty = pretty ? 2 : null;\n\t }\n\t return JSON.stringify(obj, toJsonReplacer, pretty);\n\t}\n\t\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.fromJson\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * Deserializes a JSON string.\n\t *\n\t * @param {string} json JSON string to deserialize.\n\t * @returns {Object|Array|string|number} Deserialized JSON string.\n\t */\n\tfunction fromJson(json) {\n\t return isString(json)\n\t ? JSON.parse(json)\n\t : json;\n\t}\n\t\n\t\n\tvar ALL_COLONS = /:/g;\n\tfunction timezoneToOffset(timezone, fallback) {\n\t // IE/Edge do not \"understand\" colon (`:`) in timezone\n\t timezone = timezone.replace(ALL_COLONS, '');\n\t var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;\n\t return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;\n\t}\n\t\n\t\n\tfunction addDateMinutes(date, minutes) {\n\t date = new Date(date.getTime());\n\t date.setMinutes(date.getMinutes() + minutes);\n\t return date;\n\t}\n\t\n\t\n\tfunction convertTimezoneToLocal(date, timezone, reverse) {\n\t reverse = reverse ? -1 : 1;\n\t var dateTimezoneOffset = date.getTimezoneOffset();\n\t var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n\t return addDateMinutes(date, reverse * (timezoneOffset - dateTimezoneOffset));\n\t}\n\t\n\t\n\t/**\n\t * @returns {string} Returns the string representation of the element.\n\t */\n\tfunction startingTag(element) {\n\t element = jqLite(element).clone();\n\t try {\n\t // turns out IE does not let you set .html() on elements which\n\t // are not allowed to have children. So we just ignore it.\n\t element.empty();\n\t } catch (e) {}\n\t var elemHtml = jqLite('<div>').append(element).html();\n\t try {\n\t return element[0].nodeType === NODE_TYPE_TEXT ? lowercase(elemHtml) :\n\t elemHtml.\n\t match(/^(<[^>]+>)/)[1].\n\t replace(/^<([\\w\\-]+)/, function(match, nodeName) {return '<' + lowercase(nodeName);});\n\t } catch (e) {\n\t return lowercase(elemHtml);\n\t }\n\t\n\t}\n\t\n\t\n\t/////////////////////////////////////////////////\n\t\n\t/**\n\t * Tries to decode the URI component without throwing an exception.\n\t *\n\t * @private\n\t * @param str value potential URI component to check.\n\t * @returns {boolean} True if `value` can be decoded\n\t * with the decodeURIComponent function.\n\t */\n\tfunction tryDecodeURIComponent(value) {\n\t try {\n\t return decodeURIComponent(value);\n\t } catch (e) {\n\t // Ignore any invalid uri component\n\t }\n\t}\n\t\n\t\n\t/**\n\t * Parses an escaped url query string into key-value pairs.\n\t * @returns {Object.<string,boolean|Array>}\n\t */\n\tfunction parseKeyValue(/**string*/keyValue) {\n\t var obj = {};\n\t forEach((keyValue || \"\").split('&'), function(keyValue) {\n\t var splitPoint, key, val;\n\t if (keyValue) {\n\t key = keyValue = keyValue.replace(/\\+/g,'%20');\n\t splitPoint = keyValue.indexOf('=');\n\t if (splitPoint !== -1) {\n\t key = keyValue.substring(0, splitPoint);\n\t val = keyValue.substring(splitPoint + 1);\n\t }\n\t key = tryDecodeURIComponent(key);\n\t if (isDefined(key)) {\n\t val = isDefined(val) ? tryDecodeURIComponent(val) : true;\n\t if (!hasOwnProperty.call(obj, key)) {\n\t obj[key] = val;\n\t } else if (isArray(obj[key])) {\n\t obj[key].push(val);\n\t } else {\n\t obj[key] = [obj[key],val];\n\t }\n\t }\n\t }\n\t });\n\t return obj;\n\t}\n\t\n\tfunction toKeyValue(obj) {\n\t var parts = [];\n\t forEach(obj, function(value, key) {\n\t if (isArray(value)) {\n\t forEach(value, function(arrayValue) {\n\t parts.push(encodeUriQuery(key, true) +\n\t (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));\n\t });\n\t } else {\n\t parts.push(encodeUriQuery(key, true) +\n\t (value === true ? '' : '=' + encodeUriQuery(value, true)));\n\t }\n\t });\n\t return parts.length ? parts.join('&') : '';\n\t}\n\t\n\t\n\t/**\n\t * We need our custom method because encodeURIComponent is too aggressive and doesn't follow\n\t * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path\n\t * segments:\n\t * segment = *pchar\n\t * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n\t * pct-encoded = \"%\" HEXDIG HEXDIG\n\t * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n\t * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n\t * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n\t */\n\tfunction encodeUriSegment(val) {\n\t return encodeUriQuery(val, true).\n\t replace(/%26/gi, '&').\n\t replace(/%3D/gi, '=').\n\t replace(/%2B/gi, '+');\n\t}\n\t\n\t\n\t/**\n\t * This method is intended for encoding *key* or *value* parts of query component. We need a custom\n\t * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be\n\t * encoded per http://tools.ietf.org/html/rfc3986:\n\t * query = *( pchar / \"/\" / \"?\" )\n\t * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n\t * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n\t * pct-encoded = \"%\" HEXDIG HEXDIG\n\t * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n\t * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n\t */\n\tfunction encodeUriQuery(val, pctEncodeSpaces) {\n\t return encodeURIComponent(val).\n\t replace(/%40/gi, '@').\n\t replace(/%3A/gi, ':').\n\t replace(/%24/g, '$').\n\t replace(/%2C/gi, ',').\n\t replace(/%3B/gi, ';').\n\t replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));\n\t}\n\t\n\tvar ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];\n\t\n\tfunction getNgAttribute(element, ngAttr) {\n\t var attr, i, ii = ngAttrPrefixes.length;\n\t for (i = 0; i < ii; ++i) {\n\t attr = ngAttrPrefixes[i] + ngAttr;\n\t if (isString(attr = element.getAttribute(attr))) {\n\t return attr;\n\t }\n\t }\n\t return null;\n\t}\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngApp\n\t * @module ng\n\t *\n\t * @element ANY\n\t * @param {angular.Module} ngApp an optional application\n\t * {@link angular.module module} name to load.\n\t * @param {boolean=} ngStrictDi if this attribute is present on the app element, the injector will be\n\t * created in \"strict-di\" mode. This means that the application will fail to invoke functions which\n\t * do not use explicit function annotation (and are thus unsuitable for minification), as described\n\t * in {@link guide/di the Dependency Injection guide}, and useful debugging info will assist in\n\t * tracking down the root of these bugs.\n\t *\n\t * @description\n\t *\n\t * Use this directive to **auto-bootstrap** an AngularJS application. The `ngApp` directive\n\t * designates the **root element** of the application and is typically placed near the root element\n\t * of the page - e.g. on the `<body>` or `<html>` tags.\n\t *\n\t * Only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`\n\t * found in the document will be used to define the root element to auto-bootstrap as an\n\t * application. To run multiple applications in an HTML document you must manually bootstrap them using\n\t * {@link angular.bootstrap} instead. AngularJS applications cannot be nested within each other.\n\t *\n\t * You can specify an **AngularJS module** to be used as the root module for the application. This\n\t * module will be loaded into the {@link auto.$injector} when the application is bootstrapped. It\n\t * should contain the application code needed or have dependencies on other modules that will\n\t * contain the code. See {@link angular.module} for more information.\n\t *\n\t * In the example below if the `ngApp` directive were not placed on the `html` element then the\n\t * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`\n\t * would not be resolved to `3`.\n\t *\n\t * `ngApp` is the easiest, and most common way to bootstrap an application.\n\t *\n\t <example module=\"ngAppDemo\">\n\t <file name=\"index.html\">\n\t <div ng-controller=\"ngAppDemoController\">\n\t I can add: {{a}} + {{b}} = {{ a+b }}\n\t </div>\n\t </file>\n\t <file name=\"script.js\">\n\t angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {\n\t $scope.a = 1;\n\t $scope.b = 2;\n\t });\n\t </file>\n\t </example>\n\t *\n\t * Using `ngStrictDi`, you would see something like this:\n\t *\n\t <example ng-app-included=\"true\">\n\t <file name=\"index.html\">\n\t <div ng-app=\"ngAppStrictDemo\" ng-strict-di>\n\t <div ng-controller=\"GoodController1\">\n\t I can add: {{a}} + {{b}} = {{ a+b }}\n\t\n\t <p>This renders because the controller does not fail to\n\t instantiate, by using explicit annotation style (see\n\t script.js for details)\n\t </p>\n\t </div>\n\t\n\t <div ng-controller=\"GoodController2\">\n\t Name: <input ng-model=\"name\"><br />\n\t Hello, {{name}}!\n\t\n\t <p>This renders because the controller does not fail to\n\t instantiate, by using explicit annotation style\n\t (see script.js for details)\n\t </p>\n\t </div>\n\t\n\t <div ng-controller=\"BadController\">\n\t I can add: {{a}} + {{b}} = {{ a+b }}\n\t\n\t <p>The controller could not be instantiated, due to relying\n\t on automatic function annotations (which are disabled in\n\t strict mode). As such, the content of this section is not\n\t interpolated, and there should be an error in your web console.\n\t </p>\n\t </div>\n\t </div>\n\t </file>\n\t <file name=\"script.js\">\n\t angular.module('ngAppStrictDemo', [])\n\t // BadController will fail to instantiate, due to relying on automatic function annotation,\n\t // rather than an explicit annotation\n\t .controller('BadController', function($scope) {\n\t $scope.a = 1;\n\t $scope.b = 2;\n\t })\n\t // Unlike BadController, GoodController1 and GoodController2 will not fail to be instantiated,\n\t // due to using explicit annotations using the array style and $inject property, respectively.\n\t .controller('GoodController1', ['$scope', function($scope) {\n\t $scope.a = 1;\n\t $scope.b = 2;\n\t }])\n\t .controller('GoodController2', GoodController2);\n\t function GoodController2($scope) {\n\t $scope.name = \"World\";\n\t }\n\t GoodController2.$inject = ['$scope'];\n\t </file>\n\t <file name=\"style.css\">\n\t div[ng-controller] {\n\t margin-bottom: 1em;\n\t -webkit-border-radius: 4px;\n\t border-radius: 4px;\n\t border: 1px solid;\n\t padding: .5em;\n\t }\n\t div[ng-controller^=Good] {\n\t border-color: #d6e9c6;\n\t background-color: #dff0d8;\n\t color: #3c763d;\n\t }\n\t div[ng-controller^=Bad] {\n\t border-color: #ebccd1;\n\t background-color: #f2dede;\n\t color: #a94442;\n\t margin-bottom: 0;\n\t }\n\t </file>\n\t </example>\n\t */\n\tfunction angularInit(element, bootstrap) {\n\t var appElement,\n\t module,\n\t config = {};\n\t\n\t // The element `element` has priority over any other element\n\t forEach(ngAttrPrefixes, function(prefix) {\n\t var name = prefix + 'app';\n\t\n\t if (!appElement && element.hasAttribute && element.hasAttribute(name)) {\n\t appElement = element;\n\t module = element.getAttribute(name);\n\t }\n\t });\n\t forEach(ngAttrPrefixes, function(prefix) {\n\t var name = prefix + 'app';\n\t var candidate;\n\t\n\t if (!appElement && (candidate = element.querySelector('[' + name.replace(':', '\\\\:') + ']'))) {\n\t appElement = candidate;\n\t module = candidate.getAttribute(name);\n\t }\n\t });\n\t if (appElement) {\n\t config.strictDi = getNgAttribute(appElement, \"strict-di\") !== null;\n\t bootstrap(appElement, module ? [module] : [], config);\n\t }\n\t}\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.bootstrap\n\t * @module ng\n\t * @description\n\t * Use this function to manually start up angular application.\n\t *\n\t * See: {@link guide/bootstrap Bootstrap}\n\t *\n\t * Note that Protractor based end-to-end tests cannot use this function to bootstrap manually.\n\t * They must use {@link ng.directive:ngApp ngApp}.\n\t *\n\t * Angular will detect if it has been loaded into the browser more than once and only allow the\n\t * first loaded script to be bootstrapped and will report a warning to the browser console for\n\t * each of the subsequent scripts. This prevents strange results in applications, where otherwise\n\t * multiple instances of Angular try to work on the DOM.\n\t *\n\t * ```html\n\t * <!doctype html>\n\t * <html>\n\t * <body>\n\t * <div ng-controller=\"WelcomeController\">\n\t * {{greeting}}\n\t * </div>\n\t *\n\t * <script src=\"angular.js\"></script>\n\t * <script>\n\t * var app = angular.module('demo', [])\n\t * .controller('WelcomeController', function($scope) {\n\t * $scope.greeting = 'Welcome!';\n\t * });\n\t * angular.bootstrap(document, ['demo']);\n\t * </script>\n\t * </body>\n\t * </html>\n\t * ```\n\t *\n\t * @param {DOMElement} element DOM element which is the root of angular application.\n\t * @param {Array<String|Function|Array>=} modules an array of modules to load into the application.\n\t * Each item in the array should be the name of a predefined module or a (DI annotated)\n\t * function that will be invoked by the injector as a `config` block.\n\t * See: {@link angular.module modules}\n\t * @param {Object=} config an object for defining configuration options for the application. The\n\t * following keys are supported:\n\t *\n\t * * `strictDi` - disable automatic function annotation for the application. This is meant to\n\t * assist in finding bugs which break minified code. Defaults to `false`.\n\t *\n\t * @returns {auto.$injector} Returns the newly created injector for this app.\n\t */\n\tfunction bootstrap(element, modules, config) {\n\t if (!isObject(config)) config = {};\n\t var defaultConfig = {\n\t strictDi: false\n\t };\n\t config = extend(defaultConfig, config);\n\t var doBootstrap = function() {\n\t element = jqLite(element);\n\t\n\t if (element.injector()) {\n\t var tag = (element[0] === document) ? 'document' : startingTag(element);\n\t //Encode angle brackets to prevent input from being sanitized to empty string #8683\n\t throw ngMinErr(\n\t 'btstrpd',\n\t \"App already bootstrapped with this element '{0}'\",\n\t tag.replace(/</,'&lt;').replace(/>/,'&gt;'));\n\t }\n\t\n\t modules = modules || [];\n\t modules.unshift(['$provide', function($provide) {\n\t $provide.value('$rootElement', element);\n\t }]);\n\t\n\t if (config.debugInfoEnabled) {\n\t // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.\n\t modules.push(['$compileProvider', function($compileProvider) {\n\t $compileProvider.debugInfoEnabled(true);\n\t }]);\n\t }\n\t\n\t modules.unshift('ng');\n\t var injector = createInjector(modules, config.strictDi);\n\t injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',\n\t function bootstrapApply(scope, element, compile, injector) {\n\t scope.$apply(function() {\n\t element.data('$injector', injector);\n\t compile(element)(scope);\n\t });\n\t }]\n\t );\n\t return injector;\n\t };\n\t\n\t var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;\n\t var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;\n\t\n\t if (window && NG_ENABLE_DEBUG_INFO.test(window.name)) {\n\t config.debugInfoEnabled = true;\n\t window.name = window.name.replace(NG_ENABLE_DEBUG_INFO, '');\n\t }\n\t\n\t if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {\n\t return doBootstrap();\n\t }\n\t\n\t window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');\n\t angular.resumeBootstrap = function(extraModules) {\n\t forEach(extraModules, function(module) {\n\t modules.push(module);\n\t });\n\t return doBootstrap();\n\t };\n\t\n\t if (isFunction(angular.resumeDeferredBootstrap)) {\n\t angular.resumeDeferredBootstrap();\n\t }\n\t}\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.reloadWithDebugInfo\n\t * @module ng\n\t * @description\n\t * Use this function to reload the current application with debug information turned on.\n\t * This takes precedence over a call to `$compileProvider.debugInfoEnabled(false)`.\n\t *\n\t * See {@link ng.$compileProvider#debugInfoEnabled} for more.\n\t */\n\tfunction reloadWithDebugInfo() {\n\t window.name = 'NG_ENABLE_DEBUG_INFO!' + window.name;\n\t window.location.reload();\n\t}\n\t\n\t/**\n\t * @name angular.getTestability\n\t * @module ng\n\t * @description\n\t * Get the testability service for the instance of Angular on the given\n\t * element.\n\t * @param {DOMElement} element DOM element which is the root of angular application.\n\t */\n\tfunction getTestability(rootElement) {\n\t var injector = angular.element(rootElement).injector();\n\t if (!injector) {\n\t throw ngMinErr('test',\n\t 'no injector found for element argument to getTestability');\n\t }\n\t return injector.get('$$testability');\n\t}\n\t\n\tvar SNAKE_CASE_REGEXP = /[A-Z]/g;\n\tfunction snake_case(name, separator) {\n\t separator = separator || '_';\n\t return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {\n\t return (pos ? separator : '') + letter.toLowerCase();\n\t });\n\t}\n\t\n\tvar bindJQueryFired = false;\n\tvar skipDestroyOnNextJQueryCleanData;\n\tfunction bindJQuery() {\n\t var originalCleanData;\n\t\n\t if (bindJQueryFired) {\n\t return;\n\t }\n\t\n\t // bind to jQuery if present;\n\t var jqName = jq();\n\t jQuery = isUndefined(jqName) ? window.jQuery : // use jQuery (if present)\n\t !jqName ? undefined : // use jqLite\n\t window[jqName]; // use jQuery specified by `ngJq`\n\t\n\t // Use jQuery if it exists with proper functionality, otherwise default to us.\n\t // Angular 1.2+ requires jQuery 1.7+ for on()/off() support.\n\t // Angular 1.3+ technically requires at least jQuery 2.1+ but it may work with older\n\t // versions. It will not work for sure with jQuery <1.7, though.\n\t if (jQuery && jQuery.fn.on) {\n\t jqLite = jQuery;\n\t extend(jQuery.fn, {\n\t scope: JQLitePrototype.scope,\n\t isolateScope: JQLitePrototype.isolateScope,\n\t controller: JQLitePrototype.controller,\n\t injector: JQLitePrototype.injector,\n\t inheritedData: JQLitePrototype.inheritedData\n\t });\n\t\n\t // All nodes removed from the DOM via various jQuery APIs like .remove()\n\t // are passed through jQuery.cleanData. Monkey-patch this method to fire\n\t // the $destroy event on all removed nodes.\n\t originalCleanData = jQuery.cleanData;\n\t jQuery.cleanData = function(elems) {\n\t var events;\n\t if (!skipDestroyOnNextJQueryCleanData) {\n\t for (var i = 0, elem; (elem = elems[i]) != null; i++) {\n\t events = jQuery._data(elem, \"events\");\n\t if (events && events.$destroy) {\n\t jQuery(elem).triggerHandler('$destroy');\n\t }\n\t }\n\t } else {\n\t skipDestroyOnNextJQueryCleanData = false;\n\t }\n\t originalCleanData(elems);\n\t };\n\t } else {\n\t jqLite = JQLite;\n\t }\n\t\n\t angular.element = jqLite;\n\t\n\t // Prevent double-proxying.\n\t bindJQueryFired = true;\n\t}\n\t\n\t/**\n\t * throw error if the argument is falsy.\n\t */\n\tfunction assertArg(arg, name, reason) {\n\t if (!arg) {\n\t throw ngMinErr('areq', \"Argument '{0}' is {1}\", (name || '?'), (reason || \"required\"));\n\t }\n\t return arg;\n\t}\n\t\n\tfunction assertArgFn(arg, name, acceptArrayAnnotation) {\n\t if (acceptArrayAnnotation && isArray(arg)) {\n\t arg = arg[arg.length - 1];\n\t }\n\t\n\t assertArg(isFunction(arg), name, 'not a function, got ' +\n\t (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));\n\t return arg;\n\t}\n\t\n\t/**\n\t * throw error if the name given is hasOwnProperty\n\t * @param {String} name the name to test\n\t * @param {String} context the context in which the name is used, such as module or directive\n\t */\n\tfunction assertNotHasOwnProperty(name, context) {\n\t if (name === 'hasOwnProperty') {\n\t throw ngMinErr('badname', \"hasOwnProperty is not a valid {0} name\", context);\n\t }\n\t}\n\t\n\t/**\n\t * Return the value accessible from the object by path. Any undefined traversals are ignored\n\t * @param {Object} obj starting object\n\t * @param {String} path path to traverse\n\t * @param {boolean} [bindFnToScope=true]\n\t * @returns {Object} value as accessible by path\n\t */\n\t//TODO(misko): this function needs to be removed\n\tfunction getter(obj, path, bindFnToScope) {\n\t if (!path) return obj;\n\t var keys = path.split('.');\n\t var key;\n\t var lastInstance = obj;\n\t var len = keys.length;\n\t\n\t for (var i = 0; i < len; i++) {\n\t key = keys[i];\n\t if (obj) {\n\t obj = (lastInstance = obj)[key];\n\t }\n\t }\n\t if (!bindFnToScope && isFunction(obj)) {\n\t return bind(lastInstance, obj);\n\t }\n\t return obj;\n\t}\n\t\n\t/**\n\t * Return the DOM siblings between the first and last node in the given array.\n\t * @param {Array} array like object\n\t * @returns {Array} the inputted object or a jqLite collection containing the nodes\n\t */\n\tfunction getBlockNodes(nodes) {\n\t // TODO(perf): update `nodes` instead of creating a new object?\n\t var node = nodes[0];\n\t var endNode = nodes[nodes.length - 1];\n\t var blockNodes;\n\t\n\t for (var i = 1; node !== endNode && (node = node.nextSibling); i++) {\n\t if (blockNodes || nodes[i] !== node) {\n\t if (!blockNodes) {\n\t blockNodes = jqLite(slice.call(nodes, 0, i));\n\t }\n\t blockNodes.push(node);\n\t }\n\t }\n\t\n\t return blockNodes || nodes;\n\t}\n\t\n\t\n\t/**\n\t * Creates a new object without a prototype. This object is useful for lookup without having to\n\t * guard against prototypically inherited properties via hasOwnProperty.\n\t *\n\t * Related micro-benchmarks:\n\t * - http://jsperf.com/object-create2\n\t * - http://jsperf.com/proto-map-lookup/2\n\t * - http://jsperf.com/for-in-vs-object-keys2\n\t *\n\t * @returns {Object}\n\t */\n\tfunction createMap() {\n\t return Object.create(null);\n\t}\n\t\n\tvar NODE_TYPE_ELEMENT = 1;\n\tvar NODE_TYPE_ATTRIBUTE = 2;\n\tvar NODE_TYPE_TEXT = 3;\n\tvar NODE_TYPE_COMMENT = 8;\n\tvar NODE_TYPE_DOCUMENT = 9;\n\tvar NODE_TYPE_DOCUMENT_FRAGMENT = 11;\n\t\n\t/**\n\t * @ngdoc type\n\t * @name angular.Module\n\t * @module ng\n\t * @description\n\t *\n\t * Interface for configuring angular {@link angular.module modules}.\n\t */\n\t\n\tfunction setupModuleLoader(window) {\n\t\n\t var $injectorMinErr = minErr('$injector');\n\t var ngMinErr = minErr('ng');\n\t\n\t function ensure(obj, name, factory) {\n\t return obj[name] || (obj[name] = factory());\n\t }\n\t\n\t var angular = ensure(window, 'angular', Object);\n\t\n\t // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap\n\t angular.$$minErr = angular.$$minErr || minErr;\n\t\n\t return ensure(angular, 'module', function() {\n\t /** @type {Object.<string, angular.Module>} */\n\t var modules = {};\n\t\n\t /**\n\t * @ngdoc function\n\t * @name angular.module\n\t * @module ng\n\t * @description\n\t *\n\t * The `angular.module` is a global place for creating, registering and retrieving Angular\n\t * modules.\n\t * All modules (angular core or 3rd party) that should be available to an application must be\n\t * registered using this mechanism.\n\t *\n\t * Passing one argument retrieves an existing {@link angular.Module},\n\t * whereas passing more than one argument creates a new {@link angular.Module}\n\t *\n\t *\n\t * # Module\n\t *\n\t * A module is a collection of services, directives, controllers, filters, and configuration information.\n\t * `angular.module` is used to configure the {@link auto.$injector $injector}.\n\t *\n\t * ```js\n\t * // Create a new module\n\t * var myModule = angular.module('myModule', []);\n\t *\n\t * // register a new service\n\t * myModule.value('appName', 'MyCoolApp');\n\t *\n\t * // configure existing services inside initialization blocks.\n\t * myModule.config(['$locationProvider', function($locationProvider) {\n\t * // Configure existing providers\n\t * $locationProvider.hashPrefix('!');\n\t * }]);\n\t * ```\n\t *\n\t * Then you can create an injector and load your modules like this:\n\t *\n\t * ```js\n\t * var injector = angular.injector(['ng', 'myModule'])\n\t * ```\n\t *\n\t * However it's more likely that you'll just use\n\t * {@link ng.directive:ngApp ngApp} or\n\t * {@link angular.bootstrap} to simplify this process for you.\n\t *\n\t * @param {!string} name The name of the module to create or retrieve.\n\t * @param {!Array.<string>=} requires If specified then new module is being created. If\n\t * unspecified then the module is being retrieved for further configuration.\n\t * @param {Function=} configFn Optional configuration function for the module. Same as\n\t * {@link angular.Module#config Module#config()}.\n\t * @returns {angular.Module} new module with the {@link angular.Module} api.\n\t */\n\t return function module(name, requires, configFn) {\n\t var assertNotHasOwnProperty = function(name, context) {\n\t if (name === 'hasOwnProperty') {\n\t throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);\n\t }\n\t };\n\t\n\t assertNotHasOwnProperty(name, 'module');\n\t if (requires && modules.hasOwnProperty(name)) {\n\t modules[name] = null;\n\t }\n\t return ensure(modules, name, function() {\n\t if (!requires) {\n\t throw $injectorMinErr('nomod', \"Module '{0}' is not available! You either misspelled \" +\n\t \"the module name or forgot to load it. If registering a module ensure that you \" +\n\t \"specify the dependencies as the second argument.\", name);\n\t }\n\t\n\t /** @type {!Array.<Array.<*>>} */\n\t var invokeQueue = [];\n\t\n\t /** @type {!Array.<Function>} */\n\t var configBlocks = [];\n\t\n\t /** @type {!Array.<Function>} */\n\t var runBlocks = [];\n\t\n\t var config = invokeLater('$injector', 'invoke', 'push', configBlocks);\n\t\n\t /** @type {angular.Module} */\n\t var moduleInstance = {\n\t // Private state\n\t _invokeQueue: invokeQueue,\n\t _configBlocks: configBlocks,\n\t _runBlocks: runBlocks,\n\t\n\t /**\n\t * @ngdoc property\n\t * @name angular.Module#requires\n\t * @module ng\n\t *\n\t * @description\n\t * Holds the list of modules which the injector will load before the current module is\n\t * loaded.\n\t */\n\t requires: requires,\n\t\n\t /**\n\t * @ngdoc property\n\t * @name angular.Module#name\n\t * @module ng\n\t *\n\t * @description\n\t * Name of the module.\n\t */\n\t name: name,\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name angular.Module#provider\n\t * @module ng\n\t * @param {string} name service name\n\t * @param {Function} providerType Construction function for creating new instance of the\n\t * service.\n\t * @description\n\t * See {@link auto.$provide#provider $provide.provider()}.\n\t */\n\t provider: invokeLaterAndSetModuleName('$provide', 'provider'),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name angular.Module#factory\n\t * @module ng\n\t * @param {string} name service name\n\t * @param {Function} providerFunction Function for creating new instance of the service.\n\t * @description\n\t * See {@link auto.$provide#factory $provide.factory()}.\n\t */\n\t factory: invokeLaterAndSetModuleName('$provide', 'factory'),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name angular.Module#service\n\t * @module ng\n\t * @param {string} name service name\n\t * @param {Function} constructor A constructor function that will be instantiated.\n\t * @description\n\t * See {@link auto.$provide#service $provide.service()}.\n\t */\n\t service: invokeLaterAndSetModuleName('$provide', 'service'),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name angular.Module#value\n\t * @module ng\n\t * @param {string} name service name\n\t * @param {*} object Service instance object.\n\t * @description\n\t * See {@link auto.$provide#value $provide.value()}.\n\t */\n\t value: invokeLater('$provide', 'value'),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name angular.Module#constant\n\t * @module ng\n\t * @param {string} name constant name\n\t * @param {*} object Constant value.\n\t * @description\n\t * Because the constants are fixed, they get applied before other provide methods.\n\t * See {@link auto.$provide#constant $provide.constant()}.\n\t */\n\t constant: invokeLater('$provide', 'constant', 'unshift'),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name angular.Module#decorator\n\t * @module ng\n\t * @param {string} name The name of the service to decorate.\n\t * @param {Function} decorFn This function will be invoked when the service needs to be\n\t * instantiated and should return the decorated service instance.\n\t * @description\n\t * See {@link auto.$provide#decorator $provide.decorator()}.\n\t */\n\t decorator: invokeLaterAndSetModuleName('$provide', 'decorator'),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name angular.Module#animation\n\t * @module ng\n\t * @param {string} name animation name\n\t * @param {Function} animationFactory Factory function for creating new instance of an\n\t * animation.\n\t * @description\n\t *\n\t * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.\n\t *\n\t *\n\t * Defines an animation hook that can be later used with\n\t * {@link $animate $animate} service and directives that use this service.\n\t *\n\t * ```js\n\t * module.animation('.animation-name', function($inject1, $inject2) {\n\t * return {\n\t * eventName : function(element, done) {\n\t * //code to run the animation\n\t * //once complete, then run done()\n\t * return function cancellationFunction(element) {\n\t * //code to cancel the animation\n\t * }\n\t * }\n\t * }\n\t * })\n\t * ```\n\t *\n\t * See {@link ng.$animateProvider#register $animateProvider.register()} and\n\t * {@link ngAnimate ngAnimate module} for more information.\n\t */\n\t animation: invokeLaterAndSetModuleName('$animateProvider', 'register'),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name angular.Module#filter\n\t * @module ng\n\t * @param {string} name Filter name - this must be a valid angular expression identifier\n\t * @param {Function} filterFactory Factory function for creating new instance of filter.\n\t * @description\n\t * See {@link ng.$filterProvider#register $filterProvider.register()}.\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.\n\t * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace\n\t * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores\n\t * (`myapp_subsection_filterx`).\n\t * </div>\n\t */\n\t filter: invokeLaterAndSetModuleName('$filterProvider', 'register'),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name angular.Module#controller\n\t * @module ng\n\t * @param {string|Object} name Controller name, or an object map of controllers where the\n\t * keys are the names and the values are the constructors.\n\t * @param {Function} constructor Controller constructor function.\n\t * @description\n\t * See {@link ng.$controllerProvider#register $controllerProvider.register()}.\n\t */\n\t controller: invokeLaterAndSetModuleName('$controllerProvider', 'register'),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name angular.Module#directive\n\t * @module ng\n\t * @param {string|Object} name Directive name, or an object map of directives where the\n\t * keys are the names and the values are the factories.\n\t * @param {Function} directiveFactory Factory function for creating new instance of\n\t * directives.\n\t * @description\n\t * See {@link ng.$compileProvider#directive $compileProvider.directive()}.\n\t */\n\t directive: invokeLaterAndSetModuleName('$compileProvider', 'directive'),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name angular.Module#config\n\t * @module ng\n\t * @param {Function} configFn Execute this function on module load. Useful for service\n\t * configuration.\n\t * @description\n\t * Use this method to register work which needs to be performed on module loading.\n\t * For more about how to configure services, see\n\t * {@link providers#provider-recipe Provider Recipe}.\n\t */\n\t config: config,\n\t\n\t /**\n\t * @ngdoc method\n\t * @name angular.Module#run\n\t * @module ng\n\t * @param {Function} initializationFn Execute this function after injector creation.\n\t * Useful for application initialization.\n\t * @description\n\t * Use this method to register work which should be performed when the injector is done\n\t * loading all modules.\n\t */\n\t run: function(block) {\n\t runBlocks.push(block);\n\t return this;\n\t }\n\t };\n\t\n\t if (configFn) {\n\t config(configFn);\n\t }\n\t\n\t return moduleInstance;\n\t\n\t /**\n\t * @param {string} provider\n\t * @param {string} method\n\t * @param {String=} insertMethod\n\t * @returns {angular.Module}\n\t */\n\t function invokeLater(provider, method, insertMethod, queue) {\n\t if (!queue) queue = invokeQueue;\n\t return function() {\n\t queue[insertMethod || 'push']([provider, method, arguments]);\n\t return moduleInstance;\n\t };\n\t }\n\t\n\t /**\n\t * @param {string} provider\n\t * @param {string} method\n\t * @returns {angular.Module}\n\t */\n\t function invokeLaterAndSetModuleName(provider, method) {\n\t return function(recipeName, factoryFunction) {\n\t if (factoryFunction && isFunction(factoryFunction)) factoryFunction.$$moduleName = name;\n\t invokeQueue.push([provider, method, arguments]);\n\t return moduleInstance;\n\t };\n\t }\n\t });\n\t };\n\t });\n\t\n\t}\n\t\n\t/* global: toDebugString: true */\n\t\n\tfunction serializeObject(obj) {\n\t var seen = [];\n\t\n\t return JSON.stringify(obj, function(key, val) {\n\t val = toJsonReplacer(key, val);\n\t if (isObject(val)) {\n\t\n\t if (seen.indexOf(val) >= 0) return '...';\n\t\n\t seen.push(val);\n\t }\n\t return val;\n\t });\n\t}\n\t\n\tfunction toDebugString(obj) {\n\t if (typeof obj === 'function') {\n\t return obj.toString().replace(/ \\{[\\s\\S]*$/, '');\n\t } else if (isUndefined(obj)) {\n\t return 'undefined';\n\t } else if (typeof obj !== 'string') {\n\t return serializeObject(obj);\n\t }\n\t return obj;\n\t}\n\t\n\t/* global angularModule: true,\n\t version: true,\n\t\n\t $CompileProvider,\n\t\n\t htmlAnchorDirective,\n\t inputDirective,\n\t inputDirective,\n\t formDirective,\n\t scriptDirective,\n\t selectDirective,\n\t styleDirective,\n\t optionDirective,\n\t ngBindDirective,\n\t ngBindHtmlDirective,\n\t ngBindTemplateDirective,\n\t ngClassDirective,\n\t ngClassEvenDirective,\n\t ngClassOddDirective,\n\t ngCloakDirective,\n\t ngControllerDirective,\n\t ngFormDirective,\n\t ngHideDirective,\n\t ngIfDirective,\n\t ngIncludeDirective,\n\t ngIncludeFillContentDirective,\n\t ngInitDirective,\n\t ngNonBindableDirective,\n\t ngPluralizeDirective,\n\t ngRepeatDirective,\n\t ngShowDirective,\n\t ngStyleDirective,\n\t ngSwitchDirective,\n\t ngSwitchWhenDirective,\n\t ngSwitchDefaultDirective,\n\t ngOptionsDirective,\n\t ngTranscludeDirective,\n\t ngModelDirective,\n\t ngListDirective,\n\t ngChangeDirective,\n\t patternDirective,\n\t patternDirective,\n\t requiredDirective,\n\t requiredDirective,\n\t minlengthDirective,\n\t minlengthDirective,\n\t maxlengthDirective,\n\t maxlengthDirective,\n\t ngValueDirective,\n\t ngModelOptionsDirective,\n\t ngAttributeAliasDirectives,\n\t ngEventDirectives,\n\t\n\t $AnchorScrollProvider,\n\t $AnimateProvider,\n\t $CoreAnimateCssProvider,\n\t $$CoreAnimateJsProvider,\n\t $$CoreAnimateQueueProvider,\n\t $$AnimateRunnerFactoryProvider,\n\t $$AnimateAsyncRunFactoryProvider,\n\t $BrowserProvider,\n\t $CacheFactoryProvider,\n\t $ControllerProvider,\n\t $DocumentProvider,\n\t $ExceptionHandlerProvider,\n\t $FilterProvider,\n\t $$ForceReflowProvider,\n\t $InterpolateProvider,\n\t $IntervalProvider,\n\t $$HashMapProvider,\n\t $HttpProvider,\n\t $HttpParamSerializerProvider,\n\t $HttpParamSerializerJQLikeProvider,\n\t $HttpBackendProvider,\n\t $xhrFactoryProvider,\n\t $LocationProvider,\n\t $LogProvider,\n\t $ParseProvider,\n\t $RootScopeProvider,\n\t $QProvider,\n\t $$QProvider,\n\t $$SanitizeUriProvider,\n\t $SceProvider,\n\t $SceDelegateProvider,\n\t $SnifferProvider,\n\t $TemplateCacheProvider,\n\t $TemplateRequestProvider,\n\t $$TestabilityProvider,\n\t $TimeoutProvider,\n\t $$RAFProvider,\n\t $WindowProvider,\n\t $$jqLiteProvider,\n\t $$CookieReaderProvider\n\t*/\n\t\n\t\n\t/**\n\t * @ngdoc object\n\t * @name angular.version\n\t * @module ng\n\t * @description\n\t * An object that contains information about the current AngularJS version.\n\t *\n\t * This object has the following properties:\n\t *\n\t * - `full` `{string}` Full version string, such as \"0.9.18\".\n\t * - `major` `{number}` Major version number, such as \"0\".\n\t * - `minor` `{number}` Minor version number, such as \"9\".\n\t * - `dot` `{number}` Dot version number, such as \"18\".\n\t * - `codeName` `{string}` Code name of the release, such as \"jiggling-armfat\".\n\t */\n\tvar version = {\n\t full: '1.4.14', // all of these placeholder strings will be replaced by grunt's\n\t major: 1, // package task\n\t minor: 4,\n\t dot: 14,\n\t codeName: 'material-distinction'\n\t};\n\t\n\t\n\tfunction publishExternalAPI(angular) {\n\t extend(angular, {\n\t 'bootstrap': bootstrap,\n\t 'copy': copy,\n\t 'extend': extend,\n\t 'merge': merge,\n\t 'equals': equals,\n\t 'element': jqLite,\n\t 'forEach': forEach,\n\t 'injector': createInjector,\n\t 'noop': noop,\n\t 'bind': bind,\n\t 'toJson': toJson,\n\t 'fromJson': fromJson,\n\t 'identity': identity,\n\t 'isUndefined': isUndefined,\n\t 'isDefined': isDefined,\n\t 'isString': isString,\n\t 'isFunction': isFunction,\n\t 'isObject': isObject,\n\t 'isNumber': isNumber,\n\t 'isElement': isElement,\n\t 'isArray': isArray,\n\t 'version': version,\n\t 'isDate': isDate,\n\t 'lowercase': lowercase,\n\t 'uppercase': uppercase,\n\t 'callbacks': {counter: 0},\n\t 'getTestability': getTestability,\n\t '$$minErr': minErr,\n\t '$$csp': csp,\n\t 'reloadWithDebugInfo': reloadWithDebugInfo\n\t });\n\t\n\t angularModule = setupModuleLoader(window);\n\t\n\t angularModule('ng', ['ngLocale'], ['$provide',\n\t function ngModule($provide) {\n\t // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.\n\t $provide.provider({\n\t $$sanitizeUri: $$SanitizeUriProvider\n\t });\n\t $provide.provider('$compile', $CompileProvider).\n\t directive({\n\t a: htmlAnchorDirective,\n\t input: inputDirective,\n\t textarea: inputDirective,\n\t form: formDirective,\n\t script: scriptDirective,\n\t select: selectDirective,\n\t style: styleDirective,\n\t option: optionDirective,\n\t ngBind: ngBindDirective,\n\t ngBindHtml: ngBindHtmlDirective,\n\t ngBindTemplate: ngBindTemplateDirective,\n\t ngClass: ngClassDirective,\n\t ngClassEven: ngClassEvenDirective,\n\t ngClassOdd: ngClassOddDirective,\n\t ngCloak: ngCloakDirective,\n\t ngController: ngControllerDirective,\n\t ngForm: ngFormDirective,\n\t ngHide: ngHideDirective,\n\t ngIf: ngIfDirective,\n\t ngInclude: ngIncludeDirective,\n\t ngInit: ngInitDirective,\n\t ngNonBindable: ngNonBindableDirective,\n\t ngPluralize: ngPluralizeDirective,\n\t ngRepeat: ngRepeatDirective,\n\t ngShow: ngShowDirective,\n\t ngStyle: ngStyleDirective,\n\t ngSwitch: ngSwitchDirective,\n\t ngSwitchWhen: ngSwitchWhenDirective,\n\t ngSwitchDefault: ngSwitchDefaultDirective,\n\t ngOptions: ngOptionsDirective,\n\t ngTransclude: ngTranscludeDirective,\n\t ngModel: ngModelDirective,\n\t ngList: ngListDirective,\n\t ngChange: ngChangeDirective,\n\t pattern: patternDirective,\n\t ngPattern: patternDirective,\n\t required: requiredDirective,\n\t ngRequired: requiredDirective,\n\t minlength: minlengthDirective,\n\t ngMinlength: minlengthDirective,\n\t maxlength: maxlengthDirective,\n\t ngMaxlength: maxlengthDirective,\n\t ngValue: ngValueDirective,\n\t ngModelOptions: ngModelOptionsDirective\n\t }).\n\t directive({\n\t ngInclude: ngIncludeFillContentDirective\n\t }).\n\t directive(ngAttributeAliasDirectives).\n\t directive(ngEventDirectives);\n\t $provide.provider({\n\t $anchorScroll: $AnchorScrollProvider,\n\t $animate: $AnimateProvider,\n\t $animateCss: $CoreAnimateCssProvider,\n\t $$animateJs: $$CoreAnimateJsProvider,\n\t $$animateQueue: $$CoreAnimateQueueProvider,\n\t $$AnimateRunner: $$AnimateRunnerFactoryProvider,\n\t $$animateAsyncRun: $$AnimateAsyncRunFactoryProvider,\n\t $browser: $BrowserProvider,\n\t $cacheFactory: $CacheFactoryProvider,\n\t $controller: $ControllerProvider,\n\t $document: $DocumentProvider,\n\t $exceptionHandler: $ExceptionHandlerProvider,\n\t $filter: $FilterProvider,\n\t $$forceReflow: $$ForceReflowProvider,\n\t $interpolate: $InterpolateProvider,\n\t $interval: $IntervalProvider,\n\t $http: $HttpProvider,\n\t $httpParamSerializer: $HttpParamSerializerProvider,\n\t $httpParamSerializerJQLike: $HttpParamSerializerJQLikeProvider,\n\t $httpBackend: $HttpBackendProvider,\n\t $xhrFactory: $xhrFactoryProvider,\n\t $location: $LocationProvider,\n\t $log: $LogProvider,\n\t $parse: $ParseProvider,\n\t $rootScope: $RootScopeProvider,\n\t $q: $QProvider,\n\t $$q: $$QProvider,\n\t $sce: $SceProvider,\n\t $sceDelegate: $SceDelegateProvider,\n\t $sniffer: $SnifferProvider,\n\t $templateCache: $TemplateCacheProvider,\n\t $templateRequest: $TemplateRequestProvider,\n\t $$testability: $$TestabilityProvider,\n\t $timeout: $TimeoutProvider,\n\t $window: $WindowProvider,\n\t $$rAF: $$RAFProvider,\n\t $$jqLite: $$jqLiteProvider,\n\t $$HashMap: $$HashMapProvider,\n\t $$cookieReader: $$CookieReaderProvider\n\t });\n\t }\n\t ]);\n\t}\n\t\n\t/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\t * Any commits to this file should be reviewed with security in mind. *\n\t * Changes to this file can potentially create security vulnerabilities. *\n\t * An approval from 2 Core members with history of modifying *\n\t * this file is required. *\n\t * *\n\t * Does the change somehow allow for arbitrary javascript to be executed? *\n\t * Or allows for someone to change the prototype of built-in objects? *\n\t * Or gives undesired access to variables likes document or window? *\n\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\t\n\t/* global JQLitePrototype: true,\n\t addEventListenerFn: true,\n\t removeEventListenerFn: true,\n\t BOOLEAN_ATTR: true,\n\t ALIASED_ATTR: true,\n\t*/\n\t\n\t//////////////////////////////////\n\t//JQLite\n\t//////////////////////////////////\n\t\n\t/**\n\t * @ngdoc function\n\t * @name angular.element\n\t * @module ng\n\t * @kind function\n\t *\n\t * @description\n\t * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.\n\t *\n\t * If jQuery is available, `angular.element` is an alias for the\n\t * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`\n\t * delegates to Angular's built-in subset of jQuery, called \"jQuery lite\" or **jqLite**.\n\t *\n\t * jqLite is a tiny, API-compatible subset of jQuery that allows\n\t * Angular to manipulate the DOM in a cross-browser compatible way. jqLite implements only the most\n\t * commonly needed functionality with the goal of having a very small footprint.\n\t *\n\t * To use `jQuery`, simply ensure it is loaded before the `angular.js` file. You can also use the\n\t * {@link ngJq `ngJq`} directive to specify that jqlite should be used over jQuery, or to use a\n\t * specific version of jQuery if multiple versions exist on the page.\n\t *\n\t * <div class=\"alert alert-info\">**Note:** All element references in Angular are always wrapped with jQuery or\n\t * jqLite (such as the element argument in a directive's compile / link function). They are never raw DOM references.</div>\n\t *\n\t * <div class=\"alert alert-warning\">**Note:** Keep in mind that this function will not find elements\n\t * by tag name / CSS selector. For lookups by tag name, try instead `angular.element(document).find(...)`\n\t * or `$document.find()`, or use the standard DOM APIs, e.g. `document.querySelectorAll()`.</div>\n\t *\n\t * ## Angular's jqLite\n\t * jqLite provides only the following jQuery methods:\n\t *\n\t * - [`addClass()`](http://api.jquery.com/addClass/)\n\t * - [`after()`](http://api.jquery.com/after/)\n\t * - [`append()`](http://api.jquery.com/append/)\n\t * - [`attr()`](http://api.jquery.com/attr/) - Does not support functions as parameters\n\t * - [`bind()`](http://api.jquery.com/bind/) - Does not support namespaces, selectors or eventData\n\t * - [`children()`](http://api.jquery.com/children/) - Does not support selectors\n\t * - [`clone()`](http://api.jquery.com/clone/)\n\t * - [`contents()`](http://api.jquery.com/contents/)\n\t * - [`css()`](http://api.jquery.com/css/) - Only retrieves inline-styles, does not call `getComputedStyle()`.\n\t * As a setter, does not convert numbers to strings or append 'px', and also does not have automatic property prefixing.\n\t * - [`data()`](http://api.jquery.com/data/)\n\t * - [`detach()`](http://api.jquery.com/detach/)\n\t * - [`empty()`](http://api.jquery.com/empty/)\n\t * - [`eq()`](http://api.jquery.com/eq/)\n\t * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name\n\t * - [`hasClass()`](http://api.jquery.com/hasClass/)\n\t * - [`html()`](http://api.jquery.com/html/)\n\t * - [`next()`](http://api.jquery.com/next/) - Does not support selectors\n\t * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData\n\t * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces, selectors or event object as parameter\n\t * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors\n\t * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors\n\t * - [`prepend()`](http://api.jquery.com/prepend/)\n\t * - [`prop()`](http://api.jquery.com/prop/)\n\t * - [`ready()`](http://api.jquery.com/ready/)\n\t * - [`remove()`](http://api.jquery.com/remove/)\n\t * - [`removeAttr()`](http://api.jquery.com/removeAttr/)\n\t * - [`removeClass()`](http://api.jquery.com/removeClass/)\n\t * - [`removeData()`](http://api.jquery.com/removeData/)\n\t * - [`replaceWith()`](http://api.jquery.com/replaceWith/)\n\t * - [`text()`](http://api.jquery.com/text/)\n\t * - [`toggleClass()`](http://api.jquery.com/toggleClass/)\n\t * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.\n\t * - [`unbind()`](http://api.jquery.com/unbind/) - Does not support namespaces or event object as parameter\n\t * - [`val()`](http://api.jquery.com/val/)\n\t * - [`wrap()`](http://api.jquery.com/wrap/)\n\t *\n\t * ## jQuery/jqLite Extras\n\t * Angular also provides the following additional methods and events to both jQuery and jqLite:\n\t *\n\t * ### Events\n\t * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event\n\t * on all DOM nodes being removed. This can be used to clean up any 3rd party bindings to the DOM\n\t * element before it is removed.\n\t *\n\t * ### Methods\n\t * - `controller(name)` - retrieves the controller of the current element or its parent. By default\n\t * retrieves controller associated with the `ngController` directive. If `name` is provided as\n\t * camelCase directive name, then the controller for this directive will be retrieved (e.g.\n\t * `'ngModel'`).\n\t * - `injector()` - retrieves the injector of the current element or its parent.\n\t * - `scope()` - retrieves the {@link ng.$rootScope.Scope scope} of the current\n\t * element or its parent. Requires {@link guide/production#disabling-debug-data Debug Data} to\n\t * be enabled.\n\t * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the\n\t * current element. This getter should be used only on elements that contain a directive which starts a new isolate\n\t * scope. Calling `scope()` on this element always returns the original non-isolate scope.\n\t * Requires {@link guide/production#disabling-debug-data Debug Data} to be enabled.\n\t * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top\n\t * parent element is reached.\n\t *\n\t * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.\n\t * @returns {Object} jQuery object.\n\t */\n\t\n\tJQLite.expando = 'ng339';\n\t\n\tvar jqCache = JQLite.cache = {},\n\t jqId = 1,\n\t addEventListenerFn = function(element, type, fn) {\n\t element.addEventListener(type, fn, false);\n\t },\n\t removeEventListenerFn = function(element, type, fn) {\n\t element.removeEventListener(type, fn, false);\n\t };\n\t\n\t/*\n\t * !!! This is an undocumented \"private\" function !!!\n\t */\n\tJQLite._data = function(node) {\n\t //jQuery always returns an object on cache miss\n\t return this.cache[node[this.expando]] || {};\n\t};\n\t\n\tfunction jqNextId() { return ++jqId; }\n\t\n\t\n\tvar SPECIAL_CHARS_REGEXP = /([\\:\\-\\_]+(.))/g;\n\tvar MOZ_HACK_REGEXP = /^moz([A-Z])/;\n\tvar MOUSE_EVENT_MAP= { mouseleave: \"mouseout\", mouseenter: \"mouseover\"};\n\tvar jqLiteMinErr = minErr('jqLite');\n\t\n\t/**\n\t * Converts snake_case to camelCase.\n\t * Also there is special case for Moz prefix starting with upper case letter.\n\t * @param name Name to normalize\n\t */\n\tfunction camelCase(name) {\n\t return name.\n\t replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {\n\t return offset ? letter.toUpperCase() : letter;\n\t }).\n\t replace(MOZ_HACK_REGEXP, 'Moz$1');\n\t}\n\t\n\tvar SINGLE_TAG_REGEXP = /^<([\\w-]+)\\s*\\/?>(?:<\\/\\1>|)$/;\n\tvar HTML_REGEXP = /<|&#?\\w+;/;\n\tvar TAG_NAME_REGEXP = /<([\\w:-]+)/;\n\tvar XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:-]+)[^>]*)\\/>/gi;\n\t\n\tvar wrapMap = {\n\t 'option': [1, '<select multiple=\"multiple\">', '</select>'],\n\t\n\t 'thead': [1, '<table>', '</table>'],\n\t 'col': [2, '<table><colgroup>', '</colgroup></table>'],\n\t 'tr': [2, '<table><tbody>', '</tbody></table>'],\n\t 'td': [3, '<table><tbody><tr>', '</tr></tbody></table>'],\n\t '_default': [0, \"\", \"\"]\n\t};\n\t\n\twrapMap.optgroup = wrapMap.option;\n\twrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\n\twrapMap.th = wrapMap.td;\n\t\n\t\n\tfunction jqLiteIsTextNode(html) {\n\t return !HTML_REGEXP.test(html);\n\t}\n\t\n\tfunction jqLiteAcceptsData(node) {\n\t // The window object can accept data but has no nodeType\n\t // Otherwise we are only interested in elements (1) and documents (9)\n\t var nodeType = node.nodeType;\n\t return nodeType === NODE_TYPE_ELEMENT || !nodeType || nodeType === NODE_TYPE_DOCUMENT;\n\t}\n\t\n\tfunction jqLiteHasData(node) {\n\t for (var key in jqCache[node.ng339]) {\n\t return true;\n\t }\n\t return false;\n\t}\n\t\n\tfunction jqLiteBuildFragment(html, context) {\n\t var tmp, tag, wrap,\n\t fragment = context.createDocumentFragment(),\n\t nodes = [], i;\n\t\n\t if (jqLiteIsTextNode(html)) {\n\t // Convert non-html into a text node\n\t nodes.push(context.createTextNode(html));\n\t } else {\n\t // Convert html into DOM nodes\n\t tmp = tmp || fragment.appendChild(context.createElement(\"div\"));\n\t tag = (TAG_NAME_REGEXP.exec(html) || [\"\", \"\"])[1].toLowerCase();\n\t wrap = wrapMap[tag] || wrapMap._default;\n\t tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, \"<$1></$2>\") + wrap[2];\n\t\n\t // Descend through wrappers to the right content\n\t i = wrap[0];\n\t while (i--) {\n\t tmp = tmp.lastChild;\n\t }\n\t\n\t nodes = concat(nodes, tmp.childNodes);\n\t\n\t tmp = fragment.firstChild;\n\t tmp.textContent = \"\";\n\t }\n\t\n\t // Remove wrapper from fragment\n\t fragment.textContent = \"\";\n\t fragment.innerHTML = \"\"; // Clear inner HTML\n\t forEach(nodes, function(node) {\n\t fragment.appendChild(node);\n\t });\n\t\n\t return fragment;\n\t}\n\t\n\tfunction jqLiteParseHTML(html, context) {\n\t context = context || document;\n\t var parsed;\n\t\n\t if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {\n\t return [context.createElement(parsed[1])];\n\t }\n\t\n\t if ((parsed = jqLiteBuildFragment(html, context))) {\n\t return parsed.childNodes;\n\t }\n\t\n\t return [];\n\t}\n\t\n\tfunction jqLiteWrapNode(node, wrapper) {\n\t var parent = node.parentNode;\n\t\n\t if (parent) {\n\t parent.replaceChild(wrapper, node);\n\t }\n\t\n\t wrapper.appendChild(node);\n\t}\n\t\n\t\n\t// IE9-11 has no method \"contains\" in SVG element and in Node.prototype. Bug #10259.\n\tvar jqLiteContains = Node.prototype.contains || function(arg) {\n\t // jshint bitwise: false\n\t return !!(this.compareDocumentPosition(arg) & 16);\n\t // jshint bitwise: true\n\t};\n\t\n\t/////////////////////////////////////////////\n\tfunction JQLite(element) {\n\t if (element instanceof JQLite) {\n\t return element;\n\t }\n\t\n\t var argIsString;\n\t\n\t if (isString(element)) {\n\t element = trim(element);\n\t argIsString = true;\n\t }\n\t if (!(this instanceof JQLite)) {\n\t if (argIsString && element.charAt(0) != '<') {\n\t throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');\n\t }\n\t return new JQLite(element);\n\t }\n\t\n\t if (argIsString) {\n\t jqLiteAddNodes(this, jqLiteParseHTML(element));\n\t } else {\n\t jqLiteAddNodes(this, element);\n\t }\n\t}\n\t\n\tfunction jqLiteClone(element) {\n\t return element.cloneNode(true);\n\t}\n\t\n\tfunction jqLiteDealoc(element, onlyDescendants) {\n\t if (!onlyDescendants) jqLiteRemoveData(element);\n\t\n\t if (element.querySelectorAll) {\n\t var descendants = element.querySelectorAll('*');\n\t for (var i = 0, l = descendants.length; i < l; i++) {\n\t jqLiteRemoveData(descendants[i]);\n\t }\n\t }\n\t}\n\t\n\tfunction jqLiteOff(element, type, fn, unsupported) {\n\t if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');\n\t\n\t var expandoStore = jqLiteExpandoStore(element);\n\t var events = expandoStore && expandoStore.events;\n\t var handle = expandoStore && expandoStore.handle;\n\t\n\t if (!handle) return; //no listeners registered\n\t\n\t if (!type) {\n\t for (type in events) {\n\t if (type !== '$destroy') {\n\t removeEventListenerFn(element, type, handle);\n\t }\n\t delete events[type];\n\t }\n\t } else {\n\t\n\t var removeHandler = function(type) {\n\t var listenerFns = events[type];\n\t if (isDefined(fn)) {\n\t arrayRemove(listenerFns || [], fn);\n\t }\n\t if (!(isDefined(fn) && listenerFns && listenerFns.length > 0)) {\n\t removeEventListenerFn(element, type, handle);\n\t delete events[type];\n\t }\n\t };\n\t\n\t forEach(type.split(' '), function(type) {\n\t removeHandler(type);\n\t if (MOUSE_EVENT_MAP[type]) {\n\t removeHandler(MOUSE_EVENT_MAP[type]);\n\t }\n\t });\n\t }\n\t}\n\t\n\tfunction jqLiteRemoveData(element, name) {\n\t var expandoId = element.ng339;\n\t var expandoStore = expandoId && jqCache[expandoId];\n\t\n\t if (expandoStore) {\n\t if (name) {\n\t delete expandoStore.data[name];\n\t return;\n\t }\n\t\n\t if (expandoStore.handle) {\n\t if (expandoStore.events.$destroy) {\n\t expandoStore.handle({}, '$destroy');\n\t }\n\t jqLiteOff(element);\n\t }\n\t delete jqCache[expandoId];\n\t element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it\n\t }\n\t}\n\t\n\t\n\tfunction jqLiteExpandoStore(element, createIfNecessary) {\n\t var expandoId = element.ng339,\n\t expandoStore = expandoId && jqCache[expandoId];\n\t\n\t if (createIfNecessary && !expandoStore) {\n\t element.ng339 = expandoId = jqNextId();\n\t expandoStore = jqCache[expandoId] = {events: {}, data: {}, handle: undefined};\n\t }\n\t\n\t return expandoStore;\n\t}\n\t\n\t\n\tfunction jqLiteData(element, key, value) {\n\t if (jqLiteAcceptsData(element)) {\n\t\n\t var isSimpleSetter = isDefined(value);\n\t var isSimpleGetter = !isSimpleSetter && key && !isObject(key);\n\t var massGetter = !key;\n\t var expandoStore = jqLiteExpandoStore(element, !isSimpleGetter);\n\t var data = expandoStore && expandoStore.data;\n\t\n\t if (isSimpleSetter) { // data('key', value)\n\t data[key] = value;\n\t } else {\n\t if (massGetter) { // data()\n\t return data;\n\t } else {\n\t if (isSimpleGetter) { // data('key')\n\t // don't force creation of expandoStore if it doesn't exist yet\n\t return data && data[key];\n\t } else { // mass-setter: data({key1: val1, key2: val2})\n\t extend(data, key);\n\t }\n\t }\n\t }\n\t }\n\t}\n\t\n\tfunction jqLiteHasClass(element, selector) {\n\t if (!element.getAttribute) return false;\n\t return ((\" \" + (element.getAttribute('class') || '') + \" \").replace(/[\\n\\t]/g, \" \").\n\t indexOf(\" \" + selector + \" \") > -1);\n\t}\n\t\n\tfunction jqLiteRemoveClass(element, cssClasses) {\n\t if (cssClasses && element.setAttribute) {\n\t forEach(cssClasses.split(' '), function(cssClass) {\n\t element.setAttribute('class', trim(\n\t (\" \" + (element.getAttribute('class') || '') + \" \")\n\t .replace(/[\\n\\t]/g, \" \")\n\t .replace(\" \" + trim(cssClass) + \" \", \" \"))\n\t );\n\t });\n\t }\n\t}\n\t\n\tfunction jqLiteAddClass(element, cssClasses) {\n\t if (cssClasses && element.setAttribute) {\n\t var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')\n\t .replace(/[\\n\\t]/g, \" \");\n\t\n\t forEach(cssClasses.split(' '), function(cssClass) {\n\t cssClass = trim(cssClass);\n\t if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {\n\t existingClasses += cssClass + ' ';\n\t }\n\t });\n\t\n\t element.setAttribute('class', trim(existingClasses));\n\t }\n\t}\n\t\n\t\n\tfunction jqLiteAddNodes(root, elements) {\n\t // THIS CODE IS VERY HOT. Don't make changes without benchmarking.\n\t\n\t if (elements) {\n\t\n\t // if a Node (the most common case)\n\t if (elements.nodeType) {\n\t root[root.length++] = elements;\n\t } else {\n\t var length = elements.length;\n\t\n\t // if an Array or NodeList and not a Window\n\t if (typeof length === 'number' && elements.window !== elements) {\n\t if (length) {\n\t for (var i = 0; i < length; i++) {\n\t root[root.length++] = elements[i];\n\t }\n\t }\n\t } else {\n\t root[root.length++] = elements;\n\t }\n\t }\n\t }\n\t}\n\t\n\t\n\tfunction jqLiteController(element, name) {\n\t return jqLiteInheritedData(element, '$' + (name || 'ngController') + 'Controller');\n\t}\n\t\n\tfunction jqLiteInheritedData(element, name, value) {\n\t // if element is the document object work with the html element instead\n\t // this makes $(document).scope() possible\n\t if (element.nodeType == NODE_TYPE_DOCUMENT) {\n\t element = element.documentElement;\n\t }\n\t var names = isArray(name) ? name : [name];\n\t\n\t while (element) {\n\t for (var i = 0, ii = names.length; i < ii; i++) {\n\t if (isDefined(value = jqLite.data(element, names[i]))) return value;\n\t }\n\t\n\t // If dealing with a document fragment node with a host element, and no parent, use the host\n\t // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM\n\t // to lookup parent controllers.\n\t element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host);\n\t }\n\t}\n\t\n\tfunction jqLiteEmpty(element) {\n\t jqLiteDealoc(element, true);\n\t while (element.firstChild) {\n\t element.removeChild(element.firstChild);\n\t }\n\t}\n\t\n\tfunction jqLiteRemove(element, keepData) {\n\t if (!keepData) jqLiteDealoc(element);\n\t var parent = element.parentNode;\n\t if (parent) parent.removeChild(element);\n\t}\n\t\n\t\n\tfunction jqLiteDocumentLoaded(action, win) {\n\t win = win || window;\n\t if (win.document.readyState === 'complete') {\n\t // Force the action to be run async for consistent behaviour\n\t // from the action's point of view\n\t // i.e. it will definitely not be in a $apply\n\t win.setTimeout(action);\n\t } else {\n\t // No need to unbind this handler as load is only ever called once\n\t jqLite(win).on('load', action);\n\t }\n\t}\n\t\n\t//////////////////////////////////////////\n\t// Functions which are declared directly.\n\t//////////////////////////////////////////\n\tvar JQLitePrototype = JQLite.prototype = {\n\t ready: function(fn) {\n\t var fired = false;\n\t\n\t function trigger() {\n\t if (fired) return;\n\t fired = true;\n\t fn();\n\t }\n\t\n\t // check if document is already loaded\n\t if (document.readyState === 'complete') {\n\t setTimeout(trigger);\n\t } else {\n\t this.on('DOMContentLoaded', trigger); // works for modern browsers and IE9\n\t // we can not use jqLite since we are not done loading and jQuery could be loaded later.\n\t // jshint -W064\n\t JQLite(window).on('load', trigger); // fallback to window.onload for others\n\t // jshint +W064\n\t }\n\t },\n\t toString: function() {\n\t var value = [];\n\t forEach(this, function(e) { value.push('' + e);});\n\t return '[' + value.join(', ') + ']';\n\t },\n\t\n\t eq: function(index) {\n\t return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);\n\t },\n\t\n\t length: 0,\n\t push: push,\n\t sort: [].sort,\n\t splice: [].splice\n\t};\n\t\n\t//////////////////////////////////////////\n\t// Functions iterating getter/setters.\n\t// these functions return self on setter and\n\t// value on get.\n\t//////////////////////////////////////////\n\tvar BOOLEAN_ATTR = {};\n\tforEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {\n\t BOOLEAN_ATTR[lowercase(value)] = value;\n\t});\n\tvar BOOLEAN_ELEMENTS = {};\n\tforEach('input,select,option,textarea,button,form,details'.split(','), function(value) {\n\t BOOLEAN_ELEMENTS[value] = true;\n\t});\n\tvar ALIASED_ATTR = {\n\t 'ngMinlength': 'minlength',\n\t 'ngMaxlength': 'maxlength',\n\t 'ngMin': 'min',\n\t 'ngMax': 'max',\n\t 'ngPattern': 'pattern'\n\t};\n\t\n\tfunction getBooleanAttrName(element, name) {\n\t // check dom last since we will most likely fail on name\n\t var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];\n\t\n\t // booleanAttr is here twice to minimize DOM access\n\t return booleanAttr && BOOLEAN_ELEMENTS[nodeName_(element)] && booleanAttr;\n\t}\n\t\n\tfunction getAliasedAttrName(name) {\n\t return ALIASED_ATTR[name];\n\t}\n\t\n\tforEach({\n\t data: jqLiteData,\n\t removeData: jqLiteRemoveData,\n\t hasData: jqLiteHasData\n\t}, function(fn, name) {\n\t JQLite[name] = fn;\n\t});\n\t\n\tforEach({\n\t data: jqLiteData,\n\t inheritedData: jqLiteInheritedData,\n\t\n\t scope: function(element) {\n\t // Can't use jqLiteData here directly so we stay compatible with jQuery!\n\t return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);\n\t },\n\t\n\t isolateScope: function(element) {\n\t // Can't use jqLiteData here directly so we stay compatible with jQuery!\n\t return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate');\n\t },\n\t\n\t controller: jqLiteController,\n\t\n\t injector: function(element) {\n\t return jqLiteInheritedData(element, '$injector');\n\t },\n\t\n\t removeAttr: function(element, name) {\n\t element.removeAttribute(name);\n\t },\n\t\n\t hasClass: jqLiteHasClass,\n\t\n\t css: function(element, name, value) {\n\t name = camelCase(name);\n\t\n\t if (isDefined(value)) {\n\t element.style[name] = value;\n\t } else {\n\t return element.style[name];\n\t }\n\t },\n\t\n\t attr: function(element, name, value) {\n\t var nodeType = element.nodeType;\n\t if (nodeType === NODE_TYPE_TEXT || nodeType === NODE_TYPE_ATTRIBUTE || nodeType === NODE_TYPE_COMMENT) {\n\t return;\n\t }\n\t var lowercasedName = lowercase(name);\n\t if (BOOLEAN_ATTR[lowercasedName]) {\n\t if (isDefined(value)) {\n\t if (!!value) {\n\t element[name] = true;\n\t element.setAttribute(name, lowercasedName);\n\t } else {\n\t element[name] = false;\n\t element.removeAttribute(lowercasedName);\n\t }\n\t } else {\n\t return (element[name] ||\n\t (element.attributes.getNamedItem(name) || noop).specified)\n\t ? lowercasedName\n\t : undefined;\n\t }\n\t } else if (isDefined(value)) {\n\t element.setAttribute(name, value);\n\t } else if (element.getAttribute) {\n\t // the extra argument \"2\" is to get the right thing for a.href in IE, see jQuery code\n\t // some elements (e.g. Document) don't have get attribute, so return undefined\n\t var ret = element.getAttribute(name, 2);\n\t // normalize non-existing attributes to undefined (as jQuery)\n\t return ret === null ? undefined : ret;\n\t }\n\t },\n\t\n\t prop: function(element, name, value) {\n\t if (isDefined(value)) {\n\t element[name] = value;\n\t } else {\n\t return element[name];\n\t }\n\t },\n\t\n\t text: (function() {\n\t getText.$dv = '';\n\t return getText;\n\t\n\t function getText(element, value) {\n\t if (isUndefined(value)) {\n\t var nodeType = element.nodeType;\n\t return (nodeType === NODE_TYPE_ELEMENT || nodeType === NODE_TYPE_TEXT) ? element.textContent : '';\n\t }\n\t element.textContent = value;\n\t }\n\t })(),\n\t\n\t val: function(element, value) {\n\t if (isUndefined(value)) {\n\t if (element.multiple && nodeName_(element) === 'select') {\n\t var result = [];\n\t forEach(element.options, function(option) {\n\t if (option.selected) {\n\t result.push(option.value || option.text);\n\t }\n\t });\n\t return result.length === 0 ? null : result;\n\t }\n\t return element.value;\n\t }\n\t element.value = value;\n\t },\n\t\n\t html: function(element, value) {\n\t if (isUndefined(value)) {\n\t return element.innerHTML;\n\t }\n\t jqLiteDealoc(element, true);\n\t element.innerHTML = value;\n\t },\n\t\n\t empty: jqLiteEmpty\n\t}, function(fn, name) {\n\t /**\n\t * Properties: writes return selection, reads return first value\n\t */\n\t JQLite.prototype[name] = function(arg1, arg2) {\n\t var i, key;\n\t var nodeCount = this.length;\n\t\n\t // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it\n\t // in a way that survives minification.\n\t // jqLiteEmpty takes no arguments but is a setter.\n\t if (fn !== jqLiteEmpty &&\n\t (isUndefined((fn.length == 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2))) {\n\t if (isObject(arg1)) {\n\t\n\t // we are a write, but the object properties are the key/values\n\t for (i = 0; i < nodeCount; i++) {\n\t if (fn === jqLiteData) {\n\t // data() takes the whole object in jQuery\n\t fn(this[i], arg1);\n\t } else {\n\t for (key in arg1) {\n\t fn(this[i], key, arg1[key]);\n\t }\n\t }\n\t }\n\t // return self for chaining\n\t return this;\n\t } else {\n\t // we are a read, so read the first child.\n\t // TODO: do we still need this?\n\t var value = fn.$dv;\n\t // Only if we have $dv do we iterate over all, otherwise it is just the first element.\n\t var jj = (isUndefined(value)) ? Math.min(nodeCount, 1) : nodeCount;\n\t for (var j = 0; j < jj; j++) {\n\t var nodeValue = fn(this[j], arg1, arg2);\n\t value = value ? value + nodeValue : nodeValue;\n\t }\n\t return value;\n\t }\n\t } else {\n\t // we are a write, so apply to all children\n\t for (i = 0; i < nodeCount; i++) {\n\t fn(this[i], arg1, arg2);\n\t }\n\t // return self for chaining\n\t return this;\n\t }\n\t };\n\t});\n\t\n\tfunction createEventHandler(element, events) {\n\t var eventHandler = function(event, type) {\n\t // jQuery specific api\n\t event.isDefaultPrevented = function() {\n\t return event.defaultPrevented;\n\t };\n\t\n\t var eventFns = events[type || event.type];\n\t var eventFnsLength = eventFns ? eventFns.length : 0;\n\t\n\t if (!eventFnsLength) return;\n\t\n\t if (isUndefined(event.immediatePropagationStopped)) {\n\t var originalStopImmediatePropagation = event.stopImmediatePropagation;\n\t event.stopImmediatePropagation = function() {\n\t event.immediatePropagationStopped = true;\n\t\n\t if (event.stopPropagation) {\n\t event.stopPropagation();\n\t }\n\t\n\t if (originalStopImmediatePropagation) {\n\t originalStopImmediatePropagation.call(event);\n\t }\n\t };\n\t }\n\t\n\t event.isImmediatePropagationStopped = function() {\n\t return event.immediatePropagationStopped === true;\n\t };\n\t\n\t // Some events have special handlers that wrap the real handler\n\t var handlerWrapper = eventFns.specialHandlerWrapper || defaultHandlerWrapper;\n\t\n\t // Copy event handlers in case event handlers array is modified during execution.\n\t if ((eventFnsLength > 1)) {\n\t eventFns = shallowCopy(eventFns);\n\t }\n\t\n\t for (var i = 0; i < eventFnsLength; i++) {\n\t if (!event.isImmediatePropagationStopped()) {\n\t handlerWrapper(element, event, eventFns[i]);\n\t }\n\t }\n\t };\n\t\n\t // TODO: this is a hack for angularMocks/clearDataCache that makes it possible to deregister all\n\t // events on `element`\n\t eventHandler.elem = element;\n\t return eventHandler;\n\t}\n\t\n\tfunction defaultHandlerWrapper(element, event, handler) {\n\t handler.call(element, event);\n\t}\n\t\n\tfunction specialMouseHandlerWrapper(target, event, handler) {\n\t // Refer to jQuery's implementation of mouseenter & mouseleave\n\t // Read about mouseenter and mouseleave:\n\t // http://www.quirksmode.org/js/events_mouse.html#link8\n\t var related = event.relatedTarget;\n\t // For mousenter/leave call the handler if related is outside the target.\n\t // NB: No relatedTarget if the mouse left/entered the browser window\n\t if (!related || (related !== target && !jqLiteContains.call(target, related))) {\n\t handler.call(target, event);\n\t }\n\t}\n\t\n\t//////////////////////////////////////////\n\t// Functions iterating traversal.\n\t// These functions chain results into a single\n\t// selector.\n\t//////////////////////////////////////////\n\tforEach({\n\t removeData: jqLiteRemoveData,\n\t\n\t on: function jqLiteOn(element, type, fn, unsupported) {\n\t if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');\n\t\n\t // Do not add event handlers to non-elements because they will not be cleaned up.\n\t if (!jqLiteAcceptsData(element)) {\n\t return;\n\t }\n\t\n\t var expandoStore = jqLiteExpandoStore(element, true);\n\t var events = expandoStore.events;\n\t var handle = expandoStore.handle;\n\t\n\t if (!handle) {\n\t handle = expandoStore.handle = createEventHandler(element, events);\n\t }\n\t\n\t // http://jsperf.com/string-indexof-vs-split\n\t var types = type.indexOf(' ') >= 0 ? type.split(' ') : [type];\n\t var i = types.length;\n\t\n\t var addHandler = function(type, specialHandlerWrapper, noEventListener) {\n\t var eventFns = events[type];\n\t\n\t if (!eventFns) {\n\t eventFns = events[type] = [];\n\t eventFns.specialHandlerWrapper = specialHandlerWrapper;\n\t if (type !== '$destroy' && !noEventListener) {\n\t addEventListenerFn(element, type, handle);\n\t }\n\t }\n\t\n\t eventFns.push(fn);\n\t };\n\t\n\t while (i--) {\n\t type = types[i];\n\t if (MOUSE_EVENT_MAP[type]) {\n\t addHandler(MOUSE_EVENT_MAP[type], specialMouseHandlerWrapper);\n\t addHandler(type, undefined, true);\n\t } else {\n\t addHandler(type);\n\t }\n\t }\n\t },\n\t\n\t off: jqLiteOff,\n\t\n\t one: function(element, type, fn) {\n\t element = jqLite(element);\n\t\n\t //add the listener twice so that when it is called\n\t //you can remove the original function and still be\n\t //able to call element.off(ev, fn) normally\n\t element.on(type, function onFn() {\n\t element.off(type, fn);\n\t element.off(type, onFn);\n\t });\n\t element.on(type, fn);\n\t },\n\t\n\t replaceWith: function(element, replaceNode) {\n\t var index, parent = element.parentNode;\n\t jqLiteDealoc(element);\n\t forEach(new JQLite(replaceNode), function(node) {\n\t if (index) {\n\t parent.insertBefore(node, index.nextSibling);\n\t } else {\n\t parent.replaceChild(node, element);\n\t }\n\t index = node;\n\t });\n\t },\n\t\n\t children: function(element) {\n\t var children = [];\n\t forEach(element.childNodes, function(element) {\n\t if (element.nodeType === NODE_TYPE_ELEMENT) {\n\t children.push(element);\n\t }\n\t });\n\t return children;\n\t },\n\t\n\t contents: function(element) {\n\t return element.contentDocument || element.childNodes || [];\n\t },\n\t\n\t append: function(element, node) {\n\t var nodeType = element.nodeType;\n\t if (nodeType !== NODE_TYPE_ELEMENT && nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT) return;\n\t\n\t node = new JQLite(node);\n\t\n\t for (var i = 0, ii = node.length; i < ii; i++) {\n\t var child = node[i];\n\t element.appendChild(child);\n\t }\n\t },\n\t\n\t prepend: function(element, node) {\n\t if (element.nodeType === NODE_TYPE_ELEMENT) {\n\t var index = element.firstChild;\n\t forEach(new JQLite(node), function(child) {\n\t element.insertBefore(child, index);\n\t });\n\t }\n\t },\n\t\n\t wrap: function(element, wrapNode) {\n\t jqLiteWrapNode(element, jqLite(wrapNode).eq(0).clone()[0]);\n\t },\n\t\n\t remove: jqLiteRemove,\n\t\n\t detach: function(element) {\n\t jqLiteRemove(element, true);\n\t },\n\t\n\t after: function(element, newElement) {\n\t var index = element, parent = element.parentNode;\n\t newElement = new JQLite(newElement);\n\t\n\t for (var i = 0, ii = newElement.length; i < ii; i++) {\n\t var node = newElement[i];\n\t parent.insertBefore(node, index.nextSibling);\n\t index = node;\n\t }\n\t },\n\t\n\t addClass: jqLiteAddClass,\n\t removeClass: jqLiteRemoveClass,\n\t\n\t toggleClass: function(element, selector, condition) {\n\t if (selector) {\n\t forEach(selector.split(' '), function(className) {\n\t var classCondition = condition;\n\t if (isUndefined(classCondition)) {\n\t classCondition = !jqLiteHasClass(element, className);\n\t }\n\t (classCondition ? jqLiteAddClass : jqLiteRemoveClass)(element, className);\n\t });\n\t }\n\t },\n\t\n\t parent: function(element) {\n\t var parent = element.parentNode;\n\t return parent && parent.nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT ? parent : null;\n\t },\n\t\n\t next: function(element) {\n\t return element.nextElementSibling;\n\t },\n\t\n\t find: function(element, selector) {\n\t if (element.getElementsByTagName) {\n\t return element.getElementsByTagName(selector);\n\t } else {\n\t return [];\n\t }\n\t },\n\t\n\t clone: jqLiteClone,\n\t\n\t triggerHandler: function(element, event, extraParameters) {\n\t\n\t var dummyEvent, eventFnsCopy, handlerArgs;\n\t var eventName = event.type || event;\n\t var expandoStore = jqLiteExpandoStore(element);\n\t var events = expandoStore && expandoStore.events;\n\t var eventFns = events && events[eventName];\n\t\n\t if (eventFns) {\n\t // Create a dummy event to pass to the handlers\n\t dummyEvent = {\n\t preventDefault: function() { this.defaultPrevented = true; },\n\t isDefaultPrevented: function() { return this.defaultPrevented === true; },\n\t stopImmediatePropagation: function() { this.immediatePropagationStopped = true; },\n\t isImmediatePropagationStopped: function() { return this.immediatePropagationStopped === true; },\n\t stopPropagation: noop,\n\t type: eventName,\n\t target: element\n\t };\n\t\n\t // If a custom event was provided then extend our dummy event with it\n\t if (event.type) {\n\t dummyEvent = extend(dummyEvent, event);\n\t }\n\t\n\t // Copy event handlers in case event handlers array is modified during execution.\n\t eventFnsCopy = shallowCopy(eventFns);\n\t handlerArgs = extraParameters ? [dummyEvent].concat(extraParameters) : [dummyEvent];\n\t\n\t forEach(eventFnsCopy, function(fn) {\n\t if (!dummyEvent.isImmediatePropagationStopped()) {\n\t fn.apply(element, handlerArgs);\n\t }\n\t });\n\t }\n\t }\n\t}, function(fn, name) {\n\t /**\n\t * chaining functions\n\t */\n\t JQLite.prototype[name] = function(arg1, arg2, arg3) {\n\t var value;\n\t\n\t for (var i = 0, ii = this.length; i < ii; i++) {\n\t if (isUndefined(value)) {\n\t value = fn(this[i], arg1, arg2, arg3);\n\t if (isDefined(value)) {\n\t // any function which returns a value needs to be wrapped\n\t value = jqLite(value);\n\t }\n\t } else {\n\t jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3));\n\t }\n\t }\n\t return isDefined(value) ? value : this;\n\t };\n\t\n\t // bind legacy bind/unbind to on/off\n\t JQLite.prototype.bind = JQLite.prototype.on;\n\t JQLite.prototype.unbind = JQLite.prototype.off;\n\t});\n\t\n\t\n\t// Provider for private $$jqLite service\n\tfunction $$jqLiteProvider() {\n\t this.$get = function $$jqLite() {\n\t return extend(JQLite, {\n\t hasClass: function(node, classes) {\n\t if (node.attr) node = node[0];\n\t return jqLiteHasClass(node, classes);\n\t },\n\t addClass: function(node, classes) {\n\t if (node.attr) node = node[0];\n\t return jqLiteAddClass(node, classes);\n\t },\n\t removeClass: function(node, classes) {\n\t if (node.attr) node = node[0];\n\t return jqLiteRemoveClass(node, classes);\n\t }\n\t });\n\t };\n\t}\n\t\n\t/**\n\t * Computes a hash of an 'obj'.\n\t * Hash of a:\n\t * string is string\n\t * number is number as string\n\t * object is either result of calling $$hashKey function on the object or uniquely generated id,\n\t * that is also assigned to the $$hashKey property of the object.\n\t *\n\t * @param obj\n\t * @returns {string} hash string such that the same input will have the same hash string.\n\t * The resulting string key is in 'type:hashKey' format.\n\t */\n\tfunction hashKey(obj, nextUidFn) {\n\t var key = obj && obj.$$hashKey;\n\t\n\t if (key) {\n\t if (typeof key === 'function') {\n\t key = obj.$$hashKey();\n\t }\n\t return key;\n\t }\n\t\n\t var objType = typeof obj;\n\t if (objType == 'function' || (objType == 'object' && obj !== null)) {\n\t key = obj.$$hashKey = objType + ':' + (nextUidFn || nextUid)();\n\t } else {\n\t key = objType + ':' + obj;\n\t }\n\t\n\t return key;\n\t}\n\t\n\t/**\n\t * HashMap which can use objects as keys\n\t */\n\tfunction HashMap(array, isolatedUid) {\n\t if (isolatedUid) {\n\t var uid = 0;\n\t this.nextUid = function() {\n\t return ++uid;\n\t };\n\t }\n\t forEach(array, this.put, this);\n\t}\n\tHashMap.prototype = {\n\t /**\n\t * Store key value pair\n\t * @param key key to store can be any type\n\t * @param value value to store can be any type\n\t */\n\t put: function(key, value) {\n\t this[hashKey(key, this.nextUid)] = value;\n\t },\n\t\n\t /**\n\t * @param key\n\t * @returns {Object} the value for the key\n\t */\n\t get: function(key) {\n\t return this[hashKey(key, this.nextUid)];\n\t },\n\t\n\t /**\n\t * Remove the key/value pair\n\t * @param key\n\t */\n\t remove: function(key) {\n\t var value = this[key = hashKey(key, this.nextUid)];\n\t delete this[key];\n\t return value;\n\t }\n\t};\n\t\n\tvar $$HashMapProvider = [function() {\n\t this.$get = [function() {\n\t return HashMap;\n\t }];\n\t}];\n\t\n\t/**\n\t * @ngdoc function\n\t * @module ng\n\t * @name angular.injector\n\t * @kind function\n\t *\n\t * @description\n\t * Creates an injector object that can be used for retrieving services as well as for\n\t * dependency injection (see {@link guide/di dependency injection}).\n\t *\n\t * @param {Array.<string|Function>} modules A list of module functions or their aliases. See\n\t * {@link angular.module}. The `ng` module must be explicitly added.\n\t * @param {boolean=} [strictDi=false] Whether the injector should be in strict mode, which\n\t * disallows argument name annotation inference.\n\t * @returns {injector} Injector object. See {@link auto.$injector $injector}.\n\t *\n\t * @example\n\t * Typical usage\n\t * ```js\n\t * // create an injector\n\t * var $injector = angular.injector(['ng']);\n\t *\n\t * // use the injector to kick off your application\n\t * // use the type inference to auto inject arguments, or use implicit injection\n\t * $injector.invoke(function($rootScope, $compile, $document) {\n\t * $compile($document)($rootScope);\n\t * $rootScope.$digest();\n\t * });\n\t * ```\n\t *\n\t * Sometimes you want to get access to the injector of a currently running Angular app\n\t * from outside Angular. Perhaps, you want to inject and compile some markup after the\n\t * application has been bootstrapped. You can do this using the extra `injector()` added\n\t * to JQuery/jqLite elements. See {@link angular.element}.\n\t *\n\t * *This is fairly rare but could be the case if a third party library is injecting the\n\t * markup.*\n\t *\n\t * In the following example a new block of HTML containing a `ng-controller`\n\t * directive is added to the end of the document body by JQuery. We then compile and link\n\t * it into the current AngularJS scope.\n\t *\n\t * ```js\n\t * var $div = $('<div ng-controller=\"MyCtrl\">{{content.label}}</div>');\n\t * $(document.body).append($div);\n\t *\n\t * angular.element(document).injector().invoke(function($compile) {\n\t * var scope = angular.element($div).scope();\n\t * $compile($div)(scope);\n\t * });\n\t * ```\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc module\n\t * @name auto\n\t * @description\n\t *\n\t * Implicit module which gets automatically added to each {@link auto.$injector $injector}.\n\t */\n\t\n\tvar FN_ARGS = /^[^\\(]*\\(\\s*([^\\)]*)\\)/m;\n\tvar FN_ARG_SPLIT = /,/;\n\tvar FN_ARG = /^\\s*(_?)(\\S+?)\\1\\s*$/;\n\tvar STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\n\tvar $injectorMinErr = minErr('$injector');\n\t\n\tfunction anonFn(fn) {\n\t // For anonymous functions, showing at the very least the function signature can help in\n\t // debugging.\n\t var fnText = fn.toString().replace(STRIP_COMMENTS, ''),\n\t args = fnText.match(FN_ARGS);\n\t if (args) {\n\t return 'function(' + (args[1] || '').replace(/[\\s\\r\\n]+/, ' ') + ')';\n\t }\n\t return 'fn';\n\t}\n\t\n\tfunction annotate(fn, strictDi, name) {\n\t var $inject,\n\t fnText,\n\t argDecl,\n\t last;\n\t\n\t if (typeof fn === 'function') {\n\t if (!($inject = fn.$inject)) {\n\t $inject = [];\n\t if (fn.length) {\n\t if (strictDi) {\n\t if (!isString(name) || !name) {\n\t name = fn.name || anonFn(fn);\n\t }\n\t throw $injectorMinErr('strictdi',\n\t '{0} is not using explicit annotation and cannot be invoked in strict mode', name);\n\t }\n\t fnText = fn.toString().replace(STRIP_COMMENTS, '');\n\t argDecl = fnText.match(FN_ARGS);\n\t forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg) {\n\t arg.replace(FN_ARG, function(all, underscore, name) {\n\t $inject.push(name);\n\t });\n\t });\n\t }\n\t fn.$inject = $inject;\n\t }\n\t } else if (isArray(fn)) {\n\t last = fn.length - 1;\n\t assertArgFn(fn[last], 'fn');\n\t $inject = fn.slice(0, last);\n\t } else {\n\t assertArgFn(fn, 'fn', true);\n\t }\n\t return $inject;\n\t}\n\t\n\t///////////////////////////////////////\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $injector\n\t *\n\t * @description\n\t *\n\t * `$injector` is used to retrieve object instances as defined by\n\t * {@link auto.$provide provider}, instantiate types, invoke methods,\n\t * and load modules.\n\t *\n\t * The following always holds true:\n\t *\n\t * ```js\n\t * var $injector = angular.injector();\n\t * expect($injector.get('$injector')).toBe($injector);\n\t * expect($injector.invoke(function($injector) {\n\t * return $injector;\n\t * })).toBe($injector);\n\t * ```\n\t *\n\t * # Injection Function Annotation\n\t *\n\t * JavaScript does not have annotations, and annotations are needed for dependency injection. The\n\t * following are all valid ways of annotating function with injection arguments and are equivalent.\n\t *\n\t * ```js\n\t * // inferred (only works if code not minified/obfuscated)\n\t * $injector.invoke(function(serviceA){});\n\t *\n\t * // annotated\n\t * function explicit(serviceA) {};\n\t * explicit.$inject = ['serviceA'];\n\t * $injector.invoke(explicit);\n\t *\n\t * // inline\n\t * $injector.invoke(['serviceA', function(serviceA){}]);\n\t * ```\n\t *\n\t * ## Inference\n\t *\n\t * In JavaScript calling `toString()` on a function returns the function definition. The definition\n\t * can then be parsed and the function arguments can be extracted. This method of discovering\n\t * annotations is disallowed when the injector is in strict mode.\n\t * *NOTE:* This does not work with minification, and obfuscation tools since these tools change the\n\t * argument names.\n\t *\n\t * ## `$inject` Annotation\n\t * By adding an `$inject` property onto a function the injection parameters can be specified.\n\t *\n\t * ## Inline\n\t * As an array of injection names, where the last item in the array is the function to call.\n\t */\n\t\n\t/**\n\t * @ngdoc method\n\t * @name $injector#get\n\t *\n\t * @description\n\t * Return an instance of the service.\n\t *\n\t * @param {string} name The name of the instance to retrieve.\n\t * @param {string=} caller An optional string to provide the origin of the function call for error messages.\n\t * @return {*} The instance.\n\t */\n\t\n\t/**\n\t * @ngdoc method\n\t * @name $injector#invoke\n\t *\n\t * @description\n\t * Invoke the method and supply the method arguments from the `$injector`.\n\t *\n\t * @param {Function|Array.<string|Function>} fn The injectable function to invoke. Function parameters are\n\t * injected according to the {@link guide/di $inject Annotation} rules.\n\t * @param {Object=} self The `this` for the invoked method.\n\t * @param {Object=} locals Optional object. If preset then any argument names are read from this\n\t * object first, before the `$injector` is consulted.\n\t * @returns {*} the value returned by the invoked `fn` function.\n\t */\n\t\n\t/**\n\t * @ngdoc method\n\t * @name $injector#has\n\t *\n\t * @description\n\t * Allows the user to query if the particular service exists.\n\t *\n\t * @param {string} name Name of the service to query.\n\t * @returns {boolean} `true` if injector has given service.\n\t */\n\t\n\t/**\n\t * @ngdoc method\n\t * @name $injector#instantiate\n\t * @description\n\t * Create a new instance of JS type. The method takes a constructor function, invokes the new\n\t * operator, and supplies all of the arguments to the constructor function as specified by the\n\t * constructor annotation.\n\t *\n\t * @param {Function} Type Annotated constructor function.\n\t * @param {Object=} locals Optional object. If preset then any argument names are read from this\n\t * object first, before the `$injector` is consulted.\n\t * @returns {Object} new instance of `Type`.\n\t */\n\t\n\t/**\n\t * @ngdoc method\n\t * @name $injector#annotate\n\t *\n\t * @description\n\t * Returns an array of service names which the function is requesting for injection. This API is\n\t * used by the injector to determine which services need to be injected into the function when the\n\t * function is invoked. There are three ways in which the function can be annotated with the needed\n\t * dependencies.\n\t *\n\t * # Argument names\n\t *\n\t * The simplest form is to extract the dependencies from the arguments of the function. This is done\n\t * by converting the function into a string using `toString()` method and extracting the argument\n\t * names.\n\t * ```js\n\t * // Given\n\t * function MyController($scope, $route) {\n\t * // ...\n\t * }\n\t *\n\t * // Then\n\t * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n\t * ```\n\t *\n\t * You can disallow this method by using strict injection mode.\n\t *\n\t * This method does not work with code minification / obfuscation. For this reason the following\n\t * annotation strategies are supported.\n\t *\n\t * # The `$inject` property\n\t *\n\t * If a function has an `$inject` property and its value is an array of strings, then the strings\n\t * represent names of services to be injected into the function.\n\t * ```js\n\t * // Given\n\t * var MyController = function(obfuscatedScope, obfuscatedRoute) {\n\t * // ...\n\t * }\n\t * // Define function dependencies\n\t * MyController['$inject'] = ['$scope', '$route'];\n\t *\n\t * // Then\n\t * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n\t * ```\n\t *\n\t * # The array notation\n\t *\n\t * It is often desirable to inline Injected functions and that's when setting the `$inject` property\n\t * is very inconvenient. In these situations using the array notation to specify the dependencies in\n\t * a way that survives minification is a better choice:\n\t *\n\t * ```js\n\t * // We wish to write this (not minification / obfuscation safe)\n\t * injector.invoke(function($compile, $rootScope) {\n\t * // ...\n\t * });\n\t *\n\t * // We are forced to write break inlining\n\t * var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {\n\t * // ...\n\t * };\n\t * tmpFn.$inject = ['$compile', '$rootScope'];\n\t * injector.invoke(tmpFn);\n\t *\n\t * // To better support inline function the inline annotation is supported\n\t * injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {\n\t * // ...\n\t * }]);\n\t *\n\t * // Therefore\n\t * expect(injector.annotate(\n\t * ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])\n\t * ).toEqual(['$compile', '$rootScope']);\n\t * ```\n\t *\n\t * @param {Function|Array.<string|Function>} fn Function for which dependent service names need to\n\t * be retrieved as described above.\n\t *\n\t * @param {boolean=} [strictDi=false] Disallow argument name annotation inference.\n\t *\n\t * @returns {Array.<string>} The names of the services which the function requires.\n\t */\n\t\n\t\n\t\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $provide\n\t *\n\t * @description\n\t *\n\t * The {@link auto.$provide $provide} service has a number of methods for registering components\n\t * with the {@link auto.$injector $injector}. Many of these functions are also exposed on\n\t * {@link angular.Module}.\n\t *\n\t * An Angular **service** is a singleton object created by a **service factory**. These **service\n\t * factories** are functions which, in turn, are created by a **service provider**.\n\t * The **service providers** are constructor functions. When instantiated they must contain a\n\t * property called `$get`, which holds the **service factory** function.\n\t *\n\t * When you request a service, the {@link auto.$injector $injector} is responsible for finding the\n\t * correct **service provider**, instantiating it and then calling its `$get` **service factory**\n\t * function to get the instance of the **service**.\n\t *\n\t * Often services have no configuration options and there is no need to add methods to the service\n\t * provider. The provider will be no more than a constructor function with a `$get` property. For\n\t * these cases the {@link auto.$provide $provide} service has additional helper methods to register\n\t * services without specifying a provider.\n\t *\n\t * * {@link auto.$provide#provider provider(provider)} - registers a **service provider** with the\n\t * {@link auto.$injector $injector}\n\t * * {@link auto.$provide#constant constant(obj)} - registers a value/object that can be accessed by\n\t * providers and services.\n\t * * {@link auto.$provide#value value(obj)} - registers a value/object that can only be accessed by\n\t * services, not providers.\n\t * * {@link auto.$provide#factory factory(fn)} - registers a service **factory function**, `fn`,\n\t * that will be wrapped in a **service provider** object, whose `$get` property will contain the\n\t * given factory function.\n\t * * {@link auto.$provide#service service(class)} - registers a **constructor function**, `class`\n\t * that will be wrapped in a **service provider** object, whose `$get` property will instantiate\n\t * a new object using the given constructor function.\n\t *\n\t * See the individual methods for more information and examples.\n\t */\n\t\n\t/**\n\t * @ngdoc method\n\t * @name $provide#provider\n\t * @description\n\t *\n\t * Register a **provider function** with the {@link auto.$injector $injector}. Provider functions\n\t * are constructor functions, whose instances are responsible for \"providing\" a factory for a\n\t * service.\n\t *\n\t * Service provider names start with the name of the service they provide followed by `Provider`.\n\t * For example, the {@link ng.$log $log} service has a provider called\n\t * {@link ng.$logProvider $logProvider}.\n\t *\n\t * Service provider objects can have additional methods which allow configuration of the provider\n\t * and its service. Importantly, you can configure what kind of service is created by the `$get`\n\t * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a\n\t * method {@link ng.$logProvider#debugEnabled debugEnabled}\n\t * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the\n\t * console or not.\n\t *\n\t * @param {string} name The name of the instance. NOTE: the provider will be available under `name +\n\t 'Provider'` key.\n\t * @param {(Object|function())} provider If the provider is:\n\t *\n\t * - `Object`: then it should have a `$get` method. The `$get` method will be invoked using\n\t * {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created.\n\t * - `Constructor`: a new instance of the provider will be created using\n\t * {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`.\n\t *\n\t * @returns {Object} registered provider instance\n\t\n\t * @example\n\t *\n\t * The following example shows how to create a simple event tracking service and register it using\n\t * {@link auto.$provide#provider $provide.provider()}.\n\t *\n\t * ```js\n\t * // Define the eventTracker provider\n\t * function EventTrackerProvider() {\n\t * var trackingUrl = '/track';\n\t *\n\t * // A provider method for configuring where the tracked events should been saved\n\t * this.setTrackingUrl = function(url) {\n\t * trackingUrl = url;\n\t * };\n\t *\n\t * // The service factory function\n\t * this.$get = ['$http', function($http) {\n\t * var trackedEvents = {};\n\t * return {\n\t * // Call this to track an event\n\t * event: function(event) {\n\t * var count = trackedEvents[event] || 0;\n\t * count += 1;\n\t * trackedEvents[event] = count;\n\t * return count;\n\t * },\n\t * // Call this to save the tracked events to the trackingUrl\n\t * save: function() {\n\t * $http.post(trackingUrl, trackedEvents);\n\t * }\n\t * };\n\t * }];\n\t * }\n\t *\n\t * describe('eventTracker', function() {\n\t * var postSpy;\n\t *\n\t * beforeEach(module(function($provide) {\n\t * // Register the eventTracker provider\n\t * $provide.provider('eventTracker', EventTrackerProvider);\n\t * }));\n\t *\n\t * beforeEach(module(function(eventTrackerProvider) {\n\t * // Configure eventTracker provider\n\t * eventTrackerProvider.setTrackingUrl('/custom-track');\n\t * }));\n\t *\n\t * it('tracks events', inject(function(eventTracker) {\n\t * expect(eventTracker.event('login')).toEqual(1);\n\t * expect(eventTracker.event('login')).toEqual(2);\n\t * }));\n\t *\n\t * it('saves to the tracking url', inject(function(eventTracker, $http) {\n\t * postSpy = spyOn($http, 'post');\n\t * eventTracker.event('login');\n\t * eventTracker.save();\n\t * expect(postSpy).toHaveBeenCalled();\n\t * expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track');\n\t * expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track');\n\t * expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 });\n\t * }));\n\t * });\n\t * ```\n\t */\n\t\n\t/**\n\t * @ngdoc method\n\t * @name $provide#factory\n\t * @description\n\t *\n\t * Register a **service factory**, which will be called to return the service instance.\n\t * This is short for registering a service where its provider consists of only a `$get` property,\n\t * which is the given service factory function.\n\t * You should use {@link auto.$provide#factory $provide.factory(getFn)} if you do not need to\n\t * configure your service in a provider.\n\t *\n\t * @param {string} name The name of the instance.\n\t * @param {Function|Array.<string|Function>} $getFn The injectable $getFn for the instance creation.\n\t * Internally this is a short hand for `$provide.provider(name, {$get: $getFn})`.\n\t * @returns {Object} registered provider instance\n\t *\n\t * @example\n\t * Here is an example of registering a service\n\t * ```js\n\t * $provide.factory('ping', ['$http', function($http) {\n\t * return function ping() {\n\t * return $http.send('/ping');\n\t * };\n\t * }]);\n\t * ```\n\t * You would then inject and use this service like this:\n\t * ```js\n\t * someModule.controller('Ctrl', ['ping', function(ping) {\n\t * ping();\n\t * }]);\n\t * ```\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc method\n\t * @name $provide#service\n\t * @description\n\t *\n\t * Register a **service constructor**, which will be invoked with `new` to create the service\n\t * instance.\n\t * This is short for registering a service where its provider's `$get` property is a factory\n\t * function that returns an instance instantiated by the injector from the service constructor\n\t * function.\n\t *\n\t * Internally it looks a bit like this:\n\t *\n\t * ```\n\t * {\n\t * $get: function() {\n\t * return $injector.instantiate(constructor);\n\t * }\n\t * }\n\t * ```\n\t *\n\t *\n\t * You should use {@link auto.$provide#service $provide.service(class)} if you define your service\n\t * as a type/class.\n\t *\n\t * @param {string} name The name of the instance.\n\t * @param {Function|Array.<string|Function>} constructor An injectable class (constructor function)\n\t * that will be instantiated.\n\t * @returns {Object} registered provider instance\n\t *\n\t * @example\n\t * Here is an example of registering a service using\n\t * {@link auto.$provide#service $provide.service(class)}.\n\t * ```js\n\t * var Ping = function($http) {\n\t * this.$http = $http;\n\t * };\n\t *\n\t * Ping.$inject = ['$http'];\n\t *\n\t * Ping.prototype.send = function() {\n\t * return this.$http.get('/ping');\n\t * };\n\t * $provide.service('ping', Ping);\n\t * ```\n\t * You would then inject and use this service like this:\n\t * ```js\n\t * someModule.controller('Ctrl', ['ping', function(ping) {\n\t * ping.send();\n\t * }]);\n\t * ```\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc method\n\t * @name $provide#value\n\t * @description\n\t *\n\t * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a\n\t * number, an array, an object or a function. This is short for registering a service where its\n\t * provider's `$get` property is a factory function that takes no arguments and returns the **value\n\t * service**. That also means it is not possible to inject other services into a value service.\n\t *\n\t * Value services are similar to constant services, except that they cannot be injected into a\n\t * module configuration function (see {@link angular.Module#config}) but they can be overridden by\n\t * an Angular {@link auto.$provide#decorator decorator}.\n\t *\n\t * @param {string} name The name of the instance.\n\t * @param {*} value The value.\n\t * @returns {Object} registered provider instance\n\t *\n\t * @example\n\t * Here are some examples of creating value services.\n\t * ```js\n\t * $provide.value('ADMIN_USER', 'admin');\n\t *\n\t * $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 });\n\t *\n\t * $provide.value('halfOf', function(value) {\n\t * return value / 2;\n\t * });\n\t * ```\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc method\n\t * @name $provide#constant\n\t * @description\n\t *\n\t * Register a **constant service** with the {@link auto.$injector $injector}, such as a string,\n\t * a number, an array, an object or a function. Like the {@link auto.$provide#value value}, it is not\n\t * possible to inject other services into a constant.\n\t *\n\t * But unlike {@link auto.$provide#value value}, a constant can be\n\t * injected into a module configuration function (see {@link angular.Module#config}) and it cannot\n\t * be overridden by an Angular {@link auto.$provide#decorator decorator}.\n\t *\n\t * @param {string} name The name of the constant.\n\t * @param {*} value The constant value.\n\t * @returns {Object} registered instance\n\t *\n\t * @example\n\t * Here a some examples of creating constants:\n\t * ```js\n\t * $provide.constant('SHARD_HEIGHT', 306);\n\t *\n\t * $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']);\n\t *\n\t * $provide.constant('double', function(value) {\n\t * return value * 2;\n\t * });\n\t * ```\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc method\n\t * @name $provide#decorator\n\t * @description\n\t *\n\t * Register a **service decorator** with the {@link auto.$injector $injector}. A service decorator\n\t * intercepts the creation of a service, allowing it to override or modify the behavior of the\n\t * service. The object returned by the decorator may be the original service, or a new service\n\t * object which replaces or wraps and delegates to the original service.\n\t *\n\t * @param {string} name The name of the service to decorate.\n\t * @param {Function|Array.<string|Function>} decorator This function will be invoked when the service needs to be\n\t * instantiated and should return the decorated service instance. The function is called using\n\t * the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable.\n\t * Local injection arguments:\n\t *\n\t * * `$delegate` - The original service instance, which can be monkey patched, configured,\n\t * decorated or delegated to.\n\t *\n\t * @example\n\t * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting\n\t * calls to {@link ng.$log#error $log.warn()}.\n\t * ```js\n\t * $provide.decorator('$log', ['$delegate', function($delegate) {\n\t * $delegate.warn = $delegate.error;\n\t * return $delegate;\n\t * }]);\n\t * ```\n\t */\n\t\n\t\n\tfunction createInjector(modulesToLoad, strictDi) {\n\t strictDi = (strictDi === true);\n\t var INSTANTIATING = {},\n\t providerSuffix = 'Provider',\n\t path = [],\n\t loadedModules = new HashMap([], true),\n\t providerCache = {\n\t $provide: {\n\t provider: supportObject(provider),\n\t factory: supportObject(factory),\n\t service: supportObject(service),\n\t value: supportObject(value),\n\t constant: supportObject(constant),\n\t decorator: decorator\n\t }\n\t },\n\t providerInjector = (providerCache.$injector =\n\t createInternalInjector(providerCache, function(serviceName, caller) {\n\t if (angular.isString(caller)) {\n\t path.push(caller);\n\t }\n\t throw $injectorMinErr('unpr', \"Unknown provider: {0}\", path.join(' <- '));\n\t })),\n\t instanceCache = {},\n\t instanceInjector = (instanceCache.$injector =\n\t createInternalInjector(instanceCache, function(serviceName, caller) {\n\t var provider = providerInjector.get(serviceName + providerSuffix, caller);\n\t return instanceInjector.invoke(provider.$get, provider, undefined, serviceName);\n\t }));\n\t\n\t\n\t forEach(loadModules(modulesToLoad), function(fn) { if (fn) instanceInjector.invoke(fn); });\n\t\n\t return instanceInjector;\n\t\n\t ////////////////////////////////////\n\t // $provider\n\t ////////////////////////////////////\n\t\n\t function supportObject(delegate) {\n\t return function(key, value) {\n\t if (isObject(key)) {\n\t forEach(key, reverseParams(delegate));\n\t } else {\n\t return delegate(key, value);\n\t }\n\t };\n\t }\n\t\n\t function provider(name, provider_) {\n\t assertNotHasOwnProperty(name, 'service');\n\t if (isFunction(provider_) || isArray(provider_)) {\n\t provider_ = providerInjector.instantiate(provider_);\n\t }\n\t if (!provider_.$get) {\n\t throw $injectorMinErr('pget', \"Provider '{0}' must define $get factory method.\", name);\n\t }\n\t return providerCache[name + providerSuffix] = provider_;\n\t }\n\t\n\t function enforceReturnValue(name, factory) {\n\t return function enforcedReturnValue() {\n\t var result = instanceInjector.invoke(factory, this);\n\t if (isUndefined(result)) {\n\t throw $injectorMinErr('undef', \"Provider '{0}' must return a value from $get factory method.\", name);\n\t }\n\t return result;\n\t };\n\t }\n\t\n\t function factory(name, factoryFn, enforce) {\n\t return provider(name, {\n\t $get: enforce !== false ? enforceReturnValue(name, factoryFn) : factoryFn\n\t });\n\t }\n\t\n\t function service(name, constructor) {\n\t return factory(name, ['$injector', function($injector) {\n\t return $injector.instantiate(constructor);\n\t }]);\n\t }\n\t\n\t function value(name, val) { return factory(name, valueFn(val), false); }\n\t\n\t function constant(name, value) {\n\t assertNotHasOwnProperty(name, 'constant');\n\t providerCache[name] = value;\n\t instanceCache[name] = value;\n\t }\n\t\n\t function decorator(serviceName, decorFn) {\n\t var origProvider = providerInjector.get(serviceName + providerSuffix),\n\t orig$get = origProvider.$get;\n\t\n\t origProvider.$get = function() {\n\t var origInstance = instanceInjector.invoke(orig$get, origProvider);\n\t return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});\n\t };\n\t }\n\t\n\t ////////////////////////////////////\n\t // Module Loading\n\t ////////////////////////////////////\n\t function loadModules(modulesToLoad) {\n\t assertArg(isUndefined(modulesToLoad) || isArray(modulesToLoad), 'modulesToLoad', 'not an array');\n\t var runBlocks = [], moduleFn;\n\t forEach(modulesToLoad, function(module) {\n\t if (loadedModules.get(module)) return;\n\t loadedModules.put(module, true);\n\t\n\t function runInvokeQueue(queue) {\n\t var i, ii;\n\t for (i = 0, ii = queue.length; i < ii; i++) {\n\t var invokeArgs = queue[i],\n\t provider = providerInjector.get(invokeArgs[0]);\n\t\n\t provider[invokeArgs[1]].apply(provider, invokeArgs[2]);\n\t }\n\t }\n\t\n\t try {\n\t if (isString(module)) {\n\t moduleFn = angularModule(module);\n\t runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);\n\t runInvokeQueue(moduleFn._invokeQueue);\n\t runInvokeQueue(moduleFn._configBlocks);\n\t } else if (isFunction(module)) {\n\t runBlocks.push(providerInjector.invoke(module));\n\t } else if (isArray(module)) {\n\t runBlocks.push(providerInjector.invoke(module));\n\t } else {\n\t assertArgFn(module, 'module');\n\t }\n\t } catch (e) {\n\t if (isArray(module)) {\n\t module = module[module.length - 1];\n\t }\n\t if (e.message && e.stack && e.stack.indexOf(e.message) == -1) {\n\t // Safari & FF's stack traces don't contain error.message content\n\t // unlike those of Chrome and IE\n\t // So if stack doesn't contain message, we create a new string that contains both.\n\t // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here.\n\t /* jshint -W022 */\n\t e = e.message + '\\n' + e.stack;\n\t }\n\t throw $injectorMinErr('modulerr', \"Failed to instantiate module {0} due to:\\n{1}\",\n\t module, e.stack || e.message || e);\n\t }\n\t });\n\t return runBlocks;\n\t }\n\t\n\t ////////////////////////////////////\n\t // internal Injector\n\t ////////////////////////////////////\n\t\n\t function createInternalInjector(cache, factory) {\n\t\n\t function getService(serviceName, caller) {\n\t if (cache.hasOwnProperty(serviceName)) {\n\t if (cache[serviceName] === INSTANTIATING) {\n\t throw $injectorMinErr('cdep', 'Circular dependency found: {0}',\n\t serviceName + ' <- ' + path.join(' <- '));\n\t }\n\t return cache[serviceName];\n\t } else {\n\t try {\n\t path.unshift(serviceName);\n\t cache[serviceName] = INSTANTIATING;\n\t return cache[serviceName] = factory(serviceName, caller);\n\t } catch (err) {\n\t if (cache[serviceName] === INSTANTIATING) {\n\t delete cache[serviceName];\n\t }\n\t throw err;\n\t } finally {\n\t path.shift();\n\t }\n\t }\n\t }\n\t\n\t function invoke(fn, self, locals, serviceName) {\n\t if (typeof locals === 'string') {\n\t serviceName = locals;\n\t locals = null;\n\t }\n\t\n\t var args = [],\n\t $inject = createInjector.$$annotate(fn, strictDi, serviceName),\n\t length, i,\n\t key;\n\t\n\t for (i = 0, length = $inject.length; i < length; i++) {\n\t key = $inject[i];\n\t if (typeof key !== 'string') {\n\t throw $injectorMinErr('itkn',\n\t 'Incorrect injection token! Expected service name as string, got {0}', key);\n\t }\n\t args.push(\n\t locals && locals.hasOwnProperty(key)\n\t ? locals[key]\n\t : getService(key, serviceName)\n\t );\n\t }\n\t if (isArray(fn)) {\n\t fn = fn[length];\n\t }\n\t\n\t // http://jsperf.com/angularjs-invoke-apply-vs-switch\n\t // #5388\n\t return fn.apply(self, args);\n\t }\n\t\n\t function instantiate(Type, locals, serviceName) {\n\t // Check if Type is annotated and use just the given function at n-1 as parameter\n\t // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);\n\t // Object creation: http://jsperf.com/create-constructor/2\n\t var instance = Object.create((isArray(Type) ? Type[Type.length - 1] : Type).prototype || null);\n\t var returnedValue = invoke(Type, instance, locals, serviceName);\n\t\n\t return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance;\n\t }\n\t\n\t return {\n\t invoke: invoke,\n\t instantiate: instantiate,\n\t get: getService,\n\t annotate: createInjector.$$annotate,\n\t has: function(name) {\n\t return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name);\n\t }\n\t };\n\t }\n\t}\n\t\n\tcreateInjector.$$annotate = annotate;\n\t\n\t/**\n\t * @ngdoc provider\n\t * @name $anchorScrollProvider\n\t *\n\t * @description\n\t * Use `$anchorScrollProvider` to disable automatic scrolling whenever\n\t * {@link ng.$location#hash $location.hash()} changes.\n\t */\n\tfunction $AnchorScrollProvider() {\n\t\n\t var autoScrollingEnabled = true;\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $anchorScrollProvider#disableAutoScrolling\n\t *\n\t * @description\n\t * By default, {@link ng.$anchorScroll $anchorScroll()} will automatically detect changes to\n\t * {@link ng.$location#hash $location.hash()} and scroll to the element matching the new hash.<br />\n\t * Use this method to disable automatic scrolling.\n\t *\n\t * If automatic scrolling is disabled, one must explicitly call\n\t * {@link ng.$anchorScroll $anchorScroll()} in order to scroll to the element related to the\n\t * current hash.\n\t */\n\t this.disableAutoScrolling = function() {\n\t autoScrollingEnabled = false;\n\t };\n\t\n\t /**\n\t * @ngdoc service\n\t * @name $anchorScroll\n\t * @kind function\n\t * @requires $window\n\t * @requires $location\n\t * @requires $rootScope\n\t *\n\t * @description\n\t * When called, it scrolls to the element related to the specified `hash` or (if omitted) to the\n\t * current value of {@link ng.$location#hash $location.hash()}, according to the rules specified\n\t * in the\n\t * [HTML5 spec](http://www.w3.org/html/wg/drafts/html/master/browsers.html#an-indicated-part-of-the-document).\n\t *\n\t * It also watches the {@link ng.$location#hash $location.hash()} and automatically scrolls to\n\t * match any anchor whenever it changes. This can be disabled by calling\n\t * {@link ng.$anchorScrollProvider#disableAutoScrolling $anchorScrollProvider.disableAutoScrolling()}.\n\t *\n\t * Additionally, you can use its {@link ng.$anchorScroll#yOffset yOffset} property to specify a\n\t * vertical scroll-offset (either fixed or dynamic).\n\t *\n\t * @param {string=} hash The hash specifying the element to scroll to. If omitted, the value of\n\t * {@link ng.$location#hash $location.hash()} will be used.\n\t *\n\t * @property {(number|function|jqLite)} yOffset\n\t * If set, specifies a vertical scroll-offset. This is often useful when there are fixed\n\t * positioned elements at the top of the page, such as navbars, headers etc.\n\t *\n\t * `yOffset` can be specified in various ways:\n\t * - **number**: A fixed number of pixels to be used as offset.<br /><br />\n\t * - **function**: A getter function called everytime `$anchorScroll()` is executed. Must return\n\t * a number representing the offset (in pixels).<br /><br />\n\t * - **jqLite**: A jqLite/jQuery element to be used for specifying the offset. The distance from\n\t * the top of the page to the element's bottom will be used as offset.<br />\n\t * **Note**: The element will be taken into account only as long as its `position` is set to\n\t * `fixed`. This option is useful, when dealing with responsive navbars/headers that adjust\n\t * their height and/or positioning according to the viewport's size.\n\t *\n\t * <br />\n\t * <div class=\"alert alert-warning\">\n\t * In order for `yOffset` to work properly, scrolling should take place on the document's root and\n\t * not some child element.\n\t * </div>\n\t *\n\t * @example\n\t <example module=\"anchorScrollExample\">\n\t <file name=\"index.html\">\n\t <div id=\"scrollArea\" ng-controller=\"ScrollController\">\n\t <a ng-click=\"gotoBottom()\">Go to bottom</a>\n\t <a id=\"bottom\"></a> You're at the bottom!\n\t </div>\n\t </file>\n\t <file name=\"script.js\">\n\t angular.module('anchorScrollExample', [])\n\t .controller('ScrollController', ['$scope', '$location', '$anchorScroll',\n\t function ($scope, $location, $anchorScroll) {\n\t $scope.gotoBottom = function() {\n\t // set the location.hash to the id of\n\t // the element you wish to scroll to.\n\t $location.hash('bottom');\n\t\n\t // call $anchorScroll()\n\t $anchorScroll();\n\t };\n\t }]);\n\t </file>\n\t <file name=\"style.css\">\n\t #scrollArea {\n\t height: 280px;\n\t overflow: auto;\n\t }\n\t\n\t #bottom {\n\t display: block;\n\t margin-top: 2000px;\n\t }\n\t </file>\n\t </example>\n\t *\n\t * <hr />\n\t * The example below illustrates the use of a vertical scroll-offset (specified as a fixed value).\n\t * See {@link ng.$anchorScroll#yOffset $anchorScroll.yOffset} for more details.\n\t *\n\t * @example\n\t <example module=\"anchorScrollOffsetExample\">\n\t <file name=\"index.html\">\n\t <div class=\"fixed-header\" ng-controller=\"headerCtrl\">\n\t <a href=\"\" ng-click=\"gotoAnchor(x)\" ng-repeat=\"x in [1,2,3,4,5]\">\n\t Go to anchor {{x}}\n\t </a>\n\t </div>\n\t <div id=\"anchor{{x}}\" class=\"anchor\" ng-repeat=\"x in [1,2,3,4,5]\">\n\t Anchor {{x}} of 5\n\t </div>\n\t </file>\n\t <file name=\"script.js\">\n\t angular.module('anchorScrollOffsetExample', [])\n\t .run(['$anchorScroll', function($anchorScroll) {\n\t $anchorScroll.yOffset = 50; // always scroll by 50 extra pixels\n\t }])\n\t .controller('headerCtrl', ['$anchorScroll', '$location', '$scope',\n\t function ($anchorScroll, $location, $scope) {\n\t $scope.gotoAnchor = function(x) {\n\t var newHash = 'anchor' + x;\n\t if ($location.hash() !== newHash) {\n\t // set the $location.hash to `newHash` and\n\t // $anchorScroll will automatically scroll to it\n\t $location.hash('anchor' + x);\n\t } else {\n\t // call $anchorScroll() explicitly,\n\t // since $location.hash hasn't changed\n\t $anchorScroll();\n\t }\n\t };\n\t }\n\t ]);\n\t </file>\n\t <file name=\"style.css\">\n\t body {\n\t padding-top: 50px;\n\t }\n\t\n\t .anchor {\n\t border: 2px dashed DarkOrchid;\n\t padding: 10px 10px 200px 10px;\n\t }\n\t\n\t .fixed-header {\n\t background-color: rgba(0, 0, 0, 0.2);\n\t height: 50px;\n\t position: fixed;\n\t top: 0; left: 0; right: 0;\n\t }\n\t\n\t .fixed-header > a {\n\t display: inline-block;\n\t margin: 5px 15px;\n\t }\n\t </file>\n\t </example>\n\t */\n\t this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {\n\t var document = $window.document;\n\t\n\t // Helper function to get first anchor from a NodeList\n\t // (using `Array#some()` instead of `angular#forEach()` since it's more performant\n\t // and working in all supported browsers.)\n\t function getFirstAnchor(list) {\n\t var result = null;\n\t Array.prototype.some.call(list, function(element) {\n\t if (nodeName_(element) === 'a') {\n\t result = element;\n\t return true;\n\t }\n\t });\n\t return result;\n\t }\n\t\n\t function getYOffset() {\n\t\n\t var offset = scroll.yOffset;\n\t\n\t if (isFunction(offset)) {\n\t offset = offset();\n\t } else if (isElement(offset)) {\n\t var elem = offset[0];\n\t var style = $window.getComputedStyle(elem);\n\t if (style.position !== 'fixed') {\n\t offset = 0;\n\t } else {\n\t offset = elem.getBoundingClientRect().bottom;\n\t }\n\t } else if (!isNumber(offset)) {\n\t offset = 0;\n\t }\n\t\n\t return offset;\n\t }\n\t\n\t function scrollTo(elem) {\n\t if (elem) {\n\t elem.scrollIntoView();\n\t\n\t var offset = getYOffset();\n\t\n\t if (offset) {\n\t // `offset` is the number of pixels we should scroll UP in order to align `elem` properly.\n\t // This is true ONLY if the call to `elem.scrollIntoView()` initially aligns `elem` at the\n\t // top of the viewport.\n\t //\n\t // IF the number of pixels from the top of `elem` to the end of the page's content is less\n\t // than the height of the viewport, then `elem.scrollIntoView()` will align the `elem` some\n\t // way down the page.\n\t //\n\t // This is often the case for elements near the bottom of the page.\n\t //\n\t // In such cases we do not need to scroll the whole `offset` up, just the difference between\n\t // the top of the element and the offset, which is enough to align the top of `elem` at the\n\t // desired position.\n\t var elemTop = elem.getBoundingClientRect().top;\n\t $window.scrollBy(0, elemTop - offset);\n\t }\n\t } else {\n\t $window.scrollTo(0, 0);\n\t }\n\t }\n\t\n\t function scroll(hash) {\n\t hash = isString(hash) ? hash : $location.hash();\n\t var elm;\n\t\n\t // empty hash, scroll to the top of the page\n\t if (!hash) scrollTo(null);\n\t\n\t // element with given id\n\t else if ((elm = document.getElementById(hash))) scrollTo(elm);\n\t\n\t // first anchor with given name :-D\n\t else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) scrollTo(elm);\n\t\n\t // no element and hash == 'top', scroll to the top of the page\n\t else if (hash === 'top') scrollTo(null);\n\t }\n\t\n\t // does not scroll when user clicks on anchor link that is currently on\n\t // (no url change, no $location.hash() change), browser native does scroll\n\t if (autoScrollingEnabled) {\n\t $rootScope.$watch(function autoScrollWatch() {return $location.hash();},\n\t function autoScrollWatchAction(newVal, oldVal) {\n\t // skip the initial scroll if $location.hash is empty\n\t if (newVal === oldVal && newVal === '') return;\n\t\n\t jqLiteDocumentLoaded(function() {\n\t $rootScope.$evalAsync(scroll);\n\t });\n\t });\n\t }\n\t\n\t return scroll;\n\t }];\n\t}\n\t\n\tvar $animateMinErr = minErr('$animate');\n\tvar ELEMENT_NODE = 1;\n\tvar NG_ANIMATE_CLASSNAME = 'ng-animate';\n\t\n\tfunction mergeClasses(a,b) {\n\t if (!a && !b) return '';\n\t if (!a) return b;\n\t if (!b) return a;\n\t if (isArray(a)) a = a.join(' ');\n\t if (isArray(b)) b = b.join(' ');\n\t return a + ' ' + b;\n\t}\n\t\n\tfunction extractElementNode(element) {\n\t for (var i = 0; i < element.length; i++) {\n\t var elm = element[i];\n\t if (elm.nodeType === ELEMENT_NODE) {\n\t return elm;\n\t }\n\t }\n\t}\n\t\n\tfunction splitClasses(classes) {\n\t if (isString(classes)) {\n\t classes = classes.split(' ');\n\t }\n\t\n\t // Use createMap() to prevent class assumptions involving property names in\n\t // Object.prototype\n\t var obj = createMap();\n\t forEach(classes, function(klass) {\n\t // sometimes the split leaves empty string values\n\t // incase extra spaces were applied to the options\n\t if (klass.length) {\n\t obj[klass] = true;\n\t }\n\t });\n\t return obj;\n\t}\n\t\n\t// if any other type of options value besides an Object value is\n\t// passed into the $animate.method() animation then this helper code\n\t// will be run which will ignore it. While this patch is not the\n\t// greatest solution to this, a lot of existing plugins depend on\n\t// $animate to either call the callback (< 1.2) or return a promise\n\t// that can be changed. This helper function ensures that the options\n\t// are wiped clean incase a callback function is provided.\n\tfunction prepareAnimateOptions(options) {\n\t return isObject(options)\n\t ? options\n\t : {};\n\t}\n\t\n\tvar $$CoreAnimateJsProvider = function() {\n\t this.$get = function() {};\n\t};\n\t\n\t// this is prefixed with Core since it conflicts with\n\t// the animateQueueProvider defined in ngAnimate/animateQueue.js\n\tvar $$CoreAnimateQueueProvider = function() {\n\t var postDigestQueue = new HashMap();\n\t var postDigestElements = [];\n\t\n\t this.$get = ['$$AnimateRunner', '$rootScope',\n\t function($$AnimateRunner, $rootScope) {\n\t return {\n\t enabled: noop,\n\t on: noop,\n\t off: noop,\n\t pin: noop,\n\t\n\t push: function(element, event, options, domOperation) {\n\t domOperation && domOperation();\n\t\n\t options = options || {};\n\t options.from && element.css(options.from);\n\t options.to && element.css(options.to);\n\t\n\t if (options.addClass || options.removeClass) {\n\t addRemoveClassesPostDigest(element, options.addClass, options.removeClass);\n\t }\n\t\n\t var runner = new $$AnimateRunner(); // jshint ignore:line\n\t\n\t // since there are no animations to run the runner needs to be\n\t // notified that the animation call is complete.\n\t runner.complete();\n\t return runner;\n\t }\n\t };\n\t\n\t\n\t function updateData(data, classes, value) {\n\t var changed = false;\n\t if (classes) {\n\t classes = isString(classes) ? classes.split(' ') :\n\t isArray(classes) ? classes : [];\n\t forEach(classes, function(className) {\n\t if (className) {\n\t changed = true;\n\t data[className] = value;\n\t }\n\t });\n\t }\n\t return changed;\n\t }\n\t\n\t function handleCSSClassChanges() {\n\t forEach(postDigestElements, function(element) {\n\t var data = postDigestQueue.get(element);\n\t if (data) {\n\t var existing = splitClasses(element.attr('class'));\n\t var toAdd = '';\n\t var toRemove = '';\n\t forEach(data, function(status, className) {\n\t var hasClass = !!existing[className];\n\t if (status !== hasClass) {\n\t if (status) {\n\t toAdd += (toAdd.length ? ' ' : '') + className;\n\t } else {\n\t toRemove += (toRemove.length ? ' ' : '') + className;\n\t }\n\t }\n\t });\n\t\n\t forEach(element, function(elm) {\n\t toAdd && jqLiteAddClass(elm, toAdd);\n\t toRemove && jqLiteRemoveClass(elm, toRemove);\n\t });\n\t postDigestQueue.remove(element);\n\t }\n\t });\n\t postDigestElements.length = 0;\n\t }\n\t\n\t\n\t function addRemoveClassesPostDigest(element, add, remove) {\n\t var data = postDigestQueue.get(element) || {};\n\t\n\t var classesAdded = updateData(data, add, true);\n\t var classesRemoved = updateData(data, remove, false);\n\t\n\t if (classesAdded || classesRemoved) {\n\t\n\t postDigestQueue.put(element, data);\n\t postDigestElements.push(element);\n\t\n\t if (postDigestElements.length === 1) {\n\t $rootScope.$$postDigest(handleCSSClassChanges);\n\t }\n\t }\n\t }\n\t }];\n\t};\n\t\n\t/**\n\t * @ngdoc provider\n\t * @name $animateProvider\n\t *\n\t * @description\n\t * Default implementation of $animate that doesn't perform any animations, instead just\n\t * synchronously performs DOM updates and resolves the returned runner promise.\n\t *\n\t * In order to enable animations the `ngAnimate` module has to be loaded.\n\t *\n\t * To see the functional implementation check out `src/ngAnimate/animate.js`.\n\t */\n\tvar $AnimateProvider = ['$provide', function($provide) {\n\t var provider = this;\n\t\n\t this.$$registeredAnimations = Object.create(null);\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $animateProvider#register\n\t *\n\t * @description\n\t * Registers a new injectable animation factory function. The factory function produces the\n\t * animation object which contains callback functions for each event that is expected to be\n\t * animated.\n\t *\n\t * * `eventFn`: `function(element, ... , doneFunction, options)`\n\t * The element to animate, the `doneFunction` and the options fed into the animation. Depending\n\t * on the type of animation additional arguments will be injected into the animation function. The\n\t * list below explains the function signatures for the different animation methods:\n\t *\n\t * - setClass: function(element, addedClasses, removedClasses, doneFunction, options)\n\t * - addClass: function(element, addedClasses, doneFunction, options)\n\t * - removeClass: function(element, removedClasses, doneFunction, options)\n\t * - enter, leave, move: function(element, doneFunction, options)\n\t * - animate: function(element, fromStyles, toStyles, doneFunction, options)\n\t *\n\t * Make sure to trigger the `doneFunction` once the animation is fully complete.\n\t *\n\t * ```js\n\t * return {\n\t * //enter, leave, move signature\n\t * eventFn : function(element, done, options) {\n\t * //code to run the animation\n\t * //once complete, then run done()\n\t * return function endFunction(wasCancelled) {\n\t * //code to cancel the animation\n\t * }\n\t * }\n\t * }\n\t * ```\n\t *\n\t * @param {string} name The name of the animation (this is what the class-based CSS value will be compared to).\n\t * @param {Function} factory The factory function that will be executed to return the animation\n\t * object.\n\t */\n\t this.register = function(name, factory) {\n\t if (name && name.charAt(0) !== '.') {\n\t throw $animateMinErr('notcsel', \"Expecting class selector starting with '.' got '{0}'.\", name);\n\t }\n\t\n\t var key = name + '-animation';\n\t provider.$$registeredAnimations[name.substr(1)] = key;\n\t $provide.factory(key, factory);\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $animateProvider#classNameFilter\n\t *\n\t * @description\n\t * Sets and/or returns the CSS class regular expression that is checked when performing\n\t * an animation. Upon bootstrap the classNameFilter value is not set at all and will\n\t * therefore enable $animate to attempt to perform an animation on any element that is triggered.\n\t * When setting the `classNameFilter` value, animations will only be performed on elements\n\t * that successfully match the filter expression. This in turn can boost performance\n\t * for low-powered devices as well as applications containing a lot of structural operations.\n\t * @param {RegExp=} expression The className expression which will be checked against all animations\n\t * @return {RegExp} The current CSS className expression value. If null then there is no expression value\n\t */\n\t this.classNameFilter = function(expression) {\n\t if (arguments.length === 1) {\n\t this.$$classNameFilter = (expression instanceof RegExp) ? expression : null;\n\t if (this.$$classNameFilter) {\n\t var reservedRegex = new RegExp(\"(\\\\s+|\\\\/)\" + NG_ANIMATE_CLASSNAME + \"(\\\\s+|\\\\/)\");\n\t if (reservedRegex.test(this.$$classNameFilter.toString())) {\n\t throw $animateMinErr('nongcls','$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the \"{0}\" CSS class.', NG_ANIMATE_CLASSNAME);\n\t\n\t }\n\t }\n\t }\n\t return this.$$classNameFilter;\n\t };\n\t\n\t this.$get = ['$$animateQueue', function($$animateQueue) {\n\t function domInsert(element, parentElement, afterElement) {\n\t // if for some reason the previous element was removed\n\t // from the dom sometime before this code runs then let's\n\t // just stick to using the parent element as the anchor\n\t if (afterElement) {\n\t var afterNode = extractElementNode(afterElement);\n\t if (afterNode && !afterNode.parentNode && !afterNode.previousElementSibling) {\n\t afterElement = null;\n\t }\n\t }\n\t afterElement ? afterElement.after(element) : parentElement.prepend(element);\n\t }\n\t\n\t /**\n\t * @ngdoc service\n\t * @name $animate\n\t * @description The $animate service exposes a series of DOM utility methods that provide support\n\t * for animation hooks. The default behavior is the application of DOM operations, however,\n\t * when an animation is detected (and animations are enabled), $animate will do the heavy lifting\n\t * to ensure that animation runs with the triggered DOM operation.\n\t *\n\t * By default $animate doesn't trigger any animations. This is because the `ngAnimate` module isn't\n\t * included and only when it is active then the animation hooks that `$animate` triggers will be\n\t * functional. Once active then all structural `ng-` directives will trigger animations as they perform\n\t * their DOM-related operations (enter, leave and move). Other directives such as `ngClass`,\n\t * `ngShow`, `ngHide` and `ngMessages` also provide support for animations.\n\t *\n\t * It is recommended that the`$animate` service is always used when executing DOM-related procedures within directives.\n\t *\n\t * To learn more about enabling animation support, click here to visit the\n\t * {@link ngAnimate ngAnimate module page}.\n\t */\n\t return {\n\t // we don't call it directly since non-existant arguments may\n\t // be interpreted as null within the sub enabled function\n\t\n\t /**\n\t *\n\t * @ngdoc method\n\t * @name $animate#on\n\t * @kind function\n\t * @description Sets up an event listener to fire whenever the animation event (enter, leave, move, etc...)\n\t * has fired on the given element or among any of its children. Once the listener is fired, the provided callback\n\t * is fired with the following params:\n\t *\n\t * ```js\n\t * $animate.on('enter', container,\n\t * function callback(element, phase) {\n\t * // cool we detected an enter animation within the container\n\t * }\n\t * );\n\t * ```\n\t *\n\t * @param {string} event the animation event that will be captured (e.g. enter, leave, move, addClass, removeClass, etc...)\n\t * @param {DOMElement} container the container element that will capture each of the animation events that are fired on itself\n\t * as well as among its children\n\t * @param {Function} callback the callback function that will be fired when the listener is triggered\n\t *\n\t * The arguments present in the callback function are:\n\t * * `element` - The captured DOM element that the animation was fired on.\n\t * * `phase` - The phase of the animation. The two possible phases are **start** (when the animation starts) and **close** (when it ends).\n\t */\n\t on: $$animateQueue.on,\n\t\n\t /**\n\t *\n\t * @ngdoc method\n\t * @name $animate#off\n\t * @kind function\n\t * @description Deregisters an event listener based on the event which has been associated with the provided element. This method\n\t * can be used in three different ways depending on the arguments:\n\t *\n\t * ```js\n\t * // remove all the animation event listeners listening for `enter`\n\t * $animate.off('enter');\n\t *\n\t * // remove all the animation event listeners listening for `enter` on the given element and its children\n\t * $animate.off('enter', container);\n\t *\n\t * // remove the event listener function provided by `listenerFn` that is set\n\t * // to listen for `enter` on the given `element` as well as its children\n\t * $animate.off('enter', container, callback);\n\t * ```\n\t *\n\t * @param {string} event the animation event (e.g. enter, leave, move, addClass, removeClass, etc...)\n\t * @param {DOMElement=} container the container element the event listener was placed on\n\t * @param {Function=} callback the callback function that was registered as the listener\n\t */\n\t off: $$animateQueue.off,\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $animate#pin\n\t * @kind function\n\t * @description Associates the provided element with a host parent element to allow the element to be animated even if it exists\n\t * outside of the DOM structure of the Angular application. By doing so, any animation triggered via `$animate` can be issued on the\n\t * element despite being outside the realm of the application or within another application. Say for example if the application\n\t * was bootstrapped on an element that is somewhere inside of the `<body>` tag, but we wanted to allow for an element to be situated\n\t * as a direct child of `document.body`, then this can be achieved by pinning the element via `$animate.pin(element)`. Keep in mind\n\t * that calling `$animate.pin(element, parentElement)` will not actually insert into the DOM anywhere; it will just create the association.\n\t *\n\t * Note that this feature is only active when the `ngAnimate` module is used.\n\t *\n\t * @param {DOMElement} element the external element that will be pinned\n\t * @param {DOMElement} parentElement the host parent element that will be associated with the external element\n\t */\n\t pin: $$animateQueue.pin,\n\t\n\t /**\n\t *\n\t * @ngdoc method\n\t * @name $animate#enabled\n\t * @kind function\n\t * @description Used to get and set whether animations are enabled or not on the entire application or on an element and its children. This\n\t * function can be called in four ways:\n\t *\n\t * ```js\n\t * // returns true or false\n\t * $animate.enabled();\n\t *\n\t * // changes the enabled state for all animations\n\t * $animate.enabled(false);\n\t * $animate.enabled(true);\n\t *\n\t * // returns true or false if animations are enabled for an element\n\t * $animate.enabled(element);\n\t *\n\t * // changes the enabled state for an element and its children\n\t * $animate.enabled(element, true);\n\t * $animate.enabled(element, false);\n\t * ```\n\t *\n\t * @param {DOMElement=} element the element that will be considered for checking/setting the enabled state\n\t * @param {boolean=} enabled whether or not the animations will be enabled for the element\n\t *\n\t * @return {boolean} whether or not animations are enabled\n\t */\n\t enabled: $$animateQueue.enabled,\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $animate#cancel\n\t * @kind function\n\t * @description Cancels the provided animation.\n\t *\n\t * @param {Promise} animationPromise The animation promise that is returned when an animation is started.\n\t */\n\t cancel: function(runner) {\n\t runner.end && runner.end();\n\t },\n\t\n\t /**\n\t *\n\t * @ngdoc method\n\t * @name $animate#enter\n\t * @kind function\n\t * @description Inserts the element into the DOM either after the `after` element (if provided) or\n\t * as the first child within the `parent` element and then triggers an animation.\n\t * A promise is returned that will be resolved during the next digest once the animation\n\t * has completed.\n\t *\n\t * @param {DOMElement} element the element which will be inserted into the DOM\n\t * @param {DOMElement} parent the parent element which will append the element as\n\t * a child (so long as the after element is not present)\n\t * @param {DOMElement=} after the sibling element after which the element will be appended\n\t * @param {object=} options an optional collection of options/styles that will be applied to the element\n\t *\n\t * @return {Promise} the animation callback promise\n\t */\n\t enter: function(element, parent, after, options) {\n\t parent = parent && jqLite(parent);\n\t after = after && jqLite(after);\n\t parent = parent || after.parent();\n\t domInsert(element, parent, after);\n\t return $$animateQueue.push(element, 'enter', prepareAnimateOptions(options));\n\t },\n\t\n\t /**\n\t *\n\t * @ngdoc method\n\t * @name $animate#move\n\t * @kind function\n\t * @description Inserts (moves) the element into its new position in the DOM either after\n\t * the `after` element (if provided) or as the first child within the `parent` element\n\t * and then triggers an animation. A promise is returned that will be resolved\n\t * during the next digest once the animation has completed.\n\t *\n\t * @param {DOMElement} element the element which will be moved into the new DOM position\n\t * @param {DOMElement} parent the parent element which will append the element as\n\t * a child (so long as the after element is not present)\n\t * @param {DOMElement=} after the sibling element after which the element will be appended\n\t * @param {object=} options an optional collection of options/styles that will be applied to the element\n\t *\n\t * @return {Promise} the animation callback promise\n\t */\n\t move: function(element, parent, after, options) {\n\t parent = parent && jqLite(parent);\n\t after = after && jqLite(after);\n\t parent = parent || after.parent();\n\t domInsert(element, parent, after);\n\t return $$animateQueue.push(element, 'move', prepareAnimateOptions(options));\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $animate#leave\n\t * @kind function\n\t * @description Triggers an animation and then removes the element from the DOM.\n\t * When the function is called a promise is returned that will be resolved during the next\n\t * digest once the animation has completed.\n\t *\n\t * @param {DOMElement} element the element which will be removed from the DOM\n\t * @param {object=} options an optional collection of options/styles that will be applied to the element\n\t *\n\t * @return {Promise} the animation callback promise\n\t */\n\t leave: function(element, options) {\n\t return $$animateQueue.push(element, 'leave', prepareAnimateOptions(options), function() {\n\t element.remove();\n\t });\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $animate#addClass\n\t * @kind function\n\t *\n\t * @description Triggers an addClass animation surrounding the addition of the provided CSS class(es). Upon\n\t * execution, the addClass operation will only be handled after the next digest and it will not trigger an\n\t * animation if element already contains the CSS class or if the class is removed at a later step.\n\t * Note that class-based animations are treated differently compared to structural animations\n\t * (like enter, move and leave) since the CSS classes may be added/removed at different points\n\t * depending if CSS or JavaScript animations are used.\n\t *\n\t * @param {DOMElement} element the element which the CSS classes will be applied to\n\t * @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces)\n\t * @param {object=} options an optional collection of options/styles that will be applied to the element\n\t *\n\t * @return {Promise} the animation callback promise\n\t */\n\t addClass: function(element, className, options) {\n\t options = prepareAnimateOptions(options);\n\t options.addClass = mergeClasses(options.addclass, className);\n\t return $$animateQueue.push(element, 'addClass', options);\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $animate#removeClass\n\t * @kind function\n\t *\n\t * @description Triggers a removeClass animation surrounding the removal of the provided CSS class(es). Upon\n\t * execution, the removeClass operation will only be handled after the next digest and it will not trigger an\n\t * animation if element does not contain the CSS class or if the class is added at a later step.\n\t * Note that class-based animations are treated differently compared to structural animations\n\t * (like enter, move and leave) since the CSS classes may be added/removed at different points\n\t * depending if CSS or JavaScript animations are used.\n\t *\n\t * @param {DOMElement} element the element which the CSS classes will be applied to\n\t * @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces)\n\t * @param {object=} options an optional collection of options/styles that will be applied to the element\n\t *\n\t * @return {Promise} the animation callback promise\n\t */\n\t removeClass: function(element, className, options) {\n\t options = prepareAnimateOptions(options);\n\t options.removeClass = mergeClasses(options.removeClass, className);\n\t return $$animateQueue.push(element, 'removeClass', options);\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $animate#setClass\n\t * @kind function\n\t *\n\t * @description Performs both the addition and removal of a CSS classes on an element and (during the process)\n\t * triggers an animation surrounding the class addition/removal. Much like `$animate.addClass` and\n\t * `$animate.removeClass`, `setClass` will only evaluate the classes being added/removed once a digest has\n\t * passed. Note that class-based animations are treated differently compared to structural animations\n\t * (like enter, move and leave) since the CSS classes may be added/removed at different points\n\t * depending if CSS or JavaScript animations are used.\n\t *\n\t * @param {DOMElement} element the element which the CSS classes will be applied to\n\t * @param {string} add the CSS class(es) that will be added (multiple classes are separated via spaces)\n\t * @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces)\n\t * @param {object=} options an optional collection of options/styles that will be applied to the element\n\t *\n\t * @return {Promise} the animation callback promise\n\t */\n\t setClass: function(element, add, remove, options) {\n\t options = prepareAnimateOptions(options);\n\t options.addClass = mergeClasses(options.addClass, add);\n\t options.removeClass = mergeClasses(options.removeClass, remove);\n\t return $$animateQueue.push(element, 'setClass', options);\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $animate#animate\n\t * @kind function\n\t *\n\t * @description Performs an inline animation on the element which applies the provided to and from CSS styles to the element.\n\t * If any detected CSS transition, keyframe or JavaScript matches the provided className value, then the animation will take\n\t * on the provided styles. For example, if a transition animation is set for the given className, then the provided `from` and\n\t * `to` styles will be applied alongside the given transition. If the CSS style provided in `from` does not have a corresponding\n\t * style in `to`, the style in `from` is applied immediately, and no animation is run.\n\t * If a JavaScript animation is detected then the provided styles will be given in as function parameters into the `animate`\n\t * method (or as part of the `options` parameter):\n\t *\n\t * ```js\n\t * ngModule.animation('.my-inline-animation', function() {\n\t * return {\n\t * animate : function(element, from, to, done, options) {\n\t * //animation\n\t * done();\n\t * }\n\t * }\n\t * });\n\t * ```\n\t *\n\t * @param {DOMElement} element the element which the CSS styles will be applied to\n\t * @param {object} from the from (starting) CSS styles that will be applied to the element and across the animation.\n\t * @param {object} to the to (destination) CSS styles that will be applied to the element and across the animation.\n\t * @param {string=} className an optional CSS class that will be applied to the element for the duration of the animation. If\n\t * this value is left as empty then a CSS class of `ng-inline-animate` will be applied to the element.\n\t * (Note that if no animation is detected then this value will not be appplied to the element.)\n\t * @param {object=} options an optional collection of options/styles that will be applied to the element\n\t *\n\t * @return {Promise} the animation callback promise\n\t */\n\t animate: function(element, from, to, className, options) {\n\t options = prepareAnimateOptions(options);\n\t options.from = options.from ? extend(options.from, from) : from;\n\t options.to = options.to ? extend(options.to, to) : to;\n\t\n\t className = className || 'ng-inline-animate';\n\t options.tempClasses = mergeClasses(options.tempClasses, className);\n\t return $$animateQueue.push(element, 'animate', options);\n\t }\n\t };\n\t }];\n\t}];\n\t\n\tvar $$AnimateAsyncRunFactoryProvider = function() {\n\t this.$get = ['$$rAF', function($$rAF) {\n\t var waitQueue = [];\n\t\n\t function waitForTick(fn) {\n\t waitQueue.push(fn);\n\t if (waitQueue.length > 1) return;\n\t $$rAF(function() {\n\t for (var i = 0; i < waitQueue.length; i++) {\n\t waitQueue[i]();\n\t }\n\t waitQueue = [];\n\t });\n\t }\n\t\n\t return function() {\n\t var passed = false;\n\t waitForTick(function() {\n\t passed = true;\n\t });\n\t return function(callback) {\n\t passed ? callback() : waitForTick(callback);\n\t };\n\t };\n\t }];\n\t};\n\t\n\tvar $$AnimateRunnerFactoryProvider = function() {\n\t this.$get = ['$q', '$sniffer', '$$animateAsyncRun', '$document', '$timeout',\n\t function($q, $sniffer, $$animateAsyncRun, $document, $timeout) {\n\t\n\t var INITIAL_STATE = 0;\n\t var DONE_PENDING_STATE = 1;\n\t var DONE_COMPLETE_STATE = 2;\n\t\n\t AnimateRunner.chain = function(chain, callback) {\n\t var index = 0;\n\t\n\t next();\n\t function next() {\n\t if (index === chain.length) {\n\t callback(true);\n\t return;\n\t }\n\t\n\t chain[index](function(response) {\n\t if (response === false) {\n\t callback(false);\n\t return;\n\t }\n\t index++;\n\t next();\n\t });\n\t }\n\t };\n\t\n\t AnimateRunner.all = function(runners, callback) {\n\t var count = 0;\n\t var status = true;\n\t forEach(runners, function(runner) {\n\t runner.done(onProgress);\n\t });\n\t\n\t function onProgress(response) {\n\t status = status && response;\n\t if (++count === runners.length) {\n\t callback(status);\n\t }\n\t }\n\t };\n\t\n\t function AnimateRunner(host) {\n\t this.setHost(host);\n\t\n\t var rafTick = $$animateAsyncRun();\n\t var timeoutTick = function(fn) {\n\t $timeout(fn, 0, false);\n\t };\n\t\n\t this._doneCallbacks = [];\n\t this._tick = function(fn) {\n\t var doc = $document[0];\n\t\n\t // the document may not be ready or attached\n\t // to the module for some internal tests\n\t if (doc && doc.hidden) {\n\t timeoutTick(fn);\n\t } else {\n\t rafTick(fn);\n\t }\n\t };\n\t this._state = 0;\n\t }\n\t\n\t AnimateRunner.prototype = {\n\t setHost: function(host) {\n\t this.host = host || {};\n\t },\n\t\n\t done: function(fn) {\n\t if (this._state === DONE_COMPLETE_STATE) {\n\t fn();\n\t } else {\n\t this._doneCallbacks.push(fn);\n\t }\n\t },\n\t\n\t progress: noop,\n\t\n\t getPromise: function() {\n\t if (!this.promise) {\n\t var self = this;\n\t this.promise = $q(function(resolve, reject) {\n\t self.done(function(status) {\n\t status === false ? reject() : resolve();\n\t });\n\t });\n\t }\n\t return this.promise;\n\t },\n\t\n\t then: function(resolveHandler, rejectHandler) {\n\t return this.getPromise().then(resolveHandler, rejectHandler);\n\t },\n\t\n\t 'catch': function(handler) {\n\t return this.getPromise()['catch'](handler);\n\t },\n\t\n\t 'finally': function(handler) {\n\t return this.getPromise()['finally'](handler);\n\t },\n\t\n\t pause: function() {\n\t if (this.host.pause) {\n\t this.host.pause();\n\t }\n\t },\n\t\n\t resume: function() {\n\t if (this.host.resume) {\n\t this.host.resume();\n\t }\n\t },\n\t\n\t end: function() {\n\t if (this.host.end) {\n\t this.host.end();\n\t }\n\t this._resolve(true);\n\t },\n\t\n\t cancel: function() {\n\t if (this.host.cancel) {\n\t this.host.cancel();\n\t }\n\t this._resolve(false);\n\t },\n\t\n\t complete: function(response) {\n\t var self = this;\n\t if (self._state === INITIAL_STATE) {\n\t self._state = DONE_PENDING_STATE;\n\t self._tick(function() {\n\t self._resolve(response);\n\t });\n\t }\n\t },\n\t\n\t _resolve: function(response) {\n\t if (this._state !== DONE_COMPLETE_STATE) {\n\t forEach(this._doneCallbacks, function(fn) {\n\t fn(response);\n\t });\n\t this._doneCallbacks.length = 0;\n\t this._state = DONE_COMPLETE_STATE;\n\t }\n\t }\n\t };\n\t\n\t return AnimateRunner;\n\t }];\n\t};\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $animateCss\n\t * @kind object\n\t *\n\t * @description\n\t * This is the core version of `$animateCss`. By default, only when the `ngAnimate` is included,\n\t * then the `$animateCss` service will actually perform animations.\n\t *\n\t * Click here {@link ngAnimate.$animateCss to read the documentation for $animateCss}.\n\t */\n\tvar $CoreAnimateCssProvider = function() {\n\t this.$get = ['$$rAF', '$q', '$$AnimateRunner', function($$rAF, $q, $$AnimateRunner) {\n\t\n\t return function(element, initialOptions) {\n\t // all of the animation functions should create\n\t // a copy of the options data, however, if a\n\t // parent service has already created a copy then\n\t // we should stick to using that\n\t var options = initialOptions || {};\n\t if (!options.$$prepared) {\n\t options = copy(options);\n\t }\n\t\n\t // there is no point in applying the styles since\n\t // there is no animation that goes on at all in\n\t // this version of $animateCss.\n\t if (options.cleanupStyles) {\n\t options.from = options.to = null;\n\t }\n\t\n\t if (options.from) {\n\t element.css(options.from);\n\t options.from = null;\n\t }\n\t\n\t /* jshint newcap: false*/\n\t var closed, runner = new $$AnimateRunner();\n\t return {\n\t start: run,\n\t end: run\n\t };\n\t\n\t function run() {\n\t $$rAF(function() {\n\t applyAnimationContents();\n\t if (!closed) {\n\t runner.complete();\n\t }\n\t closed = true;\n\t });\n\t return runner;\n\t }\n\t\n\t function applyAnimationContents() {\n\t if (options.addClass) {\n\t element.addClass(options.addClass);\n\t options.addClass = null;\n\t }\n\t if (options.removeClass) {\n\t element.removeClass(options.removeClass);\n\t options.removeClass = null;\n\t }\n\t if (options.to) {\n\t element.css(options.to);\n\t options.to = null;\n\t }\n\t }\n\t };\n\t }];\n\t};\n\t\n\t/* global stripHash: true */\n\t\n\t/**\n\t * ! This is a private undocumented service !\n\t *\n\t * @name $browser\n\t * @requires $log\n\t * @description\n\t * This object has two goals:\n\t *\n\t * - hide all the global state in the browser caused by the window object\n\t * - abstract away all the browser specific features and inconsistencies\n\t *\n\t * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`\n\t * service, which can be used for convenient testing of the application without the interaction with\n\t * the real browser apis.\n\t */\n\t/**\n\t * @param {object} window The global window object.\n\t * @param {object} document jQuery wrapped document.\n\t * @param {object} $log window.console or an object with the same interface.\n\t * @param {object} $sniffer $sniffer service\n\t */\n\tfunction Browser(window, document, $log, $sniffer) {\n\t var self = this,\n\t rawDocument = document[0],\n\t location = window.location,\n\t history = window.history,\n\t setTimeout = window.setTimeout,\n\t clearTimeout = window.clearTimeout,\n\t pendingDeferIds = {};\n\t\n\t self.isMock = false;\n\t\n\t var outstandingRequestCount = 0;\n\t var outstandingRequestCallbacks = [];\n\t\n\t // TODO(vojta): remove this temporary api\n\t self.$$completeOutstandingRequest = completeOutstandingRequest;\n\t self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; };\n\t\n\t /**\n\t * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks`\n\t * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.\n\t */\n\t function completeOutstandingRequest(fn) {\n\t try {\n\t fn.apply(null, sliceArgs(arguments, 1));\n\t } finally {\n\t outstandingRequestCount--;\n\t if (outstandingRequestCount === 0) {\n\t while (outstandingRequestCallbacks.length) {\n\t try {\n\t outstandingRequestCallbacks.pop()();\n\t } catch (e) {\n\t $log.error(e);\n\t }\n\t }\n\t }\n\t }\n\t }\n\t\n\t function getHash(url) {\n\t var index = url.indexOf('#');\n\t return index === -1 ? '' : url.substr(index);\n\t }\n\t\n\t /**\n\t * @private\n\t * Note: this method is used only by scenario runner\n\t * TODO(vojta): prefix this method with $$ ?\n\t * @param {function()} callback Function that will be called when no outstanding request\n\t */\n\t self.notifyWhenNoOutstandingRequests = function(callback) {\n\t if (outstandingRequestCount === 0) {\n\t callback();\n\t } else {\n\t outstandingRequestCallbacks.push(callback);\n\t }\n\t };\n\t\n\t //////////////////////////////////////////////////////////////\n\t // URL API\n\t //////////////////////////////////////////////////////////////\n\t\n\t var cachedState, lastHistoryState,\n\t lastBrowserUrl = location.href,\n\t baseElement = document.find('base'),\n\t pendingLocation = null;\n\t\n\t cacheState();\n\t lastHistoryState = cachedState;\n\t\n\t /**\n\t * @name $browser#url\n\t *\n\t * @description\n\t * GETTER:\n\t * Without any argument, this method just returns current value of location.href.\n\t *\n\t * SETTER:\n\t * With at least one argument, this method sets url to new value.\n\t * If html5 history api supported, pushState/replaceState is used, otherwise\n\t * location.href/location.replace is used.\n\t * Returns its own instance to allow chaining\n\t *\n\t * NOTE: this api is intended for use only by the $location service. Please use the\n\t * {@link ng.$location $location service} to change url.\n\t *\n\t * @param {string} url New url (when used as setter)\n\t * @param {boolean=} replace Should new url replace current history record?\n\t * @param {object=} state object to use with pushState/replaceState\n\t */\n\t self.url = function(url, replace, state) {\n\t // In modern browsers `history.state` is `null` by default; treating it separately\n\t // from `undefined` would cause `$browser.url('/foo')` to change `history.state`\n\t // to undefined via `pushState`. Instead, let's change `undefined` to `null` here.\n\t if (isUndefined(state)) {\n\t state = null;\n\t }\n\t\n\t // Android Browser BFCache causes location, history reference to become stale.\n\t if (location !== window.location) location = window.location;\n\t if (history !== window.history) history = window.history;\n\t\n\t // setter\n\t if (url) {\n\t var sameState = lastHistoryState === state;\n\t\n\t // Don't change anything if previous and current URLs and states match. This also prevents\n\t // IE<10 from getting into redirect loop when in LocationHashbangInHtml5Url mode.\n\t // See https://github.com/angular/angular.js/commit/ffb2701\n\t if (lastBrowserUrl === url && (!$sniffer.history || sameState)) {\n\t return self;\n\t }\n\t var sameBase = lastBrowserUrl && stripHash(lastBrowserUrl) === stripHash(url);\n\t lastBrowserUrl = url;\n\t lastHistoryState = state;\n\t // Don't use history API if only the hash changed\n\t // due to a bug in IE10/IE11 which leads\n\t // to not firing a `hashchange` nor `popstate` event\n\t // in some cases (see #9143).\n\t if ($sniffer.history && (!sameBase || !sameState)) {\n\t history[replace ? 'replaceState' : 'pushState'](state, '', url);\n\t cacheState();\n\t // Do the assignment again so that those two variables are referentially identical.\n\t lastHistoryState = cachedState;\n\t } else {\n\t if (!sameBase || pendingLocation) {\n\t pendingLocation = url;\n\t }\n\t if (replace) {\n\t location.replace(url);\n\t } else if (!sameBase) {\n\t location.href = url;\n\t } else {\n\t location.hash = getHash(url);\n\t }\n\t if (location.href !== url) {\n\t pendingLocation = url;\n\t }\n\t }\n\t return self;\n\t // getter\n\t } else {\n\t // - pendingLocation is needed as browsers don't allow to read out\n\t // the new location.href if a reload happened or if there is a bug like in iOS 9 (see\n\t // https://openradar.appspot.com/22186109).\n\t // - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172\n\t return pendingLocation || location.href.replace(/%27/g,\"'\");\n\t }\n\t };\n\t\n\t /**\n\t * @name $browser#state\n\t *\n\t * @description\n\t * This method is a getter.\n\t *\n\t * Return history.state or null if history.state is undefined.\n\t *\n\t * @returns {object} state\n\t */\n\t self.state = function() {\n\t return cachedState;\n\t };\n\t\n\t var urlChangeListeners = [],\n\t urlChangeInit = false;\n\t\n\t function cacheStateAndFireUrlChange() {\n\t pendingLocation = null;\n\t cacheState();\n\t fireUrlChange();\n\t }\n\t\n\t function getCurrentState() {\n\t try {\n\t return history.state;\n\t } catch (e) {\n\t // MSIE can reportedly throw when there is no state (UNCONFIRMED).\n\t }\n\t }\n\t\n\t // This variable should be used *only* inside the cacheState function.\n\t var lastCachedState = null;\n\t function cacheState() {\n\t // This should be the only place in $browser where `history.state` is read.\n\t cachedState = getCurrentState();\n\t cachedState = isUndefined(cachedState) ? null : cachedState;\n\t\n\t // Prevent callbacks fo fire twice if both hashchange & popstate were fired.\n\t if (equals(cachedState, lastCachedState)) {\n\t cachedState = lastCachedState;\n\t }\n\t lastCachedState = cachedState;\n\t }\n\t\n\t function fireUrlChange() {\n\t if (lastBrowserUrl === self.url() && lastHistoryState === cachedState) {\n\t return;\n\t }\n\t\n\t lastBrowserUrl = self.url();\n\t lastHistoryState = cachedState;\n\t forEach(urlChangeListeners, function(listener) {\n\t listener(self.url(), cachedState);\n\t });\n\t }\n\t\n\t /**\n\t * @name $browser#onUrlChange\n\t *\n\t * @description\n\t * Register callback function that will be called, when url changes.\n\t *\n\t * It's only called when the url is changed from outside of angular:\n\t * - user types different url into address bar\n\t * - user clicks on history (forward/back) button\n\t * - user clicks on a link\n\t *\n\t * It's not called when url is changed by $browser.url() method\n\t *\n\t * The listener gets called with new url as parameter.\n\t *\n\t * NOTE: this api is intended for use only by the $location service. Please use the\n\t * {@link ng.$location $location service} to monitor url changes in angular apps.\n\t *\n\t * @param {function(string)} listener Listener function to be called when url changes.\n\t * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.\n\t */\n\t self.onUrlChange = function(callback) {\n\t // TODO(vojta): refactor to use node's syntax for events\n\t if (!urlChangeInit) {\n\t // We listen on both (hashchange/popstate) when available, as some browsers (e.g. Opera)\n\t // don't fire popstate when user change the address bar and don't fire hashchange when url\n\t // changed by push/replaceState\n\t\n\t // html5 history api - popstate event\n\t if ($sniffer.history) jqLite(window).on('popstate', cacheStateAndFireUrlChange);\n\t // hashchange event\n\t jqLite(window).on('hashchange', cacheStateAndFireUrlChange);\n\t\n\t urlChangeInit = true;\n\t }\n\t\n\t urlChangeListeners.push(callback);\n\t return callback;\n\t };\n\t\n\t /**\n\t * @private\n\t * Remove popstate and hashchange handler from window.\n\t *\n\t * NOTE: this api is intended for use only by $rootScope.\n\t */\n\t self.$$applicationDestroyed = function() {\n\t jqLite(window).off('hashchange popstate', cacheStateAndFireUrlChange);\n\t };\n\t\n\t /**\n\t * Checks whether the url has changed outside of Angular.\n\t * Needs to be exported to be able to check for changes that have been done in sync,\n\t * as hashchange/popstate events fire in async.\n\t */\n\t self.$$checkUrlChange = fireUrlChange;\n\t\n\t //////////////////////////////////////////////////////////////\n\t // Misc API\n\t //////////////////////////////////////////////////////////////\n\t\n\t /**\n\t * @name $browser#baseHref\n\t *\n\t * @description\n\t * Returns current <base href>\n\t * (always relative - without domain)\n\t *\n\t * @returns {string} The current base href\n\t */\n\t self.baseHref = function() {\n\t var href = baseElement.attr('href');\n\t return href ? href.replace(/^(https?\\:)?\\/\\/[^\\/]*/, '') : '';\n\t };\n\t\n\t /**\n\t * @name $browser#defer\n\t * @param {function()} fn A function, who's execution should be deferred.\n\t * @param {number=} [delay=0] of milliseconds to defer the function execution.\n\t * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.\n\t *\n\t * @description\n\t * Executes a fn asynchronously via `setTimeout(fn, delay)`.\n\t *\n\t * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using\n\t * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed\n\t * via `$browser.defer.flush()`.\n\t *\n\t */\n\t self.defer = function(fn, delay) {\n\t var timeoutId;\n\t outstandingRequestCount++;\n\t timeoutId = setTimeout(function() {\n\t delete pendingDeferIds[timeoutId];\n\t completeOutstandingRequest(fn);\n\t }, delay || 0);\n\t pendingDeferIds[timeoutId] = true;\n\t return timeoutId;\n\t };\n\t\n\t\n\t /**\n\t * @name $browser#defer.cancel\n\t *\n\t * @description\n\t * Cancels a deferred task identified with `deferId`.\n\t *\n\t * @param {*} deferId Token returned by the `$browser.defer` function.\n\t * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n\t * canceled.\n\t */\n\t self.defer.cancel = function(deferId) {\n\t if (pendingDeferIds[deferId]) {\n\t delete pendingDeferIds[deferId];\n\t clearTimeout(deferId);\n\t completeOutstandingRequest(noop);\n\t return true;\n\t }\n\t return false;\n\t };\n\t\n\t}\n\t\n\tfunction $BrowserProvider() {\n\t this.$get = ['$window', '$log', '$sniffer', '$document',\n\t function($window, $log, $sniffer, $document) {\n\t return new Browser($window, $document, $log, $sniffer);\n\t }];\n\t}\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $cacheFactory\n\t *\n\t * @description\n\t * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to\n\t * them.\n\t *\n\t * ```js\n\t *\n\t * var cache = $cacheFactory('cacheId');\n\t * expect($cacheFactory.get('cacheId')).toBe(cache);\n\t * expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();\n\t *\n\t * cache.put(\"key\", \"value\");\n\t * cache.put(\"another key\", \"another value\");\n\t *\n\t * // We've specified no options on creation\n\t * expect(cache.info()).toEqual({id: 'cacheId', size: 2});\n\t *\n\t * ```\n\t *\n\t *\n\t * @param {string} cacheId Name or id of the newly created cache.\n\t * @param {object=} options Options object that specifies the cache behavior. Properties:\n\t *\n\t * - `{number=}` `capacity` — turns the cache into LRU cache.\n\t *\n\t * @returns {object} Newly created cache object with the following set of methods:\n\t *\n\t * - `{object}` `info()` — Returns id, size, and options of cache.\n\t * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns\n\t * it.\n\t * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss.\n\t * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache.\n\t * - `{void}` `removeAll()` — Removes all cached values.\n\t * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.\n\t *\n\t * @example\n\t <example module=\"cacheExampleApp\">\n\t <file name=\"index.html\">\n\t <div ng-controller=\"CacheController\">\n\t <input ng-model=\"newCacheKey\" placeholder=\"Key\">\n\t <input ng-model=\"newCacheValue\" placeholder=\"Value\">\n\t <button ng-click=\"put(newCacheKey, newCacheValue)\">Cache</button>\n\t\n\t <p ng-if=\"keys.length\">Cached Values</p>\n\t <div ng-repeat=\"key in keys\">\n\t <span ng-bind=\"key\"></span>\n\t <span>: </span>\n\t <b ng-bind=\"cache.get(key)\"></b>\n\t </div>\n\t\n\t <p>Cache Info</p>\n\t <div ng-repeat=\"(key, value) in cache.info()\">\n\t <span ng-bind=\"key\"></span>\n\t <span>: </span>\n\t <b ng-bind=\"value\"></b>\n\t </div>\n\t </div>\n\t </file>\n\t <file name=\"script.js\">\n\t angular.module('cacheExampleApp', []).\n\t controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {\n\t $scope.keys = [];\n\t $scope.cache = $cacheFactory('cacheId');\n\t $scope.put = function(key, value) {\n\t if (angular.isUndefined($scope.cache.get(key))) {\n\t $scope.keys.push(key);\n\t }\n\t $scope.cache.put(key, angular.isUndefined(value) ? null : value);\n\t };\n\t }]);\n\t </file>\n\t <file name=\"style.css\">\n\t p {\n\t margin: 10px 0 3px;\n\t }\n\t </file>\n\t </example>\n\t */\n\tfunction $CacheFactoryProvider() {\n\t\n\t this.$get = function() {\n\t var caches = {};\n\t\n\t function cacheFactory(cacheId, options) {\n\t if (cacheId in caches) {\n\t throw minErr('$cacheFactory')('iid', \"CacheId '{0}' is already taken!\", cacheId);\n\t }\n\t\n\t var size = 0,\n\t stats = extend({}, options, {id: cacheId}),\n\t data = createMap(),\n\t capacity = (options && options.capacity) || Number.MAX_VALUE,\n\t lruHash = createMap(),\n\t freshEnd = null,\n\t staleEnd = null;\n\t\n\t /**\n\t * @ngdoc type\n\t * @name $cacheFactory.Cache\n\t *\n\t * @description\n\t * A cache object used to store and retrieve data, primarily used by\n\t * {@link $http $http} and the {@link ng.directive:script script} directive to cache\n\t * templates and other data.\n\t *\n\t * ```js\n\t * angular.module('superCache')\n\t * .factory('superCache', ['$cacheFactory', function($cacheFactory) {\n\t * return $cacheFactory('super-cache');\n\t * }]);\n\t * ```\n\t *\n\t * Example test:\n\t *\n\t * ```js\n\t * it('should behave like a cache', inject(function(superCache) {\n\t * superCache.put('key', 'value');\n\t * superCache.put('another key', 'another value');\n\t *\n\t * expect(superCache.info()).toEqual({\n\t * id: 'super-cache',\n\t * size: 2\n\t * });\n\t *\n\t * superCache.remove('another key');\n\t * expect(superCache.get('another key')).toBeUndefined();\n\t *\n\t * superCache.removeAll();\n\t * expect(superCache.info()).toEqual({\n\t * id: 'super-cache',\n\t * size: 0\n\t * });\n\t * }));\n\t * ```\n\t */\n\t return caches[cacheId] = {\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $cacheFactory.Cache#put\n\t * @kind function\n\t *\n\t * @description\n\t * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be\n\t * retrieved later, and incrementing the size of the cache if the key was not already\n\t * present in the cache. If behaving like an LRU cache, it will also remove stale\n\t * entries from the set.\n\t *\n\t * It will not insert undefined values into the cache.\n\t *\n\t * @param {string} key the key under which the cached data is stored.\n\t * @param {*} value the value to store alongside the key. If it is undefined, the key\n\t * will not be stored.\n\t * @returns {*} the value stored.\n\t */\n\t put: function(key, value) {\n\t if (isUndefined(value)) return;\n\t if (capacity < Number.MAX_VALUE) {\n\t var lruEntry = lruHash[key] || (lruHash[key] = {key: key});\n\t\n\t refresh(lruEntry);\n\t }\n\t\n\t if (!(key in data)) size++;\n\t data[key] = value;\n\t\n\t if (size > capacity) {\n\t this.remove(staleEnd.key);\n\t }\n\t\n\t return value;\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $cacheFactory.Cache#get\n\t * @kind function\n\t *\n\t * @description\n\t * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object.\n\t *\n\t * @param {string} key the key of the data to be retrieved\n\t * @returns {*} the value stored.\n\t */\n\t get: function(key) {\n\t if (capacity < Number.MAX_VALUE) {\n\t var lruEntry = lruHash[key];\n\t\n\t if (!lruEntry) return;\n\t\n\t refresh(lruEntry);\n\t }\n\t\n\t return data[key];\n\t },\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $cacheFactory.Cache#remove\n\t * @kind function\n\t *\n\t * @description\n\t * Removes an entry from the {@link $cacheFactory.Cache Cache} object.\n\t *\n\t * @param {string} key the key of the entry to be removed\n\t */\n\t remove: function(key) {\n\t if (capacity < Number.MAX_VALUE) {\n\t var lruEntry = lruHash[key];\n\t\n\t if (!lruEntry) return;\n\t\n\t if (lruEntry == freshEnd) freshEnd = lruEntry.p;\n\t if (lruEntry == staleEnd) staleEnd = lruEntry.n;\n\t link(lruEntry.n,lruEntry.p);\n\t\n\t delete lruHash[key];\n\t }\n\t\n\t if (!(key in data)) return;\n\t\n\t delete data[key];\n\t size--;\n\t },\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $cacheFactory.Cache#removeAll\n\t * @kind function\n\t *\n\t * @description\n\t * Clears the cache object of any entries.\n\t */\n\t removeAll: function() {\n\t data = createMap();\n\t size = 0;\n\t lruHash = createMap();\n\t freshEnd = staleEnd = null;\n\t },\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $cacheFactory.Cache#destroy\n\t * @kind function\n\t *\n\t * @description\n\t * Destroys the {@link $cacheFactory.Cache Cache} object entirely,\n\t * removing it from the {@link $cacheFactory $cacheFactory} set.\n\t */\n\t destroy: function() {\n\t data = null;\n\t stats = null;\n\t lruHash = null;\n\t delete caches[cacheId];\n\t },\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $cacheFactory.Cache#info\n\t * @kind function\n\t *\n\t * @description\n\t * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}.\n\t *\n\t * @returns {object} an object with the following properties:\n\t * <ul>\n\t * <li>**id**: the id of the cache instance</li>\n\t * <li>**size**: the number of entries kept in the cache instance</li>\n\t * <li>**...**: any additional properties from the options object when creating the\n\t * cache.</li>\n\t * </ul>\n\t */\n\t info: function() {\n\t return extend({}, stats, {size: size});\n\t }\n\t };\n\t\n\t\n\t /**\n\t * makes the `entry` the freshEnd of the LRU linked list\n\t */\n\t function refresh(entry) {\n\t if (entry != freshEnd) {\n\t if (!staleEnd) {\n\t staleEnd = entry;\n\t } else if (staleEnd == entry) {\n\t staleEnd = entry.n;\n\t }\n\t\n\t link(entry.n, entry.p);\n\t link(entry, freshEnd);\n\t freshEnd = entry;\n\t freshEnd.n = null;\n\t }\n\t }\n\t\n\t\n\t /**\n\t * bidirectionally links two entries of the LRU linked list\n\t */\n\t function link(nextEntry, prevEntry) {\n\t if (nextEntry != prevEntry) {\n\t if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify\n\t if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify\n\t }\n\t }\n\t }\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $cacheFactory#info\n\t *\n\t * @description\n\t * Get information about all the caches that have been created\n\t *\n\t * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`\n\t */\n\t cacheFactory.info = function() {\n\t var info = {};\n\t forEach(caches, function(cache, cacheId) {\n\t info[cacheId] = cache.info();\n\t });\n\t return info;\n\t };\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $cacheFactory#get\n\t *\n\t * @description\n\t * Get access to a cache object by the `cacheId` used when it was created.\n\t *\n\t * @param {string} cacheId Name or id of a cache to access.\n\t * @returns {object} Cache object identified by the cacheId or undefined if no such cache.\n\t */\n\t cacheFactory.get = function(cacheId) {\n\t return caches[cacheId];\n\t };\n\t\n\t\n\t return cacheFactory;\n\t };\n\t}\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $templateCache\n\t *\n\t * @description\n\t * The first time a template is used, it is loaded in the template cache for quick retrieval. You\n\t * can load templates directly into the cache in a `script` tag, or by consuming the\n\t * `$templateCache` service directly.\n\t *\n\t * Adding via the `script` tag:\n\t *\n\t * ```html\n\t * <script type=\"text/ng-template\" id=\"templateId.html\">\n\t * <p>This is the content of the template</p>\n\t * </script>\n\t * ```\n\t *\n\t * **Note:** the `script` tag containing the template does not need to be included in the `head` of\n\t * the document, but it must be a descendent of the {@link ng.$rootElement $rootElement} (IE,\n\t * element with ng-app attribute), otherwise the template will be ignored.\n\t *\n\t * Adding via the `$templateCache` service:\n\t *\n\t * ```js\n\t * var myApp = angular.module('myApp', []);\n\t * myApp.run(function($templateCache) {\n\t * $templateCache.put('templateId.html', 'This is the content of the template');\n\t * });\n\t * ```\n\t *\n\t * To retrieve the template later, simply use it in your HTML:\n\t * ```html\n\t * <div ng-include=\" 'templateId.html' \"></div>\n\t * ```\n\t *\n\t * or get it via Javascript:\n\t * ```js\n\t * $templateCache.get('templateId.html')\n\t * ```\n\t *\n\t * See {@link ng.$cacheFactory $cacheFactory}.\n\t *\n\t */\n\tfunction $TemplateCacheProvider() {\n\t this.$get = ['$cacheFactory', function($cacheFactory) {\n\t return $cacheFactory('templates');\n\t }];\n\t}\n\t\n\t/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\t * Any commits to this file should be reviewed with security in mind. *\n\t * Changes to this file can potentially create security vulnerabilities. *\n\t * An approval from 2 Core members with history of modifying *\n\t * this file is required. *\n\t * *\n\t * Does the change somehow allow for arbitrary javascript to be executed? *\n\t * Or allows for someone to change the prototype of built-in objects? *\n\t * Or gives undesired access to variables likes document or window? *\n\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\t\n\t/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!\n\t *\n\t * DOM-related variables:\n\t *\n\t * - \"node\" - DOM Node\n\t * - \"element\" - DOM Element or Node\n\t * - \"$node\" or \"$element\" - jqLite-wrapped node or element\n\t *\n\t *\n\t * Compiler related stuff:\n\t *\n\t * - \"linkFn\" - linking fn of a single directive\n\t * - \"nodeLinkFn\" - function that aggregates all linking fns for a particular node\n\t * - \"childLinkFn\" - function that aggregates all linking fns for child nodes of a particular node\n\t * - \"compositeLinkFn\" - function that aggregates all linking fns for a compilation root (nodeList)\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $compile\n\t * @kind function\n\t *\n\t * @description\n\t * Compiles an HTML string or DOM into a template and produces a template function, which\n\t * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together.\n\t *\n\t * The compilation is a process of walking the DOM tree and matching DOM elements to\n\t * {@link ng.$compileProvider#directive directives}.\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * **Note:** This document is an in-depth reference of all directive options.\n\t * For a gentle introduction to directives with examples of common use cases,\n\t * see the {@link guide/directive directive guide}.\n\t * </div>\n\t *\n\t * ## Comprehensive Directive API\n\t *\n\t * There are many different options for a directive.\n\t *\n\t * The difference resides in the return value of the factory function.\n\t * You can either return a \"Directive Definition Object\" (see below) that defines the directive properties,\n\t * or just the `postLink` function (all other properties will have the default values).\n\t *\n\t * <div class=\"alert alert-success\">\n\t * **Best Practice:** It's recommended to use the \"directive definition object\" form.\n\t * </div>\n\t *\n\t * Here's an example directive declared with a Directive Definition Object:\n\t *\n\t * ```js\n\t * var myModule = angular.module(...);\n\t *\n\t * myModule.directive('directiveName', function factory(injectables) {\n\t * var directiveDefinitionObject = {\n\t * priority: 0,\n\t * template: '<div></div>', // or // function(tElement, tAttrs) { ... },\n\t * // or\n\t * // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... },\n\t * transclude: false,\n\t * restrict: 'A',\n\t * templateNamespace: 'html',\n\t * scope: false,\n\t * controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },\n\t * controllerAs: 'stringIdentifier',\n\t * bindToController: false,\n\t * require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],\n\t * compile: function compile(tElement, tAttrs, transclude) {\n\t * return {\n\t * pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n\t * post: function postLink(scope, iElement, iAttrs, controller) { ... }\n\t * }\n\t * // or\n\t * // return function postLink( ... ) { ... }\n\t * },\n\t * // or\n\t * // link: {\n\t * // pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n\t * // post: function postLink(scope, iElement, iAttrs, controller) { ... }\n\t * // }\n\t * // or\n\t * // link: function postLink( ... ) { ... }\n\t * };\n\t * return directiveDefinitionObject;\n\t * });\n\t * ```\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * **Note:** Any unspecified options will use the default value. You can see the default values below.\n\t * </div>\n\t *\n\t * Therefore the above can be simplified as:\n\t *\n\t * ```js\n\t * var myModule = angular.module(...);\n\t *\n\t * myModule.directive('directiveName', function factory(injectables) {\n\t * var directiveDefinitionObject = {\n\t * link: function postLink(scope, iElement, iAttrs) { ... }\n\t * };\n\t * return directiveDefinitionObject;\n\t * // or\n\t * // return function postLink(scope, iElement, iAttrs) { ... }\n\t * });\n\t * ```\n\t *\n\t *\n\t *\n\t * ### Directive Definition Object\n\t *\n\t * The directive definition object provides instructions to the {@link ng.$compile\n\t * compiler}. The attributes are:\n\t *\n\t * #### `multiElement`\n\t * When this property is set to true, the HTML compiler will collect DOM nodes between\n\t * nodes with the attributes `directive-name-start` and `directive-name-end`, and group them\n\t * together as the directive elements. It is recommended that this feature be used on directives\n\t * which are not strictly behavioural (such as {@link ngClick}), and which\n\t * do not manipulate or replace child nodes (such as {@link ngInclude}).\n\t *\n\t * #### `priority`\n\t * When there are multiple directives defined on a single DOM element, sometimes it\n\t * is necessary to specify the order in which the directives are applied. The `priority` is used\n\t * to sort the directives before their `compile` functions get called. Priority is defined as a\n\t * number. Directives with greater numerical `priority` are compiled first. Pre-link functions\n\t * are also run in priority order, but post-link functions are run in reverse order. The order\n\t * of directives with the same priority is undefined. The default priority is `0`.\n\t *\n\t * #### `terminal`\n\t * If set to true then the current `priority` will be the last set of directives\n\t * which will execute (any directives at the current priority will still execute\n\t * as the order of execution on same `priority` is undefined). Note that expressions\n\t * and other directives used in the directive's template will also be excluded from execution.\n\t *\n\t * #### `scope`\n\t * The scope property can be `true`, an object or a falsy value:\n\t *\n\t * * **falsy:** No scope will be created for the directive. The directive will use its parent's scope.\n\t *\n\t * * **`true`:** A new child scope that prototypically inherits from its parent will be created for\n\t * the directive's element. If multiple directives on the same element request a new scope,\n\t * only one new scope is created. The new scope rule does not apply for the root of the template\n\t * since the root of the template always gets a new scope.\n\t *\n\t * * **`{...}` (an object hash):** A new \"isolate\" scope is created for the directive's element. The\n\t * 'isolate' scope differs from normal scope in that it does not prototypically inherit from its parent\n\t * scope. This is useful when creating reusable components, which should not accidentally read or modify\n\t * data in the parent scope.\n\t *\n\t * The 'isolate' scope object hash defines a set of local scope properties derived from attributes on the\n\t * directive's element. These local properties are useful for aliasing values for templates. The keys in\n\t * the object hash map to the name of the property on the isolate scope; the values define how the property\n\t * is bound to the parent scope, via matching attributes on the directive's element:\n\t *\n\t * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is\n\t * always a string since DOM attributes are strings. If no `attr` name is specified then the\n\t * attribute name is assumed to be the same as the local name. Given `<my-component\n\t * my-attr=\"hello {{name}}\">` and the isolate scope definition `scope: { localName:'@myAttr' }`,\n\t * the directive's scope property `localName` will reflect the interpolated value of `hello\n\t * {{name}}`. As the `name` attribute changes so will the `localName` property on the directive's\n\t * scope. The `name` is read from the parent scope (not the directive's scope).\n\t *\n\t * * `=` or `=attr` - set up a bidirectional binding between a local scope property and an expression\n\t * passed via the attribute `attr`. The expression is evaluated in the context of the parent scope.\n\t * If no `attr` name is specified then the attribute name is assumed to be the same as the local\n\t * name. Given `<my-component my-attr=\"parentModel\">` and the isolate scope definition `scope: {\n\t * localModel: '=myAttr' }`, the property `localModel` on the directive's scope will reflect the\n\t * value of `parentModel` on the parent scope. Changes to `parentModel` will be reflected in\n\t * `localModel` and vice versa. Optional attributes should be marked as such with a question mark:\n\t * `=?` or `=?attr`. If the binding expression is non-assignable, or if the attribute isn't\n\t * optional and doesn't exist, an exception ({@link error/$compile/nonassign `$compile:nonassign`})\n\t * will be thrown upon discovering changes to the local value, since it will be impossible to sync\n\t * them back to the parent scope. By default, the {@link ng.$rootScope.Scope#$watch `$watch`}\n\t * method is used for tracking changes, and the equality check is based on object identity.\n\t * However, if an object literal or an array literal is passed as the binding expression, the\n\t * equality check is done by value (using the {@link angular.equals} function). It's also possible\n\t * to watch the evaluated value shallowly with {@link ng.$rootScope.Scope#$watchCollection\n\t * `$watchCollection`}: use `=*` or `=*attr` (`=*?` or `=*?attr` if the attribute is optional).\n\t *\n\t * * `&` or `&attr` - provides a way to execute an expression in the context of the parent scope. If\n\t * no `attr` name is specified then the attribute name is assumed to be the same as the local name.\n\t * Given `<my-component my-attr=\"count = count + value\">` and the isolate scope definition `scope: {\n\t * localFn:'&myAttr' }`, the isolate scope property `localFn` will point to a function wrapper for\n\t * the `count = count + value` expression. Often it's desirable to pass data from the isolated scope\n\t * via an expression to the parent scope. This can be done by passing a map of local variable names\n\t * and values into the expression wrapper fn. For example, if the expression is `increment(amount)`\n\t * then we can specify the amount value by calling the `localFn` as `localFn({amount: 22})`.\n\t *\n\t * In general it's possible to apply more than one directive to one element, but there might be limitations\n\t * depending on the type of scope required by the directives. The following points will help explain these limitations.\n\t * For simplicity only two directives are taken into account, but it is also applicable for several directives:\n\t *\n\t * * **no scope** + **no scope** => Two directives which don't require their own scope will use their parent's scope\n\t * * **child scope** + **no scope** => Both directives will share one single child scope\n\t * * **child scope** + **child scope** => Both directives will share one single child scope\n\t * * **isolated scope** + **no scope** => The isolated directive will use it's own created isolated scope. The other directive will use\n\t * its parent's scope\n\t * * **isolated scope** + **child scope** => **Won't work!** Only one scope can be related to one element. Therefore these directives cannot\n\t * be applied to the same element.\n\t * * **isolated scope** + **isolated scope** => **Won't work!** Only one scope can be related to one element. Therefore these directives\n\t * cannot be applied to the same element.\n\t *\n\t *\n\t * #### `bindToController`\n\t * This property is used to bind scope properties directly to the controller. It can be either\n\t * `true` or an object hash with the same format as the `scope` property. Additionally, a controller\n\t * alias must be set, either by using `controllerAs: 'myAlias'` or by specifying the alias in the controller\n\t * definition: `controller: 'myCtrl as myAlias'`.\n\t *\n\t * When an isolate scope is used for a directive (see above), `bindToController: true` will\n\t * allow a component to have its properties bound to the controller, rather than to scope. When the controller\n\t * is instantiated, the initial values of the isolate scope bindings are already available.\n\t *\n\t * It is also possible to set `bindToController` to an object hash with the same format as the `scope` property.\n\t * This will set up the scope bindings to the controller directly. Note that `scope` can still be used\n\t * to define which kind of scope is created. By default, no scope is created. Use `scope: {}` to create an isolate\n\t * scope (useful for component directives).\n\t *\n\t * If both `bindToController` and `scope` are defined and have object hashes, `bindToController` overrides `scope`.\n\t *\n\t *\n\t * #### `controller`\n\t * Controller constructor function. The controller is instantiated before the\n\t * pre-linking phase and can be accessed by other directives (see\n\t * `require` attribute). This allows the directives to communicate with each other and augment\n\t * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals:\n\t *\n\t * * `$scope` - Current scope associated with the element\n\t * * `$element` - Current element\n\t * * `$attrs` - Current attributes object for the element\n\t * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope:\n\t * `function([scope], cloneLinkingFn, futureParentElement)`.\n\t * * `scope`: optional argument to override the scope.\n\t * * `cloneLinkingFn`: optional argument to create clones of the original transcluded content.\n\t * * `futureParentElement`:\n\t * * defines the parent to which the `cloneLinkingFn` will add the cloned elements.\n\t * * default: `$element.parent()` resp. `$element` for `transclude:'element'` resp. `transclude:true`.\n\t * * only needed for transcludes that are allowed to contain non html elements (e.g. SVG elements)\n\t * and when the `cloneLinkinFn` is passed,\n\t * as those elements need to created and cloned in a special way when they are defined outside their\n\t * usual containers (e.g. like `<svg>`).\n\t * * See also the `directive.templateNamespace` property.\n\t *\n\t *\n\t * #### `require`\n\t * Require another directive and inject its controller as the fourth argument to the linking function. The\n\t * `require` takes a string name (or array of strings) of the directive(s) to pass in. If an array is used, the\n\t * injected argument will be an array in corresponding order. If no such directive can be\n\t * found, or if the directive does not have a controller, then an error is raised (unless no link function\n\t * is specified, in which case error checking is skipped). The name can be prefixed with:\n\t *\n\t * * (no prefix) - Locate the required controller on the current element. Throw an error if not found.\n\t * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.\n\t * * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found.\n\t * * `^^` - Locate the required controller by searching the element's parents. Throw an error if not found.\n\t * * `?^` - Attempt to locate the required controller by searching the element and its parents or pass\n\t * `null` to the `link` fn if not found.\n\t * * `?^^` - Attempt to locate the required controller by searching the element's parents, or pass\n\t * `null` to the `link` fn if not found.\n\t *\n\t *\n\t * #### `controllerAs`\n\t * Identifier name for a reference to the controller in the directive's scope.\n\t * This allows the controller to be referenced from the directive template. This is especially\n\t * useful when a directive is used as component, i.e. with an `isolate` scope. It's also possible\n\t * to use it in a directive without an `isolate` / `new` scope, but you need to be aware that the\n\t * `controllerAs` reference might overwrite a property that already exists on the parent scope.\n\t *\n\t *\n\t * #### `restrict`\n\t * String of subset of `EACM` which restricts the directive to a specific directive\n\t * declaration style. If omitted, the defaults (elements and attributes) are used.\n\t *\n\t * * `E` - Element name (default): `<my-directive></my-directive>`\n\t * * `A` - Attribute (default): `<div my-directive=\"exp\"></div>`\n\t * * `C` - Class: `<div class=\"my-directive: exp;\"></div>`\n\t * * `M` - Comment: `<!-- directive: my-directive exp -->`\n\t *\n\t *\n\t * #### `templateNamespace`\n\t * String representing the document type used by the markup in the template.\n\t * AngularJS needs this information as those elements need to be created and cloned\n\t * in a special way when they are defined outside their usual containers like `<svg>` and `<math>`.\n\t *\n\t * * `html` - All root nodes in the template are HTML. Root nodes may also be\n\t * top-level elements such as `<svg>` or `<math>`.\n\t * * `svg` - The root nodes in the template are SVG elements (excluding `<math>`).\n\t * * `math` - The root nodes in the template are MathML elements (excluding `<svg>`).\n\t *\n\t * If no `templateNamespace` is specified, then the namespace is considered to be `html`.\n\t *\n\t * #### `template`\n\t * HTML markup that may:\n\t * * Replace the contents of the directive's element (default).\n\t * * Replace the directive's element itself (if `replace` is true - DEPRECATED).\n\t * * Wrap the contents of the directive's element (if `transclude` is true).\n\t *\n\t * Value may be:\n\t *\n\t * * A string. For example `<div red-on-hover>{{delete_str}}</div>`.\n\t * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile`\n\t * function api below) and returns a string value.\n\t *\n\t *\n\t * #### `templateUrl`\n\t * This is similar to `template` but the template is loaded from the specified URL, asynchronously.\n\t *\n\t * Because template loading is asynchronous the compiler will suspend compilation of directives on that element\n\t * for later when the template has been resolved. In the meantime it will continue to compile and link\n\t * sibling and parent elements as though this element had not contained any directives.\n\t *\n\t * The compiler does not suspend the entire compilation to wait for templates to be loaded because this\n\t * would result in the whole app \"stalling\" until all templates are loaded asynchronously - even in the\n\t * case when only one deeply nested directive has `templateUrl`.\n\t *\n\t * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}\n\t *\n\t * You can specify `templateUrl` as a string representing the URL or as a function which takes two\n\t * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns\n\t * a string value representing the url. In either case, the template URL is passed through {@link\n\t * $sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.\n\t *\n\t *\n\t * #### `replace` ([*DEPRECATED*!], will be removed in next major release - i.e. v2.0)\n\t * specify what the template should replace. Defaults to `false`.\n\t *\n\t * * `true` - the template will replace the directive's element.\n\t * * `false` - the template will replace the contents of the directive's element.\n\t *\n\t * The replacement process migrates all of the attributes / classes from the old element to the new\n\t * one. See the {@link guide/directive#template-expanding-directive\n\t * Directives Guide} for an example.\n\t *\n\t * There are very few scenarios where element replacement is required for the application function,\n\t * the main one being reusable custom components that are used within SVG contexts\n\t * (because SVG doesn't work with custom elements in the DOM tree).\n\t *\n\t * #### `transclude`\n\t * Extract the contents of the element where the directive appears and make it available to the directive.\n\t * The contents are compiled and provided to the directive as a **transclusion function**. See the\n\t * {@link $compile#transclusion Transclusion} section below.\n\t *\n\t * There are two kinds of transclusion depending upon whether you want to transclude just the contents of the\n\t * directive's element or the entire element:\n\t *\n\t * * `true` - transclude the content (i.e. the child nodes) of the directive's element.\n\t * * `'element'` - transclude the whole of the directive's element including any directives on this\n\t * element that defined at a lower priority than this directive. When used, the `template`\n\t * property is ignored.\n\t *\n\t *\n\t * #### `compile`\n\t *\n\t * ```js\n\t * function compile(tElement, tAttrs, transclude) { ... }\n\t * ```\n\t *\n\t * The compile function deals with transforming the template DOM. Since most directives do not do\n\t * template transformation, it is not used often. The compile function takes the following arguments:\n\t *\n\t * * `tElement` - template element - The element where the directive has been declared. It is\n\t * safe to do template transformation on the element and child elements only.\n\t *\n\t * * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared\n\t * between all directive compile functions.\n\t *\n\t * * `transclude` - [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)`\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * **Note:** The template instance and the link instance may be different objects if the template has\n\t * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that\n\t * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration\n\t * should be done in a linking function rather than in a compile function.\n\t * </div>\n\t\n\t * <div class=\"alert alert-warning\">\n\t * **Note:** The compile function cannot handle directives that recursively use themselves in their\n\t * own templates or compile functions. Compiling these directives results in an infinite loop and\n\t * stack overflow errors.\n\t *\n\t * This can be avoided by manually using $compile in the postLink function to imperatively compile\n\t * a directive's template instead of relying on automatic template compilation via `template` or\n\t * `templateUrl` declaration or manual compilation inside the compile function.\n\t * </div>\n\t *\n\t * <div class=\"alert alert-danger\">\n\t * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it\n\t * e.g. does not know about the right outer scope. Please use the transclude function that is passed\n\t * to the link function instead.\n\t * </div>\n\t\n\t * A compile function can have a return value which can be either a function or an object.\n\t *\n\t * * returning a (post-link) function - is equivalent to registering the linking function via the\n\t * `link` property of the config object when the compile function is empty.\n\t *\n\t * * returning an object with function(s) registered via `pre` and `post` properties - allows you to\n\t * control when a linking function should be called during the linking phase. See info about\n\t * pre-linking and post-linking functions below.\n\t *\n\t *\n\t * #### `link`\n\t * This property is used only if the `compile` property is not defined.\n\t *\n\t * ```js\n\t * function link(scope, iElement, iAttrs, controller, transcludeFn) { ... }\n\t * ```\n\t *\n\t * The link function is responsible for registering DOM listeners as well as updating the DOM. It is\n\t * executed after the template has been cloned. This is where most of the directive logic will be\n\t * put.\n\t *\n\t * * `scope` - {@link ng.$rootScope.Scope Scope} - The scope to be used by the\n\t * directive for registering {@link ng.$rootScope.Scope#$watch watches}.\n\t *\n\t * * `iElement` - instance element - The element where the directive is to be used. It is safe to\n\t * manipulate the children of the element only in `postLink` function since the children have\n\t * already been linked.\n\t *\n\t * * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared\n\t * between all directive linking functions.\n\t *\n\t * * `controller` - the directive's required controller instance(s) - Instances are shared\n\t * among all directives, which allows the directives to use the controllers as a communication\n\t * channel. The exact value depends on the directive's `require` property:\n\t * * no controller(s) required: the directive's own controller, or `undefined` if it doesn't have one\n\t * * `string`: the controller instance\n\t * * `array`: array of controller instances\n\t *\n\t * If a required controller cannot be found, and it is optional, the instance is `null`,\n\t * otherwise the {@link error:$compile:ctreq Missing Required Controller} error is thrown.\n\t *\n\t * Note that you can also require the directive's own controller - it will be made available like\n\t * any other controller.\n\t *\n\t * * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.\n\t * This is the same as the `$transclude`\n\t * parameter of directive controllers, see there for details.\n\t * `function([scope], cloneLinkingFn, futureParentElement)`.\n\t *\n\t * #### Pre-linking function\n\t *\n\t * Executed before the child elements are linked. Not safe to do DOM transformation since the\n\t * compiler linking function will fail to locate the correct elements for linking.\n\t *\n\t * #### Post-linking function\n\t *\n\t * Executed after the child elements are linked.\n\t *\n\t * Note that child elements that contain `templateUrl` directives will not have been compiled\n\t * and linked since they are waiting for their template to load asynchronously and their own\n\t * compilation and linking has been suspended until that occurs.\n\t *\n\t * It is safe to do DOM transformation in the post-linking function on elements that are not waiting\n\t * for their async templates to be resolved.\n\t *\n\t *\n\t * ### Transclusion\n\t *\n\t * Transclusion is the process of extracting a collection of DOM elements from one part of the DOM and\n\t * copying them to another part of the DOM, while maintaining their connection to the original AngularJS\n\t * scope from where they were taken.\n\t *\n\t * Transclusion is used (often with {@link ngTransclude}) to insert the\n\t * original contents of a directive's element into a specified place in the template of the directive.\n\t * The benefit of transclusion, over simply moving the DOM elements manually, is that the transcluded\n\t * content has access to the properties on the scope from which it was taken, even if the directive\n\t * has isolated scope.\n\t * See the {@link guide/directive#creating-a-directive-that-wraps-other-elements Directives Guide}.\n\t *\n\t * This makes it possible for the widget to have private state for its template, while the transcluded\n\t * content has access to its originating scope.\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * **Note:** When testing an element transclude directive you must not place the directive at the root of the\n\t * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives\n\t * Testing Transclusion Directives}.\n\t * </div>\n\t *\n\t * #### Transclusion Functions\n\t *\n\t * When a directive requests transclusion, the compiler extracts its contents and provides a **transclusion\n\t * function** to the directive's `link` function and `controller`. This transclusion function is a special\n\t * **linking function** that will return the compiled contents linked to a new transclusion scope.\n\t *\n\t * <div class=\"alert alert-info\">\n\t * If you are just using {@link ngTransclude} then you don't need to worry about this function, since\n\t * ngTransclude will deal with it for us.\n\t * </div>\n\t *\n\t * If you want to manually control the insertion and removal of the transcluded content in your directive\n\t * then you must use this transclude function. When you call a transclude function it returns a a jqLite/JQuery\n\t * object that contains the compiled DOM, which is linked to the correct transclusion scope.\n\t *\n\t * When you call a transclusion function you can pass in a **clone attach function**. This function accepts\n\t * two parameters, `function(clone, scope) { ... }`, where the `clone` is a fresh compiled copy of your transcluded\n\t * content and the `scope` is the newly created transclusion scope, to which the clone is bound.\n\t *\n\t * <div class=\"alert alert-info\">\n\t * **Best Practice**: Always provide a `cloneFn` (clone attach function) when you call a translude function\n\t * since you then get a fresh clone of the original DOM and also have access to the new transclusion scope.\n\t * </div>\n\t *\n\t * It is normal practice to attach your transcluded content (`clone`) to the DOM inside your **clone\n\t * attach function**:\n\t *\n\t * ```js\n\t * var transcludedContent, transclusionScope;\n\t *\n\t * $transclude(function(clone, scope) {\n\t * element.append(clone);\n\t * transcludedContent = clone;\n\t * transclusionScope = scope;\n\t * });\n\t * ```\n\t *\n\t * Later, if you want to remove the transcluded content from your DOM then you should also destroy the\n\t * associated transclusion scope:\n\t *\n\t * ```js\n\t * transcludedContent.remove();\n\t * transclusionScope.$destroy();\n\t * ```\n\t *\n\t * <div class=\"alert alert-info\">\n\t * **Best Practice**: if you intend to add and remove transcluded content manually in your directive\n\t * (by calling the transclude function to get the DOM and calling `element.remove()` to remove it),\n\t * then you are also responsible for calling `$destroy` on the transclusion scope.\n\t * </div>\n\t *\n\t * The built-in DOM manipulation directives, such as {@link ngIf}, {@link ngSwitch} and {@link ngRepeat}\n\t * automatically destroy their transluded clones as necessary so you do not need to worry about this if\n\t * you are simply using {@link ngTransclude} to inject the transclusion into your directive.\n\t *\n\t *\n\t * #### Transclusion Scopes\n\t *\n\t * When you call a transclude function it returns a DOM fragment that is pre-bound to a **transclusion\n\t * scope**. This scope is special, in that it is a child of the directive's scope (and so gets destroyed\n\t * when the directive's scope gets destroyed) but it inherits the properties of the scope from which it\n\t * was taken.\n\t *\n\t * For example consider a directive that uses transclusion and isolated scope. The DOM hierarchy might look\n\t * like this:\n\t *\n\t * ```html\n\t * <div ng-app>\n\t * <div isolate>\n\t * <div transclusion>\n\t * </div>\n\t * </div>\n\t * </div>\n\t * ```\n\t *\n\t * The `$parent` scope hierarchy will look like this:\n\t *\n\t ```\n\t - $rootScope\n\t - isolate\n\t - transclusion\n\t ```\n\t *\n\t * but the scopes will inherit prototypically from different scopes to their `$parent`.\n\t *\n\t ```\n\t - $rootScope\n\t - transclusion\n\t - isolate\n\t ```\n\t *\n\t *\n\t * ### Attributes\n\t *\n\t * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the\n\t * `link()` or `compile()` functions. It has a variety of uses.\n\t *\n\t * * *Accessing normalized attribute names:* Directives like 'ngBind' can be expressed in many ways:\n\t * 'ng:bind', `data-ng-bind`, or 'x-ng-bind'. The attributes object allows for normalized access\n\t * to the attributes.\n\t *\n\t * * *Directive inter-communication:* All directives share the same instance of the attributes\n\t * object which allows the directives to use the attributes object as inter directive\n\t * communication.\n\t *\n\t * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object\n\t * allowing other directives to read the interpolated value.\n\t *\n\t * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes\n\t * that contain interpolation (e.g. `src=\"{{bar}}\"`). Not only is this very efficient but it's also\n\t * the only way to easily get the actual value because during the linking phase the interpolation\n\t * hasn't been evaluated yet and so the value is at this time set to `undefined`.\n\t *\n\t * ```js\n\t * function linkingFn(scope, elm, attrs, ctrl) {\n\t * // get the attribute value\n\t * console.log(attrs.ngModel);\n\t *\n\t * // change the attribute\n\t * attrs.$set('ngModel', 'new value');\n\t *\n\t * // observe changes to interpolated attribute\n\t * attrs.$observe('ngModel', function(value) {\n\t * console.log('ngModel has changed value to ' + value);\n\t * });\n\t * }\n\t * ```\n\t *\n\t * ## Example\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * **Note**: Typically directives are registered with `module.directive`. The example below is\n\t * to illustrate how `$compile` works.\n\t * </div>\n\t *\n\t <example module=\"compileExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('compileExample', [], function($compileProvider) {\n\t // configure new 'compile' directive by passing a directive\n\t // factory function. The factory function injects the '$compile'\n\t $compileProvider.directive('compile', function($compile) {\n\t // directive factory creates a link function\n\t return function(scope, element, attrs) {\n\t scope.$watch(\n\t function(scope) {\n\t // watch the 'compile' expression for changes\n\t return scope.$eval(attrs.compile);\n\t },\n\t function(value) {\n\t // when the 'compile' expression changes\n\t // assign it into the current DOM\n\t element.html(value);\n\t\n\t // compile the new DOM and link it to the current\n\t // scope.\n\t // NOTE: we only compile .childNodes so that\n\t // we don't get into infinite loop compiling ourselves\n\t $compile(element.contents())(scope);\n\t }\n\t );\n\t };\n\t });\n\t })\n\t .controller('GreeterController', ['$scope', function($scope) {\n\t $scope.name = 'Angular';\n\t $scope.html = 'Hello {{name}}';\n\t }]);\n\t </script>\n\t <div ng-controller=\"GreeterController\">\n\t <input ng-model=\"name\"> <br/>\n\t <textarea ng-model=\"html\"></textarea> <br/>\n\t <div compile=\"html\"></div>\n\t </div>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should auto compile', function() {\n\t var textarea = $('textarea');\n\t var output = $('div[compile]');\n\t // The initial state reads 'Hello Angular'.\n\t expect(output.getText()).toBe('Hello Angular');\n\t textarea.clear();\n\t textarea.sendKeys('{{name}}!');\n\t expect(output.getText()).toBe('Angular!');\n\t });\n\t </file>\n\t </example>\n\t\n\t *\n\t *\n\t * @param {string|DOMElement} element Element or HTML string to compile into a template function.\n\t * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives - DEPRECATED.\n\t *\n\t * <div class=\"alert alert-danger\">\n\t * **Note:** Passing a `transclude` function to the $compile function is deprecated, as it\n\t * e.g. will not use the right outer scope. Please pass the transclude function as a\n\t * `parentBoundTranscludeFn` to the link function instead.\n\t * </div>\n\t *\n\t * @param {number} maxPriority only apply directives lower than given priority (Only effects the\n\t * root element(s), not their children)\n\t * @returns {function(scope, cloneAttachFn=, options=)} a link function which is used to bind template\n\t * (a DOM element/tree) to a scope. Where:\n\t *\n\t * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.\n\t * * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the\n\t * `template` and call the `cloneAttachFn` function allowing the caller to attach the\n\t * cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is\n\t * called as: <br/> `cloneAttachFn(clonedElement, scope)` where:\n\t *\n\t * * `clonedElement` - is a clone of the original `element` passed into the compiler.\n\t * * `scope` - is the current scope with which the linking function is working with.\n\t *\n\t * * `options` - An optional object hash with linking options. If `options` is provided, then the following\n\t * keys may be used to control linking behavior:\n\t *\n\t * * `parentBoundTranscludeFn` - the transclude function made available to\n\t * directives; if given, it will be passed through to the link functions of\n\t * directives found in `element` during compilation.\n\t * * `transcludeControllers` - an object hash with keys that map controller names\n\t * to a hash with the key `instance`, which maps to the controller instance;\n\t * if given, it will make the controllers available to directives on the compileNode:\n\t * ```\n\t * {\n\t * parent: {\n\t * instance: parentControllerInstance\n\t * }\n\t * }\n\t * ```\n\t * * `futureParentElement` - defines the parent to which the `cloneAttachFn` will add\n\t * the cloned elements; only needed for transcludes that are allowed to contain non html\n\t * elements (e.g. SVG elements). See also the directive.controller property.\n\t *\n\t * Calling the linking function returns the element of the template. It is either the original\n\t * element passed in, or the clone of the element if the `cloneAttachFn` is provided.\n\t *\n\t * After linking the view is not updated until after a call to $digest which typically is done by\n\t * Angular automatically.\n\t *\n\t * If you need access to the bound view, there are two ways to do it:\n\t *\n\t * - If you are not asking the linking function to clone the template, create the DOM element(s)\n\t * before you send them to the compiler and keep this reference around.\n\t * ```js\n\t * var element = $compile('<p>{{total}}</p>')(scope);\n\t * ```\n\t *\n\t * - if on the other hand, you need the element to be cloned, the view reference from the original\n\t * example would not point to the clone, but rather to the original template that was cloned. In\n\t * this case, you can access the clone via the cloneAttachFn:\n\t * ```js\n\t * var templateElement = angular.element('<p>{{total}}</p>'),\n\t * scope = ....;\n\t *\n\t * var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {\n\t * //attach the clone to DOM document at the right place\n\t * });\n\t *\n\t * //now we have reference to the cloned DOM via `clonedElement`\n\t * ```\n\t *\n\t *\n\t * For information on how the compiler works, see the\n\t * {@link guide/compiler Angular HTML Compiler} section of the Developer Guide.\n\t */\n\t\n\tvar $compileMinErr = minErr('$compile');\n\t\n\t/**\n\t * @ngdoc provider\n\t * @name $compileProvider\n\t *\n\t * @description\n\t */\n\t$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];\n\tfunction $CompileProvider($provide, $$sanitizeUriProvider) {\n\t var hasDirectives = {},\n\t Suffix = 'Directive',\n\t COMMENT_DIRECTIVE_REGEXP = /^\\s*directive\\:\\s*([\\w\\-]+)\\s+(.*)$/,\n\t CLASS_DIRECTIVE_REGEXP = /(([\\w\\-]+)(?:\\:([^;]+))?;?)/,\n\t ALL_OR_NOTHING_ATTRS = makeMap('ngSrc,ngSrcset,src,srcset'),\n\t REQUIRE_PREFIX_REGEXP = /^(?:(\\^\\^?)?(\\?)?(\\^\\^?)?)?/;\n\t\n\t // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes\n\t // The assumption is that future DOM event attribute names will begin with\n\t // 'on' and be composed of only English letters.\n\t var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;\n\t var bindingCache = createMap();\n\t\n\t function parseIsolateBindings(scope, directiveName, isController) {\n\t var LOCAL_REGEXP = /^\\s*([@&]|=(\\*?))(\\??)\\s*(\\w*)\\s*$/;\n\t\n\t var bindings = createMap();\n\t\n\t forEach(scope, function(definition, scopeName) {\n\t if (definition in bindingCache) {\n\t bindings[scopeName] = bindingCache[definition];\n\t return;\n\t }\n\t var match = definition.match(LOCAL_REGEXP);\n\t\n\t if (!match) {\n\t throw $compileMinErr('iscp',\n\t \"Invalid {3} for directive '{0}'.\" +\n\t \" Definition: {... {1}: '{2}' ...}\",\n\t directiveName, scopeName, definition,\n\t (isController ? \"controller bindings definition\" :\n\t \"isolate scope definition\"));\n\t }\n\t\n\t bindings[scopeName] = {\n\t mode: match[1][0],\n\t collection: match[2] === '*',\n\t optional: match[3] === '?',\n\t attrName: match[4] || scopeName\n\t };\n\t if (match[4]) {\n\t bindingCache[definition] = bindings[scopeName];\n\t }\n\t });\n\t\n\t return bindings;\n\t }\n\t\n\t function parseDirectiveBindings(directive, directiveName) {\n\t var bindings = {\n\t isolateScope: null,\n\t bindToController: null\n\t };\n\t if (isObject(directive.scope)) {\n\t if (directive.bindToController === true) {\n\t bindings.bindToController = parseIsolateBindings(directive.scope,\n\t directiveName, true);\n\t bindings.isolateScope = {};\n\t } else {\n\t bindings.isolateScope = parseIsolateBindings(directive.scope,\n\t directiveName, false);\n\t }\n\t }\n\t if (isObject(directive.bindToController)) {\n\t bindings.bindToController =\n\t parseIsolateBindings(directive.bindToController, directiveName, true);\n\t }\n\t if (isObject(bindings.bindToController)) {\n\t var controller = directive.controller;\n\t var controllerAs = directive.controllerAs;\n\t if (!controller) {\n\t // There is no controller, there may or may not be a controllerAs property\n\t throw $compileMinErr('noctrl',\n\t \"Cannot bind to controller without directive '{0}'s controller.\",\n\t directiveName);\n\t } else if (!identifierForController(controller, controllerAs)) {\n\t // There is a controller, but no identifier or controllerAs property\n\t throw $compileMinErr('noident',\n\t \"Cannot bind to controller without identifier for directive '{0}'.\",\n\t directiveName);\n\t }\n\t }\n\t return bindings;\n\t }\n\t\n\t function assertValidDirectiveName(name) {\n\t var letter = name.charAt(0);\n\t if (!letter || letter !== lowercase(letter)) {\n\t throw $compileMinErr('baddir', \"Directive name '{0}' is invalid. The first character must be a lowercase letter\", name);\n\t }\n\t if (name !== name.trim()) {\n\t throw $compileMinErr('baddir',\n\t \"Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces\",\n\t name);\n\t }\n\t }\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $compileProvider#directive\n\t * @kind function\n\t *\n\t * @description\n\t * Register a new directive with the compiler.\n\t *\n\t * @param {string|Object} name Name of the directive in camel-case (i.e. <code>ngBind</code> which\n\t * will match as <code>ng-bind</code>), or an object map of directives where the keys are the\n\t * names and the values are the factories.\n\t * @param {Function|Array} directiveFactory An injectable directive factory function. See\n\t * {@link guide/directive} for more info.\n\t * @returns {ng.$compileProvider} Self for chaining.\n\t */\n\t this.directive = function registerDirective(name, directiveFactory) {\n\t assertNotHasOwnProperty(name, 'directive');\n\t if (isString(name)) {\n\t assertValidDirectiveName(name);\n\t assertArg(directiveFactory, 'directiveFactory');\n\t if (!hasDirectives.hasOwnProperty(name)) {\n\t hasDirectives[name] = [];\n\t $provide.factory(name + Suffix, ['$injector', '$exceptionHandler',\n\t function($injector, $exceptionHandler) {\n\t var directives = [];\n\t forEach(hasDirectives[name], function(directiveFactory, index) {\n\t try {\n\t var directive = $injector.invoke(directiveFactory);\n\t if (isFunction(directive)) {\n\t directive = { compile: valueFn(directive) };\n\t } else if (!directive.compile && directive.link) {\n\t directive.compile = valueFn(directive.link);\n\t }\n\t directive.priority = directive.priority || 0;\n\t directive.index = index;\n\t directive.name = directive.name || name;\n\t directive.require = directive.require || (directive.controller && directive.name);\n\t directive.restrict = directive.restrict || 'EA';\n\t directive.$$moduleName = directiveFactory.$$moduleName;\n\t directives.push(directive);\n\t } catch (e) {\n\t $exceptionHandler(e);\n\t }\n\t });\n\t return directives;\n\t }]);\n\t }\n\t hasDirectives[name].push(directiveFactory);\n\t } else {\n\t forEach(name, reverseParams(registerDirective));\n\t }\n\t return this;\n\t };\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $compileProvider#aHrefSanitizationWhitelist\n\t * @kind function\n\t *\n\t * @description\n\t * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n\t * urls during a[href] sanitization.\n\t *\n\t * The sanitization is a security measure aimed at preventing XSS attacks via html links.\n\t *\n\t * Any url about to be assigned to a[href] via data-binding is first normalized and turned into\n\t * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`\n\t * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n\t * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n\t *\n\t * @param {RegExp=} regexp New regexp to whitelist urls with.\n\t * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n\t * chaining otherwise.\n\t */\n\t this.aHrefSanitizationWhitelist = function(regexp) {\n\t if (isDefined(regexp)) {\n\t $$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp);\n\t return this;\n\t } else {\n\t return $$sanitizeUriProvider.aHrefSanitizationWhitelist();\n\t }\n\t };\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $compileProvider#imgSrcSanitizationWhitelist\n\t * @kind function\n\t *\n\t * @description\n\t * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n\t * urls during img[src] sanitization.\n\t *\n\t * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n\t *\n\t * Any url about to be assigned to img[src] via data-binding is first normalized and turned into\n\t * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`\n\t * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n\t * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n\t *\n\t * @param {RegExp=} regexp New regexp to whitelist urls with.\n\t * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n\t * chaining otherwise.\n\t */\n\t this.imgSrcSanitizationWhitelist = function(regexp) {\n\t if (isDefined(regexp)) {\n\t $$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp);\n\t return this;\n\t } else {\n\t return $$sanitizeUriProvider.imgSrcSanitizationWhitelist();\n\t }\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $compileProvider#debugInfoEnabled\n\t *\n\t * @param {boolean=} enabled update the debugInfoEnabled state if provided, otherwise just return the\n\t * current debugInfoEnabled state\n\t * @returns {*} current value if used as getter or itself (chaining) if used as setter\n\t *\n\t * @kind function\n\t *\n\t * @description\n\t * Call this method to enable/disable various debug runtime information in the compiler such as adding\n\t * binding information and a reference to the current scope on to DOM elements.\n\t * If enabled, the compiler will add the following to DOM elements that have been bound to the scope\n\t * * `ng-binding` CSS class\n\t * * `$binding` data property containing an array of the binding expressions\n\t *\n\t * You may want to disable this in production for a significant performance boost. See\n\t * {@link guide/production#disabling-debug-data Disabling Debug Data} for more.\n\t *\n\t * The default value is true.\n\t */\n\t var debugInfoEnabled = true;\n\t this.debugInfoEnabled = function(enabled) {\n\t if (isDefined(enabled)) {\n\t debugInfoEnabled = enabled;\n\t return this;\n\t }\n\t return debugInfoEnabled;\n\t };\n\t\n\t this.$get = [\n\t '$injector', '$interpolate', '$exceptionHandler', '$templateRequest', '$parse',\n\t '$controller', '$rootScope', '$sce', '$animate', '$$sanitizeUri',\n\t function($injector, $interpolate, $exceptionHandler, $templateRequest, $parse,\n\t $controller, $rootScope, $sce, $animate, $$sanitizeUri) {\n\t\n\t var Attributes = function(element, attributesToCopy) {\n\t if (attributesToCopy) {\n\t var keys = Object.keys(attributesToCopy);\n\t var i, l, key;\n\t\n\t for (i = 0, l = keys.length; i < l; i++) {\n\t key = keys[i];\n\t this[key] = attributesToCopy[key];\n\t }\n\t } else {\n\t this.$attr = {};\n\t }\n\t\n\t this.$$element = element;\n\t };\n\t\n\t Attributes.prototype = {\n\t /**\n\t * @ngdoc method\n\t * @name $compile.directive.Attributes#$normalize\n\t * @kind function\n\t *\n\t * @description\n\t * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with `x-` or\n\t * `data-`) to its normalized, camelCase form.\n\t *\n\t * Also there is special case for Moz prefix starting with upper case letter.\n\t *\n\t * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives}\n\t *\n\t * @param {string} name Name to normalize\n\t */\n\t $normalize: directiveNormalize,\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $compile.directive.Attributes#$addClass\n\t * @kind function\n\t *\n\t * @description\n\t * Adds the CSS class value specified by the classVal parameter to the element. If animations\n\t * are enabled then an animation will be triggered for the class addition.\n\t *\n\t * @param {string} classVal The className value that will be added to the element\n\t */\n\t $addClass: function(classVal) {\n\t if (classVal && classVal.length > 0) {\n\t $animate.addClass(this.$$element, classVal);\n\t }\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $compile.directive.Attributes#$removeClass\n\t * @kind function\n\t *\n\t * @description\n\t * Removes the CSS class value specified by the classVal parameter from the element. If\n\t * animations are enabled then an animation will be triggered for the class removal.\n\t *\n\t * @param {string} classVal The className value that will be removed from the element\n\t */\n\t $removeClass: function(classVal) {\n\t if (classVal && classVal.length > 0) {\n\t $animate.removeClass(this.$$element, classVal);\n\t }\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $compile.directive.Attributes#$updateClass\n\t * @kind function\n\t *\n\t * @description\n\t * Adds and removes the appropriate CSS class values to the element based on the difference\n\t * between the new and old CSS class values (specified as newClasses and oldClasses).\n\t *\n\t * @param {string} newClasses The current CSS className value\n\t * @param {string} oldClasses The former CSS className value\n\t */\n\t $updateClass: function(newClasses, oldClasses) {\n\t var toAdd = tokenDifference(newClasses, oldClasses);\n\t if (toAdd && toAdd.length) {\n\t $animate.addClass(this.$$element, toAdd);\n\t }\n\t\n\t var toRemove = tokenDifference(oldClasses, newClasses);\n\t if (toRemove && toRemove.length) {\n\t $animate.removeClass(this.$$element, toRemove);\n\t }\n\t },\n\t\n\t /**\n\t * Set a normalized attribute on the element in a way such that all directives\n\t * can share the attribute. This function properly handles boolean attributes.\n\t * @param {string} key Normalized key. (ie ngAttribute)\n\t * @param {string|boolean} value The value to set. If `null` attribute will be deleted.\n\t * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute.\n\t * Defaults to true.\n\t * @param {string=} attrName Optional none normalized name. Defaults to key.\n\t */\n\t $set: function(key, value, writeAttr, attrName) {\n\t // TODO: decide whether or not to throw an error if \"class\"\n\t //is set through this function since it may cause $updateClass to\n\t //become unstable.\n\t\n\t var node = this.$$element[0],\n\t booleanKey = getBooleanAttrName(node, key),\n\t aliasedKey = getAliasedAttrName(key),\n\t observer = key,\n\t nodeName;\n\t\n\t if (booleanKey) {\n\t this.$$element.prop(key, value);\n\t attrName = booleanKey;\n\t } else if (aliasedKey) {\n\t this[aliasedKey] = value;\n\t observer = aliasedKey;\n\t }\n\t\n\t this[key] = value;\n\t\n\t // translate normalized key to actual key\n\t if (attrName) {\n\t this.$attr[key] = attrName;\n\t } else {\n\t attrName = this.$attr[key];\n\t if (!attrName) {\n\t this.$attr[key] = attrName = snake_case(key, '-');\n\t }\n\t }\n\t\n\t nodeName = nodeName_(this.$$element);\n\t\n\t if ((nodeName === 'a' && key === 'href') ||\n\t (nodeName === 'img' && key === 'src')) {\n\t // sanitize a[href] and img[src] values\n\t this[key] = value = $$sanitizeUri(value, key === 'src');\n\t } else if (nodeName === 'img' && key === 'srcset' && isDefined(value)) {\n\t // sanitize img[srcset] values\n\t var result = \"\";\n\t\n\t // first check if there are spaces because it's not the same pattern\n\t var trimmedSrcset = trim(value);\n\t // ( 999x ,| 999w ,| ,|, )\n\t var srcPattern = /(\\s+\\d+x\\s*,|\\s+\\d+w\\s*,|\\s+,|,\\s+)/;\n\t var pattern = /\\s/.test(trimmedSrcset) ? srcPattern : /(,)/;\n\t\n\t // split srcset into tuple of uri and descriptor except for the last item\n\t var rawUris = trimmedSrcset.split(pattern);\n\t\n\t // for each tuples\n\t var nbrUrisWith2parts = Math.floor(rawUris.length / 2);\n\t for (var i = 0; i < nbrUrisWith2parts; i++) {\n\t var innerIdx = i * 2;\n\t // sanitize the uri\n\t result += $$sanitizeUri(trim(rawUris[innerIdx]), true);\n\t // add the descriptor\n\t result += (\" \" + trim(rawUris[innerIdx + 1]));\n\t }\n\t\n\t // split the last item into uri and descriptor\n\t var lastTuple = trim(rawUris[i * 2]).split(/\\s/);\n\t\n\t // sanitize the last uri\n\t result += $$sanitizeUri(trim(lastTuple[0]), true);\n\t\n\t // and add the last descriptor if any\n\t if (lastTuple.length === 2) {\n\t result += (\" \" + trim(lastTuple[1]));\n\t }\n\t this[key] = value = result;\n\t }\n\t\n\t if (writeAttr !== false) {\n\t if (value === null || isUndefined(value)) {\n\t this.$$element.removeAttr(attrName);\n\t } else {\n\t this.$$element.attr(attrName, value);\n\t }\n\t }\n\t\n\t // fire observers\n\t var $$observers = this.$$observers;\n\t $$observers && forEach($$observers[observer], function(fn) {\n\t try {\n\t fn(value);\n\t } catch (e) {\n\t $exceptionHandler(e);\n\t }\n\t });\n\t },\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $compile.directive.Attributes#$observe\n\t * @kind function\n\t *\n\t * @description\n\t * Observes an interpolated attribute.\n\t *\n\t * The observer function will be invoked once during the next `$digest` following\n\t * compilation. The observer is then invoked whenever the interpolated value\n\t * changes.\n\t *\n\t * @param {string} key Normalized key. (ie ngAttribute) .\n\t * @param {function(interpolatedValue)} fn Function that will be called whenever\n\t the interpolated value of the attribute changes.\n\t * See the {@link guide/interpolation#how-text-and-attribute-bindings-work Interpolation\n\t * guide} for more info.\n\t * @returns {function()} Returns a deregistration function for this observer.\n\t */\n\t $observe: function(key, fn) {\n\t var attrs = this,\n\t $$observers = (attrs.$$observers || (attrs.$$observers = createMap())),\n\t listeners = ($$observers[key] || ($$observers[key] = []));\n\t\n\t listeners.push(fn);\n\t $rootScope.$evalAsync(function() {\n\t if (!listeners.$$inter && attrs.hasOwnProperty(key) && !isUndefined(attrs[key])) {\n\t // no one registered attribute interpolation function, so lets call it manually\n\t fn(attrs[key]);\n\t }\n\t });\n\t\n\t return function() {\n\t arrayRemove(listeners, fn);\n\t };\n\t }\n\t };\n\t\n\t\n\t function safeAddClass($element, className) {\n\t try {\n\t $element.addClass(className);\n\t } catch (e) {\n\t // ignore, since it means that we are trying to set class on\n\t // SVG element, where class name is read-only.\n\t }\n\t }\n\t\n\t\n\t var startSymbol = $interpolate.startSymbol(),\n\t endSymbol = $interpolate.endSymbol(),\n\t denormalizeTemplate = (startSymbol == '{{' && endSymbol == '}}')\n\t ? identity\n\t : function denormalizeTemplate(template) {\n\t return template.replace(/\\{\\{/g, startSymbol).replace(/}}/g, endSymbol);\n\t },\n\t NG_ATTR_BINDING = /^ngAttr[A-Z]/;\n\t var MULTI_ELEMENT_DIR_RE = /^(.+)Start$/;\n\t\n\t compile.$$addBindingInfo = debugInfoEnabled ? function $$addBindingInfo($element, binding) {\n\t var bindings = $element.data('$binding') || [];\n\t\n\t if (isArray(binding)) {\n\t bindings = bindings.concat(binding);\n\t } else {\n\t bindings.push(binding);\n\t }\n\t\n\t $element.data('$binding', bindings);\n\t } : noop;\n\t\n\t compile.$$addBindingClass = debugInfoEnabled ? function $$addBindingClass($element) {\n\t safeAddClass($element, 'ng-binding');\n\t } : noop;\n\t\n\t compile.$$addScopeInfo = debugInfoEnabled ? function $$addScopeInfo($element, scope, isolated, noTemplate) {\n\t var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope';\n\t $element.data(dataName, scope);\n\t } : noop;\n\t\n\t compile.$$addScopeClass = debugInfoEnabled ? function $$addScopeClass($element, isolated) {\n\t safeAddClass($element, isolated ? 'ng-isolate-scope' : 'ng-scope');\n\t } : noop;\n\t\n\t return compile;\n\t\n\t //================================\n\t\n\t function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective,\n\t previousCompileContext) {\n\t if (!($compileNodes instanceof jqLite)) {\n\t // jquery always rewraps, whereas we need to preserve the original selector so that we can\n\t // modify it.\n\t $compileNodes = jqLite($compileNodes);\n\t }\n\t\n\t var NOT_EMPTY = /\\S+/;\n\t\n\t // We can not compile top level text elements since text nodes can be merged and we will\n\t // not be able to attach scope data to them, so we will wrap them in <span>\n\t for (var i = 0, len = $compileNodes.length; i < len; i++) {\n\t var domNode = $compileNodes[i];\n\t\n\t if (domNode.nodeType === NODE_TYPE_TEXT && domNode.nodeValue.match(NOT_EMPTY) /* non-empty */) {\n\t jqLiteWrapNode(domNode, $compileNodes[i] = document.createElement('span'));\n\t }\n\t }\n\t\n\t var compositeLinkFn =\n\t compileNodes($compileNodes, transcludeFn, $compileNodes,\n\t maxPriority, ignoreDirective, previousCompileContext);\n\t compile.$$addScopeClass($compileNodes);\n\t var namespace = null;\n\t return function publicLinkFn(scope, cloneConnectFn, options) {\n\t assertArg(scope, 'scope');\n\t\n\t if (previousCompileContext && previousCompileContext.needsNewScope) {\n\t // A parent directive did a replace and a directive on this element asked\n\t // for transclusion, which caused us to lose a layer of element on which\n\t // we could hold the new transclusion scope, so we will create it manually\n\t // here.\n\t scope = scope.$parent.$new();\n\t }\n\t\n\t options = options || {};\n\t var parentBoundTranscludeFn = options.parentBoundTranscludeFn,\n\t transcludeControllers = options.transcludeControllers,\n\t futureParentElement = options.futureParentElement;\n\t\n\t // When `parentBoundTranscludeFn` is passed, it is a\n\t // `controllersBoundTransclude` function (it was previously passed\n\t // as `transclude` to directive.link) so we must unwrap it to get\n\t // its `boundTranscludeFn`\n\t if (parentBoundTranscludeFn && parentBoundTranscludeFn.$$boundTransclude) {\n\t parentBoundTranscludeFn = parentBoundTranscludeFn.$$boundTransclude;\n\t }\n\t\n\t if (!namespace) {\n\t namespace = detectNamespaceForChildElements(futureParentElement);\n\t }\n\t var $linkNode;\n\t if (namespace !== 'html') {\n\t // When using a directive with replace:true and templateUrl the $compileNodes\n\t // (or a child element inside of them)\n\t // might change, so we need to recreate the namespace adapted compileNodes\n\t // for call to the link function.\n\t // Note: This will already clone the nodes...\n\t $linkNode = jqLite(\n\t wrapTemplate(namespace, jqLite('<div>').append($compileNodes).html())\n\t );\n\t } else if (cloneConnectFn) {\n\t // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart\n\t // and sometimes changes the structure of the DOM.\n\t $linkNode = JQLitePrototype.clone.call($compileNodes);\n\t } else {\n\t $linkNode = $compileNodes;\n\t }\n\t\n\t if (transcludeControllers) {\n\t for (var controllerName in transcludeControllers) {\n\t $linkNode.data('$' + controllerName + 'Controller', transcludeControllers[controllerName].instance);\n\t }\n\t }\n\t\n\t compile.$$addScopeInfo($linkNode, scope);\n\t\n\t if (cloneConnectFn) cloneConnectFn($linkNode, scope);\n\t if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn);\n\t return $linkNode;\n\t };\n\t }\n\t\n\t function detectNamespaceForChildElements(parentElement) {\n\t // TODO: Make this detect MathML as well...\n\t var node = parentElement && parentElement[0];\n\t if (!node) {\n\t return 'html';\n\t } else {\n\t return nodeName_(node) !== 'foreignobject' && node.toString().match(/SVG/) ? 'svg' : 'html';\n\t }\n\t }\n\t\n\t /**\n\t * Compile function matches each node in nodeList against the directives. Once all directives\n\t * for a particular node are collected their compile functions are executed. The compile\n\t * functions return values - the linking functions - are combined into a composite linking\n\t * function, which is the a linking function for the node.\n\t *\n\t * @param {NodeList} nodeList an array of nodes or NodeList to compile\n\t * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n\t * scope argument is auto-generated to the new child of the transcluded parent scope.\n\t * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then\n\t * the rootElement must be set the jqLite collection of the compile root. This is\n\t * needed so that the jqLite collection items can be replaced with widgets.\n\t * @param {number=} maxPriority Max directive priority.\n\t * @returns {Function} A composite linking function of all of the matched directives or null.\n\t */\n\t function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,\n\t previousCompileContext) {\n\t var linkFns = [],\n\t attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound, nodeLinkFnFound;\n\t\n\t for (var i = 0; i < nodeList.length; i++) {\n\t attrs = new Attributes();\n\t\n\t // we must always refer to nodeList[i] since the nodes can be replaced underneath us.\n\t directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined,\n\t ignoreDirective);\n\t\n\t nodeLinkFn = (directives.length)\n\t ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement,\n\t null, [], [], previousCompileContext)\n\t : null;\n\t\n\t if (nodeLinkFn && nodeLinkFn.scope) {\n\t compile.$$addScopeClass(attrs.$$element);\n\t }\n\t\n\t childLinkFn = (nodeLinkFn && nodeLinkFn.terminal ||\n\t !(childNodes = nodeList[i].childNodes) ||\n\t !childNodes.length)\n\t ? null\n\t : compileNodes(childNodes,\n\t nodeLinkFn ? (\n\t (nodeLinkFn.transcludeOnThisElement || !nodeLinkFn.templateOnThisElement)\n\t && nodeLinkFn.transclude) : transcludeFn);\n\t\n\t if (nodeLinkFn || childLinkFn) {\n\t linkFns.push(i, nodeLinkFn, childLinkFn);\n\t linkFnFound = true;\n\t nodeLinkFnFound = nodeLinkFnFound || nodeLinkFn;\n\t }\n\t\n\t //use the previous context only for the first element in the virtual group\n\t previousCompileContext = null;\n\t }\n\t\n\t // return a linking function if we have found anything, null otherwise\n\t return linkFnFound ? compositeLinkFn : null;\n\t\n\t function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) {\n\t var nodeLinkFn, childLinkFn, node, childScope, i, ii, idx, childBoundTranscludeFn;\n\t var stableNodeList;\n\t\n\t\n\t if (nodeLinkFnFound) {\n\t // copy nodeList so that if a nodeLinkFn removes or adds an element at this DOM level our\n\t // offsets don't get screwed up\n\t var nodeListLength = nodeList.length;\n\t stableNodeList = new Array(nodeListLength);\n\t\n\t // create a sparse array by only copying the elements which have a linkFn\n\t for (i = 0; i < linkFns.length; i+=3) {\n\t idx = linkFns[i];\n\t stableNodeList[idx] = nodeList[idx];\n\t }\n\t } else {\n\t stableNodeList = nodeList;\n\t }\n\t\n\t for (i = 0, ii = linkFns.length; i < ii;) {\n\t node = stableNodeList[linkFns[i++]];\n\t nodeLinkFn = linkFns[i++];\n\t childLinkFn = linkFns[i++];\n\t\n\t if (nodeLinkFn) {\n\t if (nodeLinkFn.scope) {\n\t childScope = scope.$new();\n\t compile.$$addScopeInfo(jqLite(node), childScope);\n\t } else {\n\t childScope = scope;\n\t }\n\t\n\t if (nodeLinkFn.transcludeOnThisElement) {\n\t childBoundTranscludeFn = createBoundTranscludeFn(\n\t scope, nodeLinkFn.transclude, parentBoundTranscludeFn);\n\t\n\t } else if (!nodeLinkFn.templateOnThisElement && parentBoundTranscludeFn) {\n\t childBoundTranscludeFn = parentBoundTranscludeFn;\n\t\n\t } else if (!parentBoundTranscludeFn && transcludeFn) {\n\t childBoundTranscludeFn = createBoundTranscludeFn(scope, transcludeFn);\n\t\n\t } else {\n\t childBoundTranscludeFn = null;\n\t }\n\t\n\t nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn);\n\t\n\t } else if (childLinkFn) {\n\t childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn);\n\t }\n\t }\n\t }\n\t }\n\t\n\t function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {\n\t\n\t var boundTranscludeFn = function(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) {\n\t\n\t if (!transcludedScope) {\n\t transcludedScope = scope.$new(false, containingScope);\n\t transcludedScope.$$transcluded = true;\n\t }\n\t\n\t return transcludeFn(transcludedScope, cloneFn, {\n\t parentBoundTranscludeFn: previousBoundTranscludeFn,\n\t transcludeControllers: controllers,\n\t futureParentElement: futureParentElement\n\t });\n\t };\n\t\n\t return boundTranscludeFn;\n\t }\n\t\n\t /**\n\t * Looks for directives on the given node and adds them to the directive collection which is\n\t * sorted.\n\t *\n\t * @param node Node to search.\n\t * @param directives An array to which the directives are added to. This array is sorted before\n\t * the function returns.\n\t * @param attrs The shared attrs object which is used to populate the normalized attributes.\n\t * @param {number=} maxPriority Max directive priority.\n\t */\n\t function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) {\n\t var nodeType = node.nodeType,\n\t attrsMap = attrs.$attr,\n\t match,\n\t nodeName,\n\t className;\n\t\n\t switch (nodeType) {\n\t case NODE_TYPE_ELEMENT: /* Element */\n\t\n\t nodeName = nodeName_(node);\n\t\n\t // use the node name: <directive>\n\t addDirective(directives,\n\t directiveNormalize(nodeName), 'E', maxPriority, ignoreDirective);\n\t\n\t // iterate over the attributes\n\t for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes,\n\t j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) {\n\t var attrStartName = false;\n\t var attrEndName = false;\n\t\n\t attr = nAttrs[j];\n\t name = attr.name;\n\t value = trim(attr.value);\n\t\n\t // support ngAttr attribute binding\n\t ngAttrName = directiveNormalize(name);\n\t if (isNgAttr = NG_ATTR_BINDING.test(ngAttrName)) {\n\t name = name.replace(PREFIX_REGEXP, '')\n\t .substr(8).replace(/_(.)/g, function(match, letter) {\n\t return letter.toUpperCase();\n\t });\n\t }\n\t\n\t var multiElementMatch = ngAttrName.match(MULTI_ELEMENT_DIR_RE);\n\t if (multiElementMatch && directiveIsMultiElement(multiElementMatch[1])) {\n\t attrStartName = name;\n\t attrEndName = name.substr(0, name.length - 5) + 'end';\n\t name = name.substr(0, name.length - 6);\n\t }\n\t\n\t nName = directiveNormalize(name.toLowerCase());\n\t attrsMap[nName] = name;\n\t if (isNgAttr || !attrs.hasOwnProperty(nName)) {\n\t attrs[nName] = value;\n\t if (getBooleanAttrName(node, nName)) {\n\t attrs[nName] = true; // presence means true\n\t }\n\t }\n\t addAttrInterpolateDirective(node, directives, value, nName, isNgAttr);\n\t addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,\n\t attrEndName);\n\t }\n\t\n\t if (nodeName === 'input' && node.getAttribute('type') === 'hidden') {\n\t // Hidden input elements can have strange behaviour when navigating back to the page\n\t // This tells the browser not to try to cache and reinstate previous values\n\t node.setAttribute('autocomplete', 'off');\n\t }\n\t\n\t // use class as directive\n\t className = node.className;\n\t if (isObject(className)) {\n\t // Maybe SVGAnimatedString\n\t className = className.animVal;\n\t }\n\t if (isString(className) && className !== '') {\n\t while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {\n\t nName = directiveNormalize(match[2]);\n\t if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) {\n\t attrs[nName] = trim(match[3]);\n\t }\n\t className = className.substr(match.index + match[0].length);\n\t }\n\t }\n\t break;\n\t case NODE_TYPE_TEXT: /* Text Node */\n\t if (msie === 11) {\n\t // Workaround for #11781\n\t while (node.parentNode && node.nextSibling && node.nextSibling.nodeType === NODE_TYPE_TEXT) {\n\t node.nodeValue = node.nodeValue + node.nextSibling.nodeValue;\n\t node.parentNode.removeChild(node.nextSibling);\n\t }\n\t }\n\t addTextInterpolateDirective(directives, node.nodeValue);\n\t break;\n\t case NODE_TYPE_COMMENT: /* Comment */\n\t try {\n\t match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);\n\t if (match) {\n\t nName = directiveNormalize(match[1]);\n\t if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {\n\t attrs[nName] = trim(match[2]);\n\t }\n\t }\n\t } catch (e) {\n\t // turns out that under some circumstances IE9 throws errors when one attempts to read\n\t // comment's node value.\n\t // Just ignore it and continue. (Can't seem to reproduce in test case.)\n\t }\n\t break;\n\t }\n\t\n\t directives.sort(byPriority);\n\t return directives;\n\t }\n\t\n\t /**\n\t * Given a node with an directive-start it collects all of the siblings until it finds\n\t * directive-end.\n\t * @param node\n\t * @param attrStart\n\t * @param attrEnd\n\t * @returns {*}\n\t */\n\t function groupScan(node, attrStart, attrEnd) {\n\t var nodes = [];\n\t var depth = 0;\n\t if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {\n\t do {\n\t if (!node) {\n\t throw $compileMinErr('uterdir',\n\t \"Unterminated attribute, found '{0}' but no matching '{1}' found.\",\n\t attrStart, attrEnd);\n\t }\n\t if (node.nodeType == NODE_TYPE_ELEMENT) {\n\t if (node.hasAttribute(attrStart)) depth++;\n\t if (node.hasAttribute(attrEnd)) depth--;\n\t }\n\t nodes.push(node);\n\t node = node.nextSibling;\n\t } while (depth > 0);\n\t } else {\n\t nodes.push(node);\n\t }\n\t\n\t return jqLite(nodes);\n\t }\n\t\n\t /**\n\t * Wrapper for linking function which converts normal linking function into a grouped\n\t * linking function.\n\t * @param linkFn\n\t * @param attrStart\n\t * @param attrEnd\n\t * @returns {Function}\n\t */\n\t function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) {\n\t return function(scope, element, attrs, controllers, transcludeFn) {\n\t element = groupScan(element[0], attrStart, attrEnd);\n\t return linkFn(scope, element, attrs, controllers, transcludeFn);\n\t };\n\t }\n\t\n\t /**\n\t * Once the directives have been collected, their compile functions are executed. This method\n\t * is responsible for inlining directive templates as well as terminating the application\n\t * of the directives if the terminal directive has been reached.\n\t *\n\t * @param {Array} directives Array of collected directives to execute their compile function.\n\t * this needs to be pre-sorted by priority order.\n\t * @param {Node} compileNode The raw DOM node to apply the compile functions to\n\t * @param {Object} templateAttrs The shared attribute function\n\t * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n\t * scope argument is auto-generated to the new\n\t * child of the transcluded parent scope.\n\t * @param {JQLite} jqCollection If we are working on the root of the compile tree then this\n\t * argument has the root jqLite array so that we can replace nodes\n\t * on it.\n\t * @param {Object=} originalReplaceDirective An optional directive that will be ignored when\n\t * compiling the transclusion.\n\t * @param {Array.<Function>} preLinkFns\n\t * @param {Array.<Function>} postLinkFns\n\t * @param {Object} previousCompileContext Context used for previous compilation of the current\n\t * node\n\t * @returns {Function} linkFn\n\t */\n\t function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn,\n\t jqCollection, originalReplaceDirective, preLinkFns, postLinkFns,\n\t previousCompileContext) {\n\t previousCompileContext = previousCompileContext || {};\n\t\n\t var terminalPriority = -Number.MAX_VALUE,\n\t newScopeDirective = previousCompileContext.newScopeDirective,\n\t controllerDirectives = previousCompileContext.controllerDirectives,\n\t newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective,\n\t templateDirective = previousCompileContext.templateDirective,\n\t nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective,\n\t hasTranscludeDirective = false,\n\t hasTemplate = false,\n\t hasElementTranscludeDirective = previousCompileContext.hasElementTranscludeDirective,\n\t $compileNode = templateAttrs.$$element = jqLite(compileNode),\n\t directive,\n\t directiveName,\n\t $template,\n\t replaceDirective = originalReplaceDirective,\n\t childTranscludeFn = transcludeFn,\n\t linkFn,\n\t directiveValue;\n\t\n\t // executes all directives on the current element\n\t for (var i = 0, ii = directives.length; i < ii; i++) {\n\t directive = directives[i];\n\t var attrStart = directive.$$start;\n\t var attrEnd = directive.$$end;\n\t\n\t // collect multiblock sections\n\t if (attrStart) {\n\t $compileNode = groupScan(compileNode, attrStart, attrEnd);\n\t }\n\t $template = undefined;\n\t\n\t if (terminalPriority > directive.priority) {\n\t break; // prevent further processing of directives\n\t }\n\t\n\t if (directiveValue = directive.scope) {\n\t\n\t // skip the check for directives with async templates, we'll check the derived sync\n\t // directive when the template arrives\n\t if (!directive.templateUrl) {\n\t if (isObject(directiveValue)) {\n\t // This directive is trying to add an isolated scope.\n\t // Check that there is no scope of any kind already\n\t assertNoDuplicate('new/isolated scope', newIsolateScopeDirective || newScopeDirective,\n\t directive, $compileNode);\n\t newIsolateScopeDirective = directive;\n\t } else {\n\t // This directive is trying to add a child scope.\n\t // Check that there is no isolated scope already\n\t assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive,\n\t $compileNode);\n\t }\n\t }\n\t\n\t newScopeDirective = newScopeDirective || directive;\n\t }\n\t\n\t directiveName = directive.name;\n\t\n\t if (!directive.templateUrl && directive.controller) {\n\t directiveValue = directive.controller;\n\t controllerDirectives = controllerDirectives || createMap();\n\t assertNoDuplicate(\"'\" + directiveName + \"' controller\",\n\t controllerDirectives[directiveName], directive, $compileNode);\n\t controllerDirectives[directiveName] = directive;\n\t }\n\t\n\t if (directiveValue = directive.transclude) {\n\t hasTranscludeDirective = true;\n\t\n\t // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion.\n\t // This option should only be used by directives that know how to safely handle element transclusion,\n\t // where the transcluded nodes are added or replaced after linking.\n\t if (!directive.$$tlb) {\n\t assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode);\n\t nonTlbTranscludeDirective = directive;\n\t }\n\t\n\t if (directiveValue == 'element') {\n\t hasElementTranscludeDirective = true;\n\t terminalPriority = directive.priority;\n\t $template = $compileNode;\n\t $compileNode = templateAttrs.$$element =\n\t jqLite(document.createComment(' ' + directiveName + ': ' +\n\t templateAttrs[directiveName] + ' '));\n\t compileNode = $compileNode[0];\n\t replaceWith(jqCollection, sliceArgs($template), compileNode);\n\t\n\t childTranscludeFn = compile($template, transcludeFn, terminalPriority,\n\t replaceDirective && replaceDirective.name, {\n\t // Don't pass in:\n\t // - controllerDirectives - otherwise we'll create duplicates controllers\n\t // - newIsolateScopeDirective or templateDirective - combining templates with\n\t // element transclusion doesn't make sense.\n\t //\n\t // We need only nonTlbTranscludeDirective so that we prevent putting transclusion\n\t // on the same element more than once.\n\t nonTlbTranscludeDirective: nonTlbTranscludeDirective\n\t });\n\t } else {\n\t $template = jqLite(jqLiteClone(compileNode)).contents();\n\t $compileNode.empty(); // clear contents\n\t childTranscludeFn = compile($template, transcludeFn, undefined,\n\t undefined, { needsNewScope: directive.$$isolateScope || directive.$$newScope});\n\t }\n\t }\n\t\n\t if (directive.template) {\n\t hasTemplate = true;\n\t assertNoDuplicate('template', templateDirective, directive, $compileNode);\n\t templateDirective = directive;\n\t\n\t directiveValue = (isFunction(directive.template))\n\t ? directive.template($compileNode, templateAttrs)\n\t : directive.template;\n\t\n\t directiveValue = denormalizeTemplate(directiveValue);\n\t\n\t if (directive.replace) {\n\t replaceDirective = directive;\n\t if (jqLiteIsTextNode(directiveValue)) {\n\t $template = [];\n\t } else {\n\t $template = removeComments(wrapTemplate(directive.templateNamespace, trim(directiveValue)));\n\t }\n\t compileNode = $template[0];\n\t\n\t if ($template.length != 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) {\n\t throw $compileMinErr('tplrt',\n\t \"Template for directive '{0}' must have exactly one root element. {1}\",\n\t directiveName, '');\n\t }\n\t\n\t replaceWith(jqCollection, $compileNode, compileNode);\n\t\n\t var newTemplateAttrs = {$attr: {}};\n\t\n\t // combine directives from the original node and from the template:\n\t // - take the array of directives for this element\n\t // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed)\n\t // - collect directives from the template and sort them by priority\n\t // - combine directives as: processed + template + unprocessed\n\t var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs);\n\t var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1));\n\t\n\t if (newIsolateScopeDirective || newScopeDirective) {\n\t // The original directive caused the current element to be replaced but this element\n\t // also needs to have a new scope, so we need to tell the template directives\n\t // that they would need to get their scope from further up, if they require transclusion\n\t markDirectiveScope(templateDirectives, newIsolateScopeDirective, newScopeDirective);\n\t }\n\t directives = directives.concat(templateDirectives).concat(unprocessedDirectives);\n\t mergeTemplateAttributes(templateAttrs, newTemplateAttrs);\n\t\n\t ii = directives.length;\n\t } else {\n\t $compileNode.html(directiveValue);\n\t }\n\t }\n\t\n\t if (directive.templateUrl) {\n\t hasTemplate = true;\n\t assertNoDuplicate('template', templateDirective, directive, $compileNode);\n\t templateDirective = directive;\n\t\n\t if (directive.replace) {\n\t replaceDirective = directive;\n\t }\n\t\n\t nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode,\n\t templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, {\n\t controllerDirectives: controllerDirectives,\n\t newScopeDirective: (newScopeDirective !== directive) && newScopeDirective,\n\t newIsolateScopeDirective: newIsolateScopeDirective,\n\t templateDirective: templateDirective,\n\t nonTlbTranscludeDirective: nonTlbTranscludeDirective\n\t });\n\t ii = directives.length;\n\t } else if (directive.compile) {\n\t try {\n\t linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn);\n\t if (isFunction(linkFn)) {\n\t addLinkFns(null, linkFn, attrStart, attrEnd);\n\t } else if (linkFn) {\n\t addLinkFns(linkFn.pre, linkFn.post, attrStart, attrEnd);\n\t }\n\t } catch (e) {\n\t $exceptionHandler(e, startingTag($compileNode));\n\t }\n\t }\n\t\n\t if (directive.terminal) {\n\t nodeLinkFn.terminal = true;\n\t terminalPriority = Math.max(terminalPriority, directive.priority);\n\t }\n\t\n\t }\n\t\n\t nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true;\n\t nodeLinkFn.transcludeOnThisElement = hasTranscludeDirective;\n\t nodeLinkFn.templateOnThisElement = hasTemplate;\n\t nodeLinkFn.transclude = childTranscludeFn;\n\t\n\t previousCompileContext.hasElementTranscludeDirective = hasElementTranscludeDirective;\n\t\n\t // might be normal or delayed nodeLinkFn depending on if templateUrl is present\n\t return nodeLinkFn;\n\t\n\t ////////////////////\n\t\n\t function addLinkFns(pre, post, attrStart, attrEnd) {\n\t if (pre) {\n\t if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd);\n\t pre.require = directive.require;\n\t pre.directiveName = directiveName;\n\t if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n\t pre = cloneAndAnnotateFn(pre, {isolateScope: true});\n\t }\n\t preLinkFns.push(pre);\n\t }\n\t if (post) {\n\t if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd);\n\t post.require = directive.require;\n\t post.directiveName = directiveName;\n\t if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n\t post = cloneAndAnnotateFn(post, {isolateScope: true});\n\t }\n\t postLinkFns.push(post);\n\t }\n\t }\n\t\n\t\n\t function getControllers(directiveName, require, $element, elementControllers) {\n\t var value;\n\t\n\t if (isString(require)) {\n\t var match = require.match(REQUIRE_PREFIX_REGEXP);\n\t var name = require.substring(match[0].length);\n\t var inheritType = match[1] || match[3];\n\t var optional = match[2] === '?';\n\t\n\t //If only parents then start at the parent element\n\t if (inheritType === '^^') {\n\t $element = $element.parent();\n\t //Otherwise attempt getting the controller from elementControllers in case\n\t //the element is transcluded (and has no data) and to avoid .data if possible\n\t } else {\n\t value = elementControllers && elementControllers[name];\n\t value = value && value.instance;\n\t }\n\t\n\t if (!value) {\n\t var dataName = '$' + name + 'Controller';\n\t value = inheritType ? $element.inheritedData(dataName) : $element.data(dataName);\n\t }\n\t\n\t if (!value && !optional) {\n\t throw $compileMinErr('ctreq',\n\t \"Controller '{0}', required by directive '{1}', can't be found!\",\n\t name, directiveName);\n\t }\n\t } else if (isArray(require)) {\n\t value = [];\n\t for (var i = 0, ii = require.length; i < ii; i++) {\n\t value[i] = getControllers(directiveName, require[i], $element, elementControllers);\n\t }\n\t }\n\t\n\t return value || null;\n\t }\n\t\n\t function setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope) {\n\t var elementControllers = createMap();\n\t for (var controllerKey in controllerDirectives) {\n\t var directive = controllerDirectives[controllerKey];\n\t var locals = {\n\t $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope,\n\t $element: $element,\n\t $attrs: attrs,\n\t $transclude: transcludeFn\n\t };\n\t\n\t var controller = directive.controller;\n\t if (controller == '@') {\n\t controller = attrs[directive.name];\n\t }\n\t\n\t var controllerInstance = $controller(controller, locals, true, directive.controllerAs);\n\t\n\t // For directives with element transclusion the element is a comment.\n\t // In this case .data will not attach any data.\n\t // Instead, we save the controllers for the element in a local hash and attach to .data\n\t // later, once we have the actual element.\n\t elementControllers[directive.name] = controllerInstance;\n\t $element.data('$' + directive.name + 'Controller', controllerInstance.instance);\n\t }\n\t return elementControllers;\n\t }\n\t\n\t function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {\n\t var linkFn, isolateScope, controllerScope, elementControllers, transcludeFn, $element,\n\t attrs, removeScopeBindingWatches, removeControllerBindingWatches;\n\t\n\t if (compileNode === linkNode) {\n\t attrs = templateAttrs;\n\t $element = templateAttrs.$$element;\n\t } else {\n\t $element = jqLite(linkNode);\n\t attrs = new Attributes($element, templateAttrs);\n\t }\n\t\n\t controllerScope = scope;\n\t if (newIsolateScopeDirective) {\n\t isolateScope = scope.$new(true);\n\t } else if (newScopeDirective) {\n\t controllerScope = scope.$parent;\n\t }\n\t\n\t if (boundTranscludeFn) {\n\t // track `boundTranscludeFn` so it can be unwrapped if `transcludeFn`\n\t // is later passed as `parentBoundTranscludeFn` to `publicLinkFn`\n\t transcludeFn = controllersBoundTransclude;\n\t transcludeFn.$$boundTransclude = boundTranscludeFn;\n\t }\n\t\n\t if (controllerDirectives) {\n\t elementControllers = setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope);\n\t }\n\t\n\t if (newIsolateScopeDirective) {\n\t // Initialize isolate scope bindings for new isolate scope directive.\n\t compile.$$addScopeInfo($element, isolateScope, true, !(templateDirective && (templateDirective === newIsolateScopeDirective ||\n\t templateDirective === newIsolateScopeDirective.$$originalDirective)));\n\t compile.$$addScopeClass($element, true);\n\t isolateScope.$$isolateBindings =\n\t newIsolateScopeDirective.$$isolateBindings;\n\t removeScopeBindingWatches = initializeDirectiveBindings(scope, attrs, isolateScope,\n\t isolateScope.$$isolateBindings,\n\t newIsolateScopeDirective);\n\t if (removeScopeBindingWatches) {\n\t isolateScope.$on('$destroy', removeScopeBindingWatches);\n\t }\n\t }\n\t\n\t // Initialize bindToController bindings\n\t for (var name in elementControllers) {\n\t var controllerDirective = controllerDirectives[name];\n\t var controller = elementControllers[name];\n\t var bindings = controllerDirective.$$bindings.bindToController;\n\t\n\t if (controller.identifier && bindings) {\n\t removeControllerBindingWatches =\n\t initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective);\n\t }\n\t\n\t var controllerResult = controller();\n\t if (controllerResult !== controller.instance) {\n\t // If the controller constructor has a return value, overwrite the instance\n\t // from setupControllers\n\t controller.instance = controllerResult;\n\t $element.data('$' + controllerDirective.name + 'Controller', controllerResult);\n\t removeControllerBindingWatches && removeControllerBindingWatches();\n\t removeControllerBindingWatches =\n\t initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective);\n\t }\n\t }\n\t\n\t // PRELINKING\n\t for (i = 0, ii = preLinkFns.length; i < ii; i++) {\n\t linkFn = preLinkFns[i];\n\t invokeLinkFn(linkFn,\n\t linkFn.isolateScope ? isolateScope : scope,\n\t $element,\n\t attrs,\n\t linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),\n\t transcludeFn\n\t );\n\t }\n\t\n\t // RECURSION\n\t // We only pass the isolate scope, if the isolate directive has a template,\n\t // otherwise the child elements do not belong to the isolate directive.\n\t var scopeToChild = scope;\n\t if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) {\n\t scopeToChild = isolateScope;\n\t }\n\t childLinkFn && childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn);\n\t\n\t // POSTLINKING\n\t for (i = postLinkFns.length - 1; i >= 0; i--) {\n\t linkFn = postLinkFns[i];\n\t invokeLinkFn(linkFn,\n\t linkFn.isolateScope ? isolateScope : scope,\n\t $element,\n\t attrs,\n\t linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),\n\t transcludeFn\n\t );\n\t }\n\t\n\t // This is the function that is injected as `$transclude`.\n\t // Note: all arguments are optional!\n\t function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement) {\n\t var transcludeControllers;\n\t\n\t // No scope passed in:\n\t if (!isScope(scope)) {\n\t futureParentElement = cloneAttachFn;\n\t cloneAttachFn = scope;\n\t scope = undefined;\n\t }\n\t\n\t if (hasElementTranscludeDirective) {\n\t transcludeControllers = elementControllers;\n\t }\n\t if (!futureParentElement) {\n\t futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element;\n\t }\n\t return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild);\n\t }\n\t }\n\t }\n\t\n\t // Depending upon the context in which a directive finds itself it might need to have a new isolated\n\t // or child scope created. For instance:\n\t // * if the directive has been pulled into a template because another directive with a higher priority\n\t // asked for element transclusion\n\t // * if the directive itself asks for transclusion but it is at the root of a template and the original\n\t // element was replaced. See https://github.com/angular/angular.js/issues/12936\n\t function markDirectiveScope(directives, isolateScope, newScope) {\n\t for (var j = 0, jj = directives.length; j < jj; j++) {\n\t directives[j] = inherit(directives[j], {$$isolateScope: isolateScope, $$newScope: newScope});\n\t }\n\t }\n\t\n\t /**\n\t * looks up the directive and decorates it with exception handling and proper parameters. We\n\t * call this the boundDirective.\n\t *\n\t * @param {string} name name of the directive to look up.\n\t * @param {string} location The directive must be found in specific format.\n\t * String containing any of theses characters:\n\t *\n\t * * `E`: element name\n\t * * `A': attribute\n\t * * `C`: class\n\t * * `M`: comment\n\t * @returns {boolean} true if directive was added.\n\t */\n\t function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,\n\t endAttrName) {\n\t if (name === ignoreDirective) return null;\n\t var match = null;\n\t if (hasDirectives.hasOwnProperty(name)) {\n\t for (var directive, directives = $injector.get(name + Suffix),\n\t i = 0, ii = directives.length; i < ii; i++) {\n\t try {\n\t directive = directives[i];\n\t if ((isUndefined(maxPriority) || maxPriority > directive.priority) &&\n\t directive.restrict.indexOf(location) != -1) {\n\t if (startAttrName) {\n\t directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});\n\t }\n\t if (!directive.$$bindings) {\n\t var bindings = directive.$$bindings =\n\t parseDirectiveBindings(directive, directive.name);\n\t if (isObject(bindings.isolateScope)) {\n\t directive.$$isolateBindings = bindings.isolateScope;\n\t }\n\t }\n\t tDirectives.push(directive);\n\t match = directive;\n\t }\n\t } catch (e) { $exceptionHandler(e); }\n\t }\n\t }\n\t return match;\n\t }\n\t\n\t\n\t /**\n\t * looks up the directive and returns true if it is a multi-element directive,\n\t * and therefore requires DOM nodes between -start and -end markers to be grouped\n\t * together.\n\t *\n\t * @param {string} name name of the directive to look up.\n\t * @returns true if directive was registered as multi-element.\n\t */\n\t function directiveIsMultiElement(name) {\n\t if (hasDirectives.hasOwnProperty(name)) {\n\t for (var directive, directives = $injector.get(name + Suffix),\n\t i = 0, ii = directives.length; i < ii; i++) {\n\t directive = directives[i];\n\t if (directive.multiElement) {\n\t return true;\n\t }\n\t }\n\t }\n\t return false;\n\t }\n\t\n\t /**\n\t * When the element is replaced with HTML template then the new attributes\n\t * on the template need to be merged with the existing attributes in the DOM.\n\t * The desired effect is to have both of the attributes present.\n\t *\n\t * @param {object} dst destination attributes (original DOM)\n\t * @param {object} src source attributes (from the directive template)\n\t */\n\t function mergeTemplateAttributes(dst, src) {\n\t var srcAttr = src.$attr,\n\t dstAttr = dst.$attr,\n\t $element = dst.$$element;\n\t\n\t // reapply the old attributes to the new element\n\t forEach(dst, function(value, key) {\n\t if (key.charAt(0) != '$') {\n\t if (src[key] && src[key] !== value) {\n\t value += (key === 'style' ? ';' : ' ') + src[key];\n\t }\n\t dst.$set(key, value, true, srcAttr[key]);\n\t }\n\t });\n\t\n\t // copy the new attributes on the old attrs object\n\t forEach(src, function(value, key) {\n\t if (key == 'class') {\n\t safeAddClass($element, value);\n\t dst['class'] = (dst['class'] ? dst['class'] + ' ' : '') + value;\n\t } else if (key == 'style') {\n\t $element.attr('style', $element.attr('style') + ';' + value);\n\t dst['style'] = (dst['style'] ? dst['style'] + ';' : '') + value;\n\t // `dst` will never contain hasOwnProperty as DOM parser won't let it.\n\t // You will get an \"InvalidCharacterError: DOM Exception 5\" error if you\n\t // have an attribute like \"has-own-property\" or \"data-has-own-property\", etc.\n\t } else if (key.charAt(0) != '$' && !dst.hasOwnProperty(key)) {\n\t dst[key] = value;\n\t dstAttr[key] = srcAttr[key];\n\t }\n\t });\n\t }\n\t\n\t\n\t function compileTemplateUrl(directives, $compileNode, tAttrs,\n\t $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) {\n\t var linkQueue = [],\n\t afterTemplateNodeLinkFn,\n\t afterTemplateChildLinkFn,\n\t beforeTemplateCompileNode = $compileNode[0],\n\t origAsyncDirective = directives.shift(),\n\t derivedSyncDirective = inherit(origAsyncDirective, {\n\t templateUrl: null, transclude: null, replace: null, $$originalDirective: origAsyncDirective\n\t }),\n\t templateUrl = (isFunction(origAsyncDirective.templateUrl))\n\t ? origAsyncDirective.templateUrl($compileNode, tAttrs)\n\t : origAsyncDirective.templateUrl,\n\t templateNamespace = origAsyncDirective.templateNamespace;\n\t\n\t $compileNode.empty();\n\t\n\t $templateRequest(templateUrl)\n\t .then(function(content) {\n\t var compileNode, tempTemplateAttrs, $template, childBoundTranscludeFn;\n\t\n\t content = denormalizeTemplate(content);\n\t\n\t if (origAsyncDirective.replace) {\n\t if (jqLiteIsTextNode(content)) {\n\t $template = [];\n\t } else {\n\t $template = removeComments(wrapTemplate(templateNamespace, trim(content)));\n\t }\n\t compileNode = $template[0];\n\t\n\t if ($template.length != 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) {\n\t throw $compileMinErr('tplrt',\n\t \"Template for directive '{0}' must have exactly one root element. {1}\",\n\t origAsyncDirective.name, templateUrl);\n\t }\n\t\n\t tempTemplateAttrs = {$attr: {}};\n\t replaceWith($rootElement, $compileNode, compileNode);\n\t var templateDirectives = collectDirectives(compileNode, [], tempTemplateAttrs);\n\t\n\t if (isObject(origAsyncDirective.scope)) {\n\t // the original directive that caused the template to be loaded async required\n\t // an isolate scope\n\t markDirectiveScope(templateDirectives, true);\n\t }\n\t directives = templateDirectives.concat(directives);\n\t mergeTemplateAttributes(tAttrs, tempTemplateAttrs);\n\t } else {\n\t compileNode = beforeTemplateCompileNode;\n\t $compileNode.html(content);\n\t }\n\t\n\t directives.unshift(derivedSyncDirective);\n\t\n\t afterTemplateNodeLinkFn = applyDirectivesToNode(directives, compileNode, tAttrs,\n\t childTranscludeFn, $compileNode, origAsyncDirective, preLinkFns, postLinkFns,\n\t previousCompileContext);\n\t forEach($rootElement, function(node, i) {\n\t if (node == compileNode) {\n\t $rootElement[i] = $compileNode[0];\n\t }\n\t });\n\t afterTemplateChildLinkFn = compileNodes($compileNode[0].childNodes, childTranscludeFn);\n\t\n\t while (linkQueue.length) {\n\t var scope = linkQueue.shift(),\n\t beforeTemplateLinkNode = linkQueue.shift(),\n\t linkRootElement = linkQueue.shift(),\n\t boundTranscludeFn = linkQueue.shift(),\n\t linkNode = $compileNode[0];\n\t\n\t if (scope.$$destroyed) continue;\n\t\n\t if (beforeTemplateLinkNode !== beforeTemplateCompileNode) {\n\t var oldClasses = beforeTemplateLinkNode.className;\n\t\n\t if (!(previousCompileContext.hasElementTranscludeDirective &&\n\t origAsyncDirective.replace)) {\n\t // it was cloned therefore we have to clone as well.\n\t linkNode = jqLiteClone(compileNode);\n\t }\n\t replaceWith(linkRootElement, jqLite(beforeTemplateLinkNode), linkNode);\n\t\n\t // Copy in CSS classes from original node\n\t safeAddClass(jqLite(linkNode), oldClasses);\n\t }\n\t if (afterTemplateNodeLinkFn.transcludeOnThisElement) {\n\t childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);\n\t } else {\n\t childBoundTranscludeFn = boundTranscludeFn;\n\t }\n\t afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, linkNode, $rootElement,\n\t childBoundTranscludeFn);\n\t }\n\t linkQueue = null;\n\t });\n\t\n\t return function delayedNodeLinkFn(ignoreChildLinkFn, scope, node, rootElement, boundTranscludeFn) {\n\t var childBoundTranscludeFn = boundTranscludeFn;\n\t if (scope.$$destroyed) return;\n\t if (linkQueue) {\n\t linkQueue.push(scope,\n\t node,\n\t rootElement,\n\t childBoundTranscludeFn);\n\t } else {\n\t if (afterTemplateNodeLinkFn.transcludeOnThisElement) {\n\t childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);\n\t }\n\t afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, childBoundTranscludeFn);\n\t }\n\t };\n\t }\n\t\n\t\n\t /**\n\t * Sorting function for bound directives.\n\t */\n\t function byPriority(a, b) {\n\t var diff = b.priority - a.priority;\n\t if (diff !== 0) return diff;\n\t if (a.name !== b.name) return (a.name < b.name) ? -1 : 1;\n\t return a.index - b.index;\n\t }\n\t\n\t function assertNoDuplicate(what, previousDirective, directive, element) {\n\t\n\t function wrapModuleNameIfDefined(moduleName) {\n\t return moduleName ?\n\t (' (module: ' + moduleName + ')') :\n\t '';\n\t }\n\t\n\t if (previousDirective) {\n\t throw $compileMinErr('multidir', 'Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}',\n\t previousDirective.name, wrapModuleNameIfDefined(previousDirective.$$moduleName),\n\t directive.name, wrapModuleNameIfDefined(directive.$$moduleName), what, startingTag(element));\n\t }\n\t }\n\t\n\t\n\t function addTextInterpolateDirective(directives, text) {\n\t var interpolateFn = $interpolate(text, true);\n\t if (interpolateFn) {\n\t directives.push({\n\t priority: 0,\n\t compile: function textInterpolateCompileFn(templateNode) {\n\t var templateNodeParent = templateNode.parent(),\n\t hasCompileParent = !!templateNodeParent.length;\n\t\n\t // When transcluding a template that has bindings in the root\n\t // we don't have a parent and thus need to add the class during linking fn.\n\t if (hasCompileParent) compile.$$addBindingClass(templateNodeParent);\n\t\n\t return function textInterpolateLinkFn(scope, node) {\n\t var parent = node.parent();\n\t if (!hasCompileParent) compile.$$addBindingClass(parent);\n\t compile.$$addBindingInfo(parent, interpolateFn.expressions);\n\t scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {\n\t node[0].nodeValue = value;\n\t });\n\t };\n\t }\n\t });\n\t }\n\t }\n\t\n\t\n\t function wrapTemplate(type, template) {\n\t type = lowercase(type || 'html');\n\t switch (type) {\n\t case 'svg':\n\t case 'math':\n\t var wrapper = document.createElement('div');\n\t wrapper.innerHTML = '<' + type + '>' + template + '</' + type + '>';\n\t return wrapper.childNodes[0].childNodes;\n\t default:\n\t return template;\n\t }\n\t }\n\t\n\t\n\t function getTrustedContext(node, attrNormalizedName) {\n\t if (attrNormalizedName == \"srcdoc\") {\n\t return $sce.HTML;\n\t }\n\t var tag = nodeName_(node);\n\t // maction[xlink:href] can source SVG. It's not limited to <maction>.\n\t if (attrNormalizedName == \"xlinkHref\" ||\n\t (tag == \"form\" && attrNormalizedName == \"action\") ||\n\t (tag != \"img\" && (attrNormalizedName == \"src\" ||\n\t attrNormalizedName == \"ngSrc\"))) {\n\t return $sce.RESOURCE_URL;\n\t }\n\t }\n\t\n\t\n\t function addAttrInterpolateDirective(node, directives, value, name, allOrNothing) {\n\t var trustedContext = getTrustedContext(node, name);\n\t allOrNothing = ALL_OR_NOTHING_ATTRS[name] || allOrNothing;\n\t\n\t var interpolateFn = $interpolate(value, true, trustedContext, allOrNothing);\n\t\n\t // no interpolation found -> ignore\n\t if (!interpolateFn) return;\n\t\n\t\n\t if (name === \"multiple\" && nodeName_(node) === \"select\") {\n\t throw $compileMinErr(\"selmulti\",\n\t \"Binding to the 'multiple' attribute is not supported. Element: {0}\",\n\t startingTag(node));\n\t }\n\t\n\t directives.push({\n\t priority: 100,\n\t compile: function() {\n\t return {\n\t pre: function attrInterpolatePreLinkFn(scope, element, attr) {\n\t var $$observers = (attr.$$observers || (attr.$$observers = createMap()));\n\t\n\t if (EVENT_HANDLER_ATTR_REGEXP.test(name)) {\n\t throw $compileMinErr('nodomevents',\n\t \"Interpolations for HTML DOM event attributes are disallowed. Please use the \" +\n\t \"ng- versions (such as ng-click instead of onclick) instead.\");\n\t }\n\t\n\t // If the attribute has changed since last $interpolate()ed\n\t var newValue = attr[name];\n\t if (newValue !== value) {\n\t // we need to interpolate again since the attribute value has been updated\n\t // (e.g. by another directive's compile function)\n\t // ensure unset/empty values make interpolateFn falsy\n\t interpolateFn = newValue && $interpolate(newValue, true, trustedContext, allOrNothing);\n\t value = newValue;\n\t }\n\t\n\t // if attribute was updated so that there is no interpolation going on we don't want to\n\t // register any observers\n\t if (!interpolateFn) return;\n\t\n\t // initialize attr object so that it's ready in case we need the value for isolate\n\t // scope initialization, otherwise the value would not be available from isolate\n\t // directive's linking fn during linking phase\n\t attr[name] = interpolateFn(scope);\n\t\n\t ($$observers[name] || ($$observers[name] = [])).$$inter = true;\n\t (attr.$$observers && attr.$$observers[name].$$scope || scope).\n\t $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) {\n\t //special case for class attribute addition + removal\n\t //so that class changes can tap into the animation\n\t //hooks provided by the $animate service. Be sure to\n\t //skip animations when the first digest occurs (when\n\t //both the new and the old values are the same) since\n\t //the CSS classes are the non-interpolated values\n\t if (name === 'class' && newValue != oldValue) {\n\t attr.$updateClass(newValue, oldValue);\n\t } else {\n\t attr.$set(name, newValue);\n\t }\n\t });\n\t }\n\t };\n\t }\n\t });\n\t }\n\t\n\t\n\t /**\n\t * This is a special jqLite.replaceWith, which can replace items which\n\t * have no parents, provided that the containing jqLite collection is provided.\n\t *\n\t * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes\n\t * in the root of the tree.\n\t * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep\n\t * the shell, but replace its DOM node reference.\n\t * @param {Node} newNode The new DOM node.\n\t */\n\t function replaceWith($rootElement, elementsToRemove, newNode) {\n\t var firstElementToRemove = elementsToRemove[0],\n\t removeCount = elementsToRemove.length,\n\t parent = firstElementToRemove.parentNode,\n\t i, ii;\n\t\n\t if ($rootElement) {\n\t for (i = 0, ii = $rootElement.length; i < ii; i++) {\n\t if ($rootElement[i] == firstElementToRemove) {\n\t $rootElement[i++] = newNode;\n\t for (var j = i, j2 = j + removeCount - 1,\n\t jj = $rootElement.length;\n\t j < jj; j++, j2++) {\n\t if (j2 < jj) {\n\t $rootElement[j] = $rootElement[j2];\n\t } else {\n\t delete $rootElement[j];\n\t }\n\t }\n\t $rootElement.length -= removeCount - 1;\n\t\n\t // If the replaced element is also the jQuery .context then replace it\n\t // .context is a deprecated jQuery api, so we should set it only when jQuery set it\n\t // http://api.jquery.com/context/\n\t if ($rootElement.context === firstElementToRemove) {\n\t $rootElement.context = newNode;\n\t }\n\t break;\n\t }\n\t }\n\t }\n\t\n\t if (parent) {\n\t parent.replaceChild(newNode, firstElementToRemove);\n\t }\n\t\n\t // TODO(perf): what's this document fragment for? is it needed? can we at least reuse it?\n\t var fragment = document.createDocumentFragment();\n\t fragment.appendChild(firstElementToRemove);\n\t\n\t if (jqLite.hasData(firstElementToRemove)) {\n\t // Copy over user data (that includes Angular's $scope etc.). Don't copy private\n\t // data here because there's no public interface in jQuery to do that and copying over\n\t // event listeners (which is the main use of private data) wouldn't work anyway.\n\t jqLite.data(newNode, jqLite.data(firstElementToRemove));\n\t\n\t // Remove data of the replaced element. We cannot just call .remove()\n\t // on the element it since that would deallocate scope that is needed\n\t // for the new node. Instead, remove the data \"manually\".\n\t if (!jQuery) {\n\t delete jqLite.cache[firstElementToRemove[jqLite.expando]];\n\t } else {\n\t // jQuery 2.x doesn't expose the data storage. Use jQuery.cleanData to clean up after\n\t // the replaced element. The cleanData version monkey-patched by Angular would cause\n\t // the scope to be trashed and we do need the very same scope to work with the new\n\t // element. However, we cannot just cache the non-patched version and use it here as\n\t // that would break if another library patches the method after Angular does (one\n\t // example is jQuery UI). Instead, set a flag indicating scope destroying should be\n\t // skipped this one time.\n\t skipDestroyOnNextJQueryCleanData = true;\n\t jQuery.cleanData([firstElementToRemove]);\n\t }\n\t }\n\t\n\t for (var k = 1, kk = elementsToRemove.length; k < kk; k++) {\n\t var element = elementsToRemove[k];\n\t jqLite(element).remove(); // must do this way to clean up expando\n\t fragment.appendChild(element);\n\t delete elementsToRemove[k];\n\t }\n\t\n\t elementsToRemove[0] = newNode;\n\t elementsToRemove.length = 1;\n\t }\n\t\n\t\n\t function cloneAndAnnotateFn(fn, annotation) {\n\t return extend(function() { return fn.apply(null, arguments); }, fn, annotation);\n\t }\n\t\n\t\n\t function invokeLinkFn(linkFn, scope, $element, attrs, controllers, transcludeFn) {\n\t try {\n\t linkFn(scope, $element, attrs, controllers, transcludeFn);\n\t } catch (e) {\n\t $exceptionHandler(e, startingTag($element));\n\t }\n\t }\n\t\n\t\n\t // Set up $watches for isolate scope and controller bindings. This process\n\t // only occurs for isolate scopes and new scopes with controllerAs.\n\t function initializeDirectiveBindings(scope, attrs, destination, bindings, directive) {\n\t var removeWatchCollection = [];\n\t forEach(bindings, function(definition, scopeName) {\n\t var attrName = definition.attrName,\n\t optional = definition.optional,\n\t mode = definition.mode, // @, =, or &\n\t lastValue,\n\t parentGet, parentSet, compare;\n\t\n\t switch (mode) {\n\t\n\t case '@':\n\t if (!optional && !hasOwnProperty.call(attrs, attrName)) {\n\t destination[scopeName] = attrs[attrName] = void 0;\n\t }\n\t attrs.$observe(attrName, function(value) {\n\t if (isString(value)) {\n\t destination[scopeName] = value;\n\t }\n\t });\n\t attrs.$$observers[attrName].$$scope = scope;\n\t lastValue = attrs[attrName];\n\t if (isString(lastValue)) {\n\t // If the attribute has been provided then we trigger an interpolation to ensure\n\t // the value is there for use in the link fn\n\t destination[scopeName] = $interpolate(lastValue)(scope);\n\t } else if (isBoolean(lastValue)) {\n\t // If the attributes is one of the BOOLEAN_ATTR then Angular will have converted\n\t // the value to boolean rather than a string, so we special case this situation\n\t destination[scopeName] = lastValue;\n\t }\n\t break;\n\t\n\t case '=':\n\t if (!hasOwnProperty.call(attrs, attrName)) {\n\t if (optional) break;\n\t attrs[attrName] = void 0;\n\t }\n\t if (optional && !attrs[attrName]) break;\n\t\n\t parentGet = $parse(attrs[attrName]);\n\t if (parentGet.literal) {\n\t compare = equals;\n\t } else {\n\t compare = function(a, b) { return a === b || (a !== a && b !== b); };\n\t }\n\t parentSet = parentGet.assign || function() {\n\t // reset the change, or we will throw this exception on every $digest\n\t lastValue = destination[scopeName] = parentGet(scope);\n\t throw $compileMinErr('nonassign',\n\t \"Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!\",\n\t attrs[attrName], attrName, directive.name);\n\t };\n\t lastValue = destination[scopeName] = parentGet(scope);\n\t var parentValueWatch = function parentValueWatch(parentValue) {\n\t if (!compare(parentValue, destination[scopeName])) {\n\t // we are out of sync and need to copy\n\t if (!compare(parentValue, lastValue)) {\n\t // parent changed and it has precedence\n\t destination[scopeName] = parentValue;\n\t } else {\n\t // if the parent can be assigned then do so\n\t parentSet(scope, parentValue = destination[scopeName]);\n\t }\n\t }\n\t return lastValue = parentValue;\n\t };\n\t parentValueWatch.$stateful = true;\n\t var removeWatch;\n\t if (definition.collection) {\n\t removeWatch = scope.$watchCollection(attrs[attrName], parentValueWatch);\n\t } else {\n\t removeWatch = scope.$watch($parse(attrs[attrName], parentValueWatch), null, parentGet.literal);\n\t }\n\t removeWatchCollection.push(removeWatch);\n\t break;\n\t\n\t case '&':\n\t // Don't assign Object.prototype method to scope\n\t parentGet = attrs.hasOwnProperty(attrName) ? $parse(attrs[attrName]) : noop;\n\t\n\t // Don't assign noop to destination if expression is not valid\n\t if (parentGet === noop && optional) break;\n\t\n\t destination[scopeName] = function(locals) {\n\t return parentGet(scope, locals);\n\t };\n\t break;\n\t }\n\t });\n\t\n\t return removeWatchCollection.length && function removeWatches() {\n\t for (var i = 0, ii = removeWatchCollection.length; i < ii; ++i) {\n\t removeWatchCollection[i]();\n\t }\n\t };\n\t }\n\t }];\n\t}\n\t\n\tvar PREFIX_REGEXP = /^((?:x|data)[\\:\\-_])/i;\n\t/**\n\t * Converts all accepted directives format into proper directive name.\n\t * @param name Name to normalize\n\t */\n\tfunction directiveNormalize(name) {\n\t return camelCase(name.replace(PREFIX_REGEXP, ''));\n\t}\n\t\n\t/**\n\t * @ngdoc type\n\t * @name $compile.directive.Attributes\n\t *\n\t * @description\n\t * A shared object between directive compile / linking functions which contains normalized DOM\n\t * element attributes. The values reflect current binding state `{{ }}`. The normalization is\n\t * needed since all of these are treated as equivalent in Angular:\n\t *\n\t * ```\n\t * <span ng:bind=\"a\" ng-bind=\"a\" data-ng-bind=\"a\" x-ng-bind=\"a\">\n\t * ```\n\t */\n\t\n\t/**\n\t * @ngdoc property\n\t * @name $compile.directive.Attributes#$attr\n\t *\n\t * @description\n\t * A map of DOM element attribute names to the normalized name. This is\n\t * needed to do reverse lookup from normalized name back to actual name.\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc method\n\t * @name $compile.directive.Attributes#$set\n\t * @kind function\n\t *\n\t * @description\n\t * Set DOM element attribute value.\n\t *\n\t *\n\t * @param {string} name Normalized element attribute name of the property to modify. The name is\n\t * reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr}\n\t * property to the original name.\n\t * @param {string} value Value to set the attribute to. The value can be an interpolated string.\n\t */\n\t\n\t\n\t\n\t/**\n\t * Closure compiler type information\n\t */\n\t\n\tfunction nodesetLinkingFn(\n\t /* angular.Scope */ scope,\n\t /* NodeList */ nodeList,\n\t /* Element */ rootElement,\n\t /* function(Function) */ boundTranscludeFn\n\t) {}\n\t\n\tfunction directiveLinkingFn(\n\t /* nodesetLinkingFn */ nodesetLinkingFn,\n\t /* angular.Scope */ scope,\n\t /* Node */ node,\n\t /* Element */ rootElement,\n\t /* function(Function) */ boundTranscludeFn\n\t) {}\n\t\n\tfunction tokenDifference(str1, str2) {\n\t var values = '',\n\t tokens1 = str1.split(/\\s+/),\n\t tokens2 = str2.split(/\\s+/);\n\t\n\t outer:\n\t for (var i = 0; i < tokens1.length; i++) {\n\t var token = tokens1[i];\n\t for (var j = 0; j < tokens2.length; j++) {\n\t if (token == tokens2[j]) continue outer;\n\t }\n\t values += (values.length > 0 ? ' ' : '') + token;\n\t }\n\t return values;\n\t}\n\t\n\tfunction removeComments(jqNodes) {\n\t jqNodes = jqLite(jqNodes);\n\t var i = jqNodes.length;\n\t\n\t if (i <= 1) {\n\t return jqNodes;\n\t }\n\t\n\t while (i--) {\n\t var node = jqNodes[i];\n\t if (node.nodeType === NODE_TYPE_COMMENT) {\n\t splice.call(jqNodes, i, 1);\n\t }\n\t }\n\t return jqNodes;\n\t}\n\t\n\tvar $controllerMinErr = minErr('$controller');\n\t\n\t\n\tvar CNTRL_REG = /^(\\S+)(\\s+as\\s+([\\w$]+))?$/;\n\tfunction identifierForController(controller, ident) {\n\t if (ident && isString(ident)) return ident;\n\t if (isString(controller)) {\n\t var match = CNTRL_REG.exec(controller);\n\t if (match) return match[3];\n\t }\n\t}\n\t\n\t\n\t/**\n\t * @ngdoc provider\n\t * @name $controllerProvider\n\t * @description\n\t * The {@link ng.$controller $controller service} is used by Angular to create new\n\t * controllers.\n\t *\n\t * This provider allows controller registration via the\n\t * {@link ng.$controllerProvider#register register} method.\n\t */\n\tfunction $ControllerProvider() {\n\t var controllers = {},\n\t globals = false;\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $controllerProvider#register\n\t * @param {string|Object} name Controller name, or an object map of controllers where the keys are\n\t * the names and the values are the constructors.\n\t * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI\n\t * annotations in the array notation).\n\t */\n\t this.register = function(name, constructor) {\n\t assertNotHasOwnProperty(name, 'controller');\n\t if (isObject(name)) {\n\t extend(controllers, name);\n\t } else {\n\t controllers[name] = constructor;\n\t }\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $controllerProvider#allowGlobals\n\t * @description If called, allows `$controller` to find controller constructors on `window`\n\t */\n\t this.allowGlobals = function() {\n\t globals = true;\n\t };\n\t\n\t\n\t this.$get = ['$injector', '$window', function($injector, $window) {\n\t\n\t /**\n\t * @ngdoc service\n\t * @name $controller\n\t * @requires $injector\n\t *\n\t * @param {Function|string} constructor If called with a function then it's considered to be the\n\t * controller constructor function. Otherwise it's considered to be a string which is used\n\t * to retrieve the controller constructor using the following steps:\n\t *\n\t * * check if a controller with given name is registered via `$controllerProvider`\n\t * * check if evaluating the string on the current scope returns a constructor\n\t * * if $controllerProvider#allowGlobals, check `window[constructor]` on the global\n\t * `window` object (not recommended)\n\t *\n\t * The string can use the `controller as property` syntax, where the controller instance is published\n\t * as the specified property on the `scope`; the `scope` must be injected into `locals` param for this\n\t * to work correctly.\n\t *\n\t * @param {Object} locals Injection locals for Controller.\n\t * @return {Object} Instance of given controller.\n\t *\n\t * @description\n\t * `$controller` service is responsible for instantiating controllers.\n\t *\n\t * It's just a simple call to {@link auto.$injector $injector}, but extracted into\n\t * a service, so that one can override this service with [BC version](https://gist.github.com/1649788).\n\t */\n\t return function(expression, locals, later, ident) {\n\t // PRIVATE API:\n\t // param `later` --- indicates that the controller's constructor is invoked at a later time.\n\t // If true, $controller will allocate the object with the correct\n\t // prototype chain, but will not invoke the controller until a returned\n\t // callback is invoked.\n\t // param `ident` --- An optional label which overrides the label parsed from the controller\n\t // expression, if any.\n\t var instance, match, constructor, identifier;\n\t later = later === true;\n\t if (ident && isString(ident)) {\n\t identifier = ident;\n\t }\n\t\n\t if (isString(expression)) {\n\t match = expression.match(CNTRL_REG);\n\t if (!match) {\n\t throw $controllerMinErr('ctrlfmt',\n\t \"Badly formed controller string '{0}'. \" +\n\t \"Must match `__name__ as __id__` or `__name__`.\", expression);\n\t }\n\t constructor = match[1],\n\t identifier = identifier || match[3];\n\t expression = controllers.hasOwnProperty(constructor)\n\t ? controllers[constructor]\n\t : getter(locals.$scope, constructor, true) ||\n\t (globals ? getter($window, constructor, true) : undefined);\n\t\n\t assertArgFn(expression, constructor, true);\n\t }\n\t\n\t if (later) {\n\t // Instantiate controller later:\n\t // This machinery is used to create an instance of the object before calling the\n\t // controller's constructor itself.\n\t //\n\t // This allows properties to be added to the controller before the constructor is\n\t // invoked. Primarily, this is used for isolate scope bindings in $compile.\n\t //\n\t // This feature is not intended for use by applications, and is thus not documented\n\t // publicly.\n\t // Object creation: http://jsperf.com/create-constructor/2\n\t var controllerPrototype = (isArray(expression) ?\n\t expression[expression.length - 1] : expression).prototype;\n\t instance = Object.create(controllerPrototype || null);\n\t\n\t if (identifier) {\n\t addIdentifier(locals, identifier, instance, constructor || expression.name);\n\t }\n\t\n\t var instantiate;\n\t return instantiate = extend(function() {\n\t var result = $injector.invoke(expression, instance, locals, constructor);\n\t if (result !== instance && (isObject(result) || isFunction(result))) {\n\t instance = result;\n\t if (identifier) {\n\t // If result changed, re-assign controllerAs value to scope.\n\t addIdentifier(locals, identifier, instance, constructor || expression.name);\n\t }\n\t }\n\t return instance;\n\t }, {\n\t instance: instance,\n\t identifier: identifier\n\t });\n\t }\n\t\n\t instance = $injector.instantiate(expression, locals, constructor);\n\t\n\t if (identifier) {\n\t addIdentifier(locals, identifier, instance, constructor || expression.name);\n\t }\n\t\n\t return instance;\n\t };\n\t\n\t function addIdentifier(locals, identifier, instance, name) {\n\t if (!(locals && isObject(locals.$scope))) {\n\t throw minErr('$controller')('noscp',\n\t \"Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.\",\n\t name, identifier);\n\t }\n\t\n\t locals.$scope[identifier] = instance;\n\t }\n\t }];\n\t}\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $document\n\t * @requires $window\n\t *\n\t * @description\n\t * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object.\n\t *\n\t * @example\n\t <example module=\"documentExample\">\n\t <file name=\"index.html\">\n\t <div ng-controller=\"ExampleController\">\n\t <p>$document title: <b ng-bind=\"title\"></b></p>\n\t <p>window.document title: <b ng-bind=\"windowTitle\"></b></p>\n\t </div>\n\t </file>\n\t <file name=\"script.js\">\n\t angular.module('documentExample', [])\n\t .controller('ExampleController', ['$scope', '$document', function($scope, $document) {\n\t $scope.title = $document[0].title;\n\t $scope.windowTitle = angular.element(window.document)[0].title;\n\t }]);\n\t </file>\n\t </example>\n\t */\n\tfunction $DocumentProvider() {\n\t this.$get = ['$window', function(window) {\n\t return jqLite(window.document);\n\t }];\n\t}\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $exceptionHandler\n\t * @requires ng.$log\n\t *\n\t * @description\n\t * Any uncaught exception in angular expressions is delegated to this service.\n\t * The default implementation simply delegates to `$log.error` which logs it into\n\t * the browser console.\n\t *\n\t * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by\n\t * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.\n\t *\n\t * ## Example:\n\t *\n\t * ```js\n\t * angular.module('exceptionOverride', []).factory('$exceptionHandler', function() {\n\t * return function(exception, cause) {\n\t * exception.message += ' (caused by \"' + cause + '\")';\n\t * throw exception;\n\t * };\n\t * });\n\t * ```\n\t *\n\t * This example will override the normal action of `$exceptionHandler`, to make angular\n\t * exceptions fail hard when they happen, instead of just logging to the console.\n\t *\n\t * <hr />\n\t * Note, that code executed in event-listeners (even those registered using jqLite's `on`/`bind`\n\t * methods) does not delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler}\n\t * (unless executed during a digest).\n\t *\n\t * If you wish, you can manually delegate exceptions, e.g.\n\t * `try { ... } catch(e) { $exceptionHandler(e); }`\n\t *\n\t * @param {Error} exception Exception associated with the error.\n\t * @param {string=} cause optional information about the context in which\n\t * the error was thrown.\n\t *\n\t */\n\tfunction $ExceptionHandlerProvider() {\n\t this.$get = ['$log', function($log) {\n\t return function(exception, cause) {\n\t $log.error.apply($log, arguments);\n\t };\n\t }];\n\t}\n\t\n\tvar $$ForceReflowProvider = function() {\n\t this.$get = ['$document', function($document) {\n\t return function(domNode) {\n\t //the line below will force the browser to perform a repaint so\n\t //that all the animated elements within the animation frame will\n\t //be properly updated and drawn on screen. This is required to\n\t //ensure that the preparation animation is properly flushed so that\n\t //the active state picks up from there. DO NOT REMOVE THIS LINE.\n\t //DO NOT OPTIMIZE THIS LINE. THE MINIFIER WILL REMOVE IT OTHERWISE WHICH\n\t //WILL RESULT IN AN UNPREDICTABLE BUG THAT IS VERY HARD TO TRACK DOWN AND\n\t //WILL TAKE YEARS AWAY FROM YOUR LIFE.\n\t if (domNode) {\n\t if (!domNode.nodeType && domNode instanceof jqLite) {\n\t domNode = domNode[0];\n\t }\n\t } else {\n\t domNode = $document[0].body;\n\t }\n\t return domNode.offsetWidth + 1;\n\t };\n\t }];\n\t};\n\t\n\tvar APPLICATION_JSON = 'application/json';\n\tvar CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': APPLICATION_JSON + ';charset=utf-8'};\n\tvar JSON_START = /^\\[|^\\{(?!\\{)/;\n\tvar JSON_ENDS = {\n\t '[': /]$/,\n\t '{': /}$/\n\t};\n\tvar JSON_PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/;\n\tvar $httpMinErr = minErr('$http');\n\tvar $httpMinErrLegacyFn = function(method) {\n\t return function() {\n\t throw $httpMinErr('legacy', 'The method `{0}` on the promise returned from `$http` has been disabled.', method);\n\t };\n\t};\n\t\n\tfunction serializeValue(v) {\n\t if (isObject(v)) {\n\t return isDate(v) ? v.toISOString() : toJson(v);\n\t }\n\t return v;\n\t}\n\t\n\t\n\tfunction $HttpParamSerializerProvider() {\n\t /**\n\t * @ngdoc service\n\t * @name $httpParamSerializer\n\t * @description\n\t *\n\t * Default {@link $http `$http`} params serializer that converts objects to strings\n\t * according to the following rules:\n\t *\n\t * * `{'foo': 'bar'}` results in `foo=bar`\n\t * * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object)\n\t * * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element)\n\t * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D\"` (stringified and encoded representation of an object)\n\t *\n\t * Note that serializer will sort the request parameters alphabetically.\n\t * */\n\t\n\t this.$get = function() {\n\t return function ngParamSerializer(params) {\n\t if (!params) return '';\n\t var parts = [];\n\t forEachSorted(params, function(value, key) {\n\t if (value === null || isUndefined(value)) return;\n\t if (isArray(value)) {\n\t forEach(value, function(v, k) {\n\t parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(v)));\n\t });\n\t } else {\n\t parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(value)));\n\t }\n\t });\n\t\n\t return parts.join('&');\n\t };\n\t };\n\t}\n\t\n\tfunction $HttpParamSerializerJQLikeProvider() {\n\t /**\n\t * @ngdoc service\n\t * @name $httpParamSerializerJQLike\n\t * @description\n\t *\n\t * Alternative {@link $http `$http`} params serializer that follows\n\t * jQuery's [`param()`](http://api.jquery.com/jquery.param/) method logic.\n\t * The serializer will also sort the params alphabetically.\n\t *\n\t * To use it for serializing `$http` request parameters, set it as the `paramSerializer` property:\n\t *\n\t * ```js\n\t * $http({\n\t * url: myUrl,\n\t * method: 'GET',\n\t * params: myParams,\n\t * paramSerializer: '$httpParamSerializerJQLike'\n\t * });\n\t * ```\n\t *\n\t * It is also possible to set it as the default `paramSerializer` in the\n\t * {@link $httpProvider#defaults `$httpProvider`}.\n\t *\n\t * Additionally, you can inject the serializer and use it explicitly, for example to serialize\n\t * form data for submission:\n\t *\n\t * ```js\n\t * .controller(function($http, $httpParamSerializerJQLike) {\n\t * //...\n\t *\n\t * $http({\n\t * url: myUrl,\n\t * method: 'POST',\n\t * data: $httpParamSerializerJQLike(myData),\n\t * headers: {\n\t * 'Content-Type': 'application/x-www-form-urlencoded'\n\t * }\n\t * });\n\t *\n\t * });\n\t * ```\n\t *\n\t * */\n\t this.$get = function() {\n\t return function jQueryLikeParamSerializer(params) {\n\t if (!params) return '';\n\t var parts = [];\n\t serialize(params, '', true);\n\t return parts.join('&');\n\t\n\t function serialize(toSerialize, prefix, topLevel) {\n\t if (toSerialize === null || isUndefined(toSerialize)) return;\n\t if (isArray(toSerialize)) {\n\t forEach(toSerialize, function(value, index) {\n\t serialize(value, prefix + '[' + (isObject(value) ? index : '') + ']');\n\t });\n\t } else if (isObject(toSerialize) && !isDate(toSerialize)) {\n\t forEachSorted(toSerialize, function(value, key) {\n\t serialize(value, prefix +\n\t (topLevel ? '' : '[') +\n\t key +\n\t (topLevel ? '' : ']'));\n\t });\n\t } else {\n\t parts.push(encodeUriQuery(prefix) + '=' + encodeUriQuery(serializeValue(toSerialize)));\n\t }\n\t }\n\t };\n\t };\n\t}\n\t\n\tfunction defaultHttpResponseTransform(data, headers) {\n\t if (isString(data)) {\n\t // Strip json vulnerability protection prefix and trim whitespace\n\t var tempData = data.replace(JSON_PROTECTION_PREFIX, '').trim();\n\t\n\t if (tempData) {\n\t var contentType = headers('Content-Type');\n\t if ((contentType && (contentType.indexOf(APPLICATION_JSON) === 0)) || isJsonLike(tempData)) {\n\t data = fromJson(tempData);\n\t }\n\t }\n\t }\n\t\n\t return data;\n\t}\n\t\n\tfunction isJsonLike(str) {\n\t var jsonStart = str.match(JSON_START);\n\t return jsonStart && JSON_ENDS[jsonStart[0]].test(str);\n\t}\n\t\n\t/**\n\t * Parse headers into key value object\n\t *\n\t * @param {string} headers Raw headers as a string\n\t * @returns {Object} Parsed headers as key value object\n\t */\n\tfunction parseHeaders(headers) {\n\t var parsed = createMap(), i;\n\t\n\t function fillInParsed(key, val) {\n\t if (key) {\n\t parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n\t }\n\t }\n\t\n\t if (isString(headers)) {\n\t forEach(headers.split('\\n'), function(line) {\n\t i = line.indexOf(':');\n\t fillInParsed(lowercase(trim(line.substr(0, i))), trim(line.substr(i + 1)));\n\t });\n\t } else if (isObject(headers)) {\n\t forEach(headers, function(headerVal, headerKey) {\n\t fillInParsed(lowercase(headerKey), trim(headerVal));\n\t });\n\t }\n\t\n\t return parsed;\n\t}\n\t\n\t\n\t/**\n\t * Returns a function that provides access to parsed headers.\n\t *\n\t * Headers are lazy parsed when first requested.\n\t * @see parseHeaders\n\t *\n\t * @param {(string|Object)} headers Headers to provide access to.\n\t * @returns {function(string=)} Returns a getter function which if called with:\n\t *\n\t * - if called with single an argument returns a single header value or null\n\t * - if called with no arguments returns an object containing all headers.\n\t */\n\tfunction headersGetter(headers) {\n\t var headersObj;\n\t\n\t return function(name) {\n\t if (!headersObj) headersObj = parseHeaders(headers);\n\t\n\t if (name) {\n\t var value = headersObj[lowercase(name)];\n\t if (value === void 0) {\n\t value = null;\n\t }\n\t return value;\n\t }\n\t\n\t return headersObj;\n\t };\n\t}\n\t\n\t\n\t/**\n\t * Chain all given functions\n\t *\n\t * This function is used for both request and response transforming\n\t *\n\t * @param {*} data Data to transform.\n\t * @param {function(string=)} headers HTTP headers getter fn.\n\t * @param {number} status HTTP status code of the response.\n\t * @param {(Function|Array.<Function>)} fns Function or an array of functions.\n\t * @returns {*} Transformed data.\n\t */\n\tfunction transformData(data, headers, status, fns) {\n\t if (isFunction(fns)) {\n\t return fns(data, headers, status);\n\t }\n\t\n\t forEach(fns, function(fn) {\n\t data = fn(data, headers, status);\n\t });\n\t\n\t return data;\n\t}\n\t\n\t\n\tfunction isSuccess(status) {\n\t return 200 <= status && status < 300;\n\t}\n\t\n\t\n\t/**\n\t * @ngdoc provider\n\t * @name $httpProvider\n\t * @description\n\t * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.\n\t * */\n\tfunction $HttpProvider() {\n\t /**\n\t * @ngdoc property\n\t * @name $httpProvider#defaults\n\t * @description\n\t *\n\t * Object containing default values for all {@link ng.$http $http} requests.\n\t *\n\t * - **`defaults.cache`** - {boolean|Object} - A boolean value or object created with\n\t * {@link ng.$cacheFactory `$cacheFactory`} to enable or disable caching of HTTP responses\n\t * by default. See {@link $http#caching $http Caching} for more information.\n\t *\n\t * - **`defaults.xsrfCookieName`** - {string} - Name of cookie containing the XSRF token.\n\t * Defaults value is `'XSRF-TOKEN'`.\n\t *\n\t * - **`defaults.xsrfHeaderName`** - {string} - Name of HTTP header to populate with the\n\t * XSRF token. Defaults value is `'X-XSRF-TOKEN'`.\n\t *\n\t * - **`defaults.headers`** - {Object} - Default headers for all $http requests.\n\t * Refer to {@link ng.$http#setting-http-headers $http} for documentation on\n\t * setting default headers.\n\t * - **`defaults.headers.common`**\n\t * - **`defaults.headers.post`**\n\t * - **`defaults.headers.put`**\n\t * - **`defaults.headers.patch`**\n\t *\n\t *\n\t * - **`defaults.paramSerializer`** - `{string|function(Object<string,string>):string}` - A function\n\t * used to the prepare string representation of request parameters (specified as an object).\n\t * If specified as string, it is interpreted as a function registered with the {@link auto.$injector $injector}.\n\t * Defaults to {@link ng.$httpParamSerializer $httpParamSerializer}.\n\t *\n\t **/\n\t var defaults = this.defaults = {\n\t // transform incoming response data\n\t transformResponse: [defaultHttpResponseTransform],\n\t\n\t // transform outgoing request data\n\t transformRequest: [function(d) {\n\t return isObject(d) && !isFile(d) && !isBlob(d) && !isFormData(d) ? toJson(d) : d;\n\t }],\n\t\n\t // default headers\n\t headers: {\n\t common: {\n\t 'Accept': 'application/json, text/plain, */*'\n\t },\n\t post: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n\t put: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n\t patch: shallowCopy(CONTENT_TYPE_APPLICATION_JSON)\n\t },\n\t\n\t xsrfCookieName: 'XSRF-TOKEN',\n\t xsrfHeaderName: 'X-XSRF-TOKEN',\n\t\n\t paramSerializer: '$httpParamSerializer'\n\t };\n\t\n\t var useApplyAsync = false;\n\t /**\n\t * @ngdoc method\n\t * @name $httpProvider#useApplyAsync\n\t * @description\n\t *\n\t * Configure $http service to combine processing of multiple http responses received at around\n\t * the same time via {@link ng.$rootScope.Scope#$applyAsync $rootScope.$applyAsync}. This can result in\n\t * significant performance improvement for bigger applications that make many HTTP requests\n\t * concurrently (common during application bootstrap).\n\t *\n\t * Defaults to false. If no value is specified, returns the current configured value.\n\t *\n\t * @param {boolean=} value If true, when requests are loaded, they will schedule a deferred\n\t * \"apply\" on the next tick, giving time for subsequent requests in a roughly ~10ms window\n\t * to load and share the same digest cycle.\n\t *\n\t * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.\n\t * otherwise, returns the current configured value.\n\t **/\n\t this.useApplyAsync = function(value) {\n\t if (isDefined(value)) {\n\t useApplyAsync = !!value;\n\t return this;\n\t }\n\t return useApplyAsync;\n\t };\n\t\n\t var useLegacyPromise = true;\n\t /**\n\t * @ngdoc method\n\t * @name $httpProvider#useLegacyPromiseExtensions\n\t * @description\n\t *\n\t * Configure `$http` service to return promises without the shorthand methods `success` and `error`.\n\t * This should be used to make sure that applications work without these methods.\n\t *\n\t * Defaults to true. If no value is specified, returns the current configured value.\n\t *\n\t * @param {boolean=} value If true, `$http` will return a promise with the deprecated legacy `success` and `error` methods.\n\t *\n\t * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.\n\t * otherwise, returns the current configured value.\n\t **/\n\t this.useLegacyPromiseExtensions = function(value) {\n\t if (isDefined(value)) {\n\t useLegacyPromise = !!value;\n\t return this;\n\t }\n\t return useLegacyPromise;\n\t };\n\t\n\t /**\n\t * @ngdoc property\n\t * @name $httpProvider#interceptors\n\t * @description\n\t *\n\t * Array containing service factories for all synchronous or asynchronous {@link ng.$http $http}\n\t * pre-processing of request or postprocessing of responses.\n\t *\n\t * These service factories are ordered by request, i.e. they are applied in the same order as the\n\t * array, on request, but reverse order, on response.\n\t *\n\t * {@link ng.$http#interceptors Interceptors detailed info}\n\t **/\n\t var interceptorFactories = this.interceptors = [];\n\t\n\t this.$get = ['$httpBackend', '$$cookieReader', '$cacheFactory', '$rootScope', '$q', '$injector',\n\t function($httpBackend, $$cookieReader, $cacheFactory, $rootScope, $q, $injector) {\n\t\n\t var defaultCache = $cacheFactory('$http');\n\t\n\t /**\n\t * Make sure that default param serializer is exposed as a function\n\t */\n\t defaults.paramSerializer = isString(defaults.paramSerializer) ?\n\t $injector.get(defaults.paramSerializer) : defaults.paramSerializer;\n\t\n\t /**\n\t * Interceptors stored in reverse order. Inner interceptors before outer interceptors.\n\t * The reversal is needed so that we can build up the interception chain around the\n\t * server request.\n\t */\n\t var reversedInterceptors = [];\n\t\n\t forEach(interceptorFactories, function(interceptorFactory) {\n\t reversedInterceptors.unshift(isString(interceptorFactory)\n\t ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory));\n\t });\n\t\n\t /**\n\t * @ngdoc service\n\t * @kind function\n\t * @name $http\n\t * @requires ng.$httpBackend\n\t * @requires $cacheFactory\n\t * @requires $rootScope\n\t * @requires $q\n\t * @requires $injector\n\t *\n\t * @description\n\t * The `$http` service is a core Angular service that facilitates communication with the remote\n\t * HTTP servers via the browser's [XMLHttpRequest](https://developer.mozilla.org/en/xmlhttprequest)\n\t * object or via [JSONP](http://en.wikipedia.org/wiki/JSONP).\n\t *\n\t * For unit testing applications that use `$http` service, see\n\t * {@link ngMock.$httpBackend $httpBackend mock}.\n\t *\n\t * For a higher level of abstraction, please check out the {@link ngResource.$resource\n\t * $resource} service.\n\t *\n\t * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by\n\t * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage\n\t * it is important to familiarize yourself with these APIs and the guarantees they provide.\n\t *\n\t *\n\t * ## General usage\n\t * The `$http` service is a function which takes a single argument — a {@link $http#usage configuration object} —\n\t * that is used to generate an HTTP request and returns a {@link ng.$q promise}.\n\t *\n\t * ```js\n\t * // Simple GET request example:\n\t * $http({\n\t * method: 'GET',\n\t * url: '/someUrl'\n\t * }).then(function successCallback(response) {\n\t * // this callback will be called asynchronously\n\t * // when the response is available\n\t * }, function errorCallback(response) {\n\t * // called asynchronously if an error occurs\n\t * // or server returns response with an error status.\n\t * });\n\t * ```\n\t *\n\t * The response object has these properties:\n\t *\n\t * - **data** `{string|Object}` The response body transformed with the transform\n\t * functions.\n\t * - **status** `{number}` HTTP status code of the response.\n\t * - **headers** `{function([headerName])}` Header getter function.\n\t * - **config** `{Object}` The configuration object that was used to generate the request.\n\t * - **statusText** `{string}` HTTP status text of the response.\n\t *\n\t * A response status code between 200 and 299 is considered a success status and\n\t * will result in the success callback being called. Note that if the response is a redirect,\n\t * XMLHttpRequest will transparently follow it, meaning that the error callback will not be\n\t * called for such responses.\n\t *\n\t *\n\t * ## Shortcut methods\n\t *\n\t * Shortcut methods are also available. All shortcut methods require passing in the URL, and\n\t * request data must be passed in for POST/PUT requests. An optional config can be passed as the\n\t * last argument.\n\t *\n\t * ```js\n\t * $http.get('/someUrl', config).then(successCallback, errorCallback);\n\t * $http.post('/someUrl', data, config).then(successCallback, errorCallback);\n\t * ```\n\t *\n\t * Complete list of shortcut methods:\n\t *\n\t * - {@link ng.$http#get $http.get}\n\t * - {@link ng.$http#head $http.head}\n\t * - {@link ng.$http#post $http.post}\n\t * - {@link ng.$http#put $http.put}\n\t * - {@link ng.$http#delete $http.delete}\n\t * - {@link ng.$http#jsonp $http.jsonp}\n\t * - {@link ng.$http#patch $http.patch}\n\t *\n\t *\n\t * ## Writing Unit Tests that use $http\n\t * When unit testing (using {@link ngMock ngMock}), it is necessary to call\n\t * {@link ngMock.$httpBackend#flush $httpBackend.flush()} to flush each pending\n\t * request using trained responses.\n\t *\n\t * ```\n\t * $httpBackend.expectGET(...);\n\t * $http.get(...);\n\t * $httpBackend.flush();\n\t * ```\n\t *\n\t * ## Deprecation Notice\n\t * <div class=\"alert alert-danger\">\n\t * The `$http` legacy promise methods `success` and `error` have been deprecated.\n\t * Use the standard `then` method instead.\n\t * If {@link $httpProvider#useLegacyPromiseExtensions `$httpProvider.useLegacyPromiseExtensions`} is set to\n\t * `false` then these methods will throw {@link $http:legacy `$http/legacy`} error.\n\t * </div>\n\t *\n\t * ## Setting HTTP Headers\n\t *\n\t * The $http service will automatically add certain HTTP headers to all requests. These defaults\n\t * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration\n\t * object, which currently contains this default configuration:\n\t *\n\t * - `$httpProvider.defaults.headers.common` (headers that are common for all requests):\n\t * - `Accept: application/json, text/plain, * / *`\n\t * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests)\n\t * - `Content-Type: application/json`\n\t * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests)\n\t * - `Content-Type: application/json`\n\t *\n\t * To add or overwrite these defaults, simply add or remove a property from these configuration\n\t * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object\n\t * with the lowercased HTTP method name as the key, e.g.\n\t * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }`.\n\t *\n\t * The defaults can also be set at runtime via the `$http.defaults` object in the same\n\t * fashion. For example:\n\t *\n\t * ```\n\t * module.run(function($http) {\n\t * $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w'\n\t * });\n\t * ```\n\t *\n\t * In addition, you can supply a `headers` property in the config object passed when\n\t * calling `$http(config)`, which overrides the defaults without changing them globally.\n\t *\n\t * To explicitly remove a header automatically added via $httpProvider.defaults.headers on a per request basis,\n\t * Use the `headers` property, setting the desired header to `undefined`. For example:\n\t *\n\t * ```js\n\t * var req = {\n\t * method: 'POST',\n\t * url: 'http://example.com',\n\t * headers: {\n\t * 'Content-Type': undefined\n\t * },\n\t * data: { test: 'test' }\n\t * }\n\t *\n\t * $http(req).then(function(){...}, function(){...});\n\t * ```\n\t *\n\t * ## Transforming Requests and Responses\n\t *\n\t * Both requests and responses can be transformed using transformation functions: `transformRequest`\n\t * and `transformResponse`. These properties can be a single function that returns\n\t * the transformed value (`function(data, headersGetter, status)`) or an array of such transformation functions,\n\t * which allows you to `push` or `unshift` a new transformation function into the transformation chain.\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * **Note:** Angular does not make a copy of the `data` parameter before it is passed into the `transformRequest` pipeline.\n\t * That means changes to the properties of `data` are not local to the transform function (since Javascript passes objects by reference).\n\t * For example, when calling `$http.get(url, $scope.myObject)`, modifications to the object's properties in a transformRequest\n\t * function will be reflected on the scope and in any templates where the object is data-bound.\n\t * To prevent this, transform functions should have no side-effects.\n\t * If you need to modify properties, it is recommended to make a copy of the data, or create new object to return.\n\t * </div>\n\t *\n\t * ### Default Transformations\n\t *\n\t * The `$httpProvider` provider and `$http` service expose `defaults.transformRequest` and\n\t * `defaults.transformResponse` properties. If a request does not provide its own transformations\n\t * then these will be applied.\n\t *\n\t * You can augment or replace the default transformations by modifying these properties by adding to or\n\t * replacing the array.\n\t *\n\t * Angular provides the following default transformations:\n\t *\n\t * Request transformations (`$httpProvider.defaults.transformRequest` and `$http.defaults.transformRequest`):\n\t *\n\t * - If the `data` property of the request configuration object contains an object, serialize it\n\t * into JSON format.\n\t *\n\t * Response transformations (`$httpProvider.defaults.transformResponse` and `$http.defaults.transformResponse`):\n\t *\n\t * - If XSRF prefix is detected, strip it (see Security Considerations section below).\n\t * - If JSON response is detected, deserialize it using a JSON parser.\n\t *\n\t *\n\t * ### Overriding the Default Transformations Per Request\n\t *\n\t * If you wish override the request/response transformations only for a single request then provide\n\t * `transformRequest` and/or `transformResponse` properties on the configuration object passed\n\t * into `$http`.\n\t *\n\t * Note that if you provide these properties on the config object the default transformations will be\n\t * overwritten. If you wish to augment the default transformations then you must include them in your\n\t * local transformation array.\n\t *\n\t * The following code demonstrates adding a new response transformation to be run after the default response\n\t * transformations have been run.\n\t *\n\t * ```js\n\t * function appendTransform(defaults, transform) {\n\t *\n\t * // We can't guarantee that the default transformation is an array\n\t * defaults = angular.isArray(defaults) ? defaults : [defaults];\n\t *\n\t * // Append the new transformation to the defaults\n\t * return defaults.concat(transform);\n\t * }\n\t *\n\t * $http({\n\t * url: '...',\n\t * method: 'GET',\n\t * transformResponse: appendTransform($http.defaults.transformResponse, function(value) {\n\t * return doTransform(value);\n\t * })\n\t * });\n\t * ```\n\t *\n\t *\n\t * ## Caching\n\t *\n\t * {@link ng.$http `$http`} responses are not cached by default. To enable caching, you must\n\t * set the config.cache value or the default cache value to TRUE or to a cache object (created\n\t * with {@link ng.$cacheFactory `$cacheFactory`}). If defined, the value of config.cache takes\n\t * precedence over the default cache value.\n\t *\n\t * In order to:\n\t * * cache all responses - set the default cache value to TRUE or to a cache object\n\t * * cache a specific response - set config.cache value to TRUE or to a cache object\n\t *\n\t * If caching is enabled, but neither the default cache nor config.cache are set to a cache object,\n\t * then the default `$cacheFactory($http)` object is used.\n\t *\n\t * The default cache value can be set by updating the\n\t * {@link ng.$http#defaults `$http.defaults.cache`} property or the\n\t * {@link $httpProvider#defaults `$httpProvider.defaults.cache`} property.\n\t *\n\t * When caching is enabled, {@link ng.$http `$http`} stores the response from the server using\n\t * the relevant cache object. The next time the same request is made, the response is returned\n\t * from the cache without sending a request to the server.\n\t *\n\t * Take note that:\n\t *\n\t * * Only GET and JSONP requests are cached.\n\t * * The cache key is the request URL including search parameters; headers are not considered.\n\t * * Cached responses are returned asynchronously, in the same way as responses from the server.\n\t * * If multiple identical requests are made using the same cache, which is not yet populated,\n\t * one request will be made to the server and remaining requests will return the same response.\n\t * * A cache-control header on the response does not affect if or how responses are cached.\n\t *\n\t *\n\t * ## Interceptors\n\t *\n\t * Before you start creating interceptors, be sure to understand the\n\t * {@link ng.$q $q and deferred/promise APIs}.\n\t *\n\t * For purposes of global error handling, authentication, or any kind of synchronous or\n\t * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be\n\t * able to intercept requests before they are handed to the server and\n\t * responses before they are handed over to the application code that\n\t * initiated these requests. The interceptors leverage the {@link ng.$q\n\t * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing.\n\t *\n\t * The interceptors are service factories that are registered with the `$httpProvider` by\n\t * adding them to the `$httpProvider.interceptors` array. The factory is called and\n\t * injected with dependencies (if specified) and returns the interceptor.\n\t *\n\t * There are two kinds of interceptors (and two kinds of rejection interceptors):\n\t *\n\t * * `request`: interceptors get called with a http {@link $http#usage config} object. The function is free to\n\t * modify the `config` object or create a new one. The function needs to return the `config`\n\t * object directly, or a promise containing the `config` or a new `config` object.\n\t * * `requestError`: interceptor gets called when a previous interceptor threw an error or\n\t * resolved with a rejection.\n\t * * `response`: interceptors get called with http `response` object. The function is free to\n\t * modify the `response` object or create a new one. The function needs to return the `response`\n\t * object directly, or as a promise containing the `response` or a new `response` object.\n\t * * `responseError`: interceptor gets called when a previous interceptor threw an error or\n\t * resolved with a rejection.\n\t *\n\t *\n\t * ```js\n\t * // register the interceptor as a service\n\t * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {\n\t * return {\n\t * // optional method\n\t * 'request': function(config) {\n\t * // do something on success\n\t * return config;\n\t * },\n\t *\n\t * // optional method\n\t * 'requestError': function(rejection) {\n\t * // do something on error\n\t * if (canRecover(rejection)) {\n\t * return responseOrNewPromise\n\t * }\n\t * return $q.reject(rejection);\n\t * },\n\t *\n\t *\n\t *\n\t * // optional method\n\t * 'response': function(response) {\n\t * // do something on success\n\t * return response;\n\t * },\n\t *\n\t * // optional method\n\t * 'responseError': function(rejection) {\n\t * // do something on error\n\t * if (canRecover(rejection)) {\n\t * return responseOrNewPromise\n\t * }\n\t * return $q.reject(rejection);\n\t * }\n\t * };\n\t * });\n\t *\n\t * $httpProvider.interceptors.push('myHttpInterceptor');\n\t *\n\t *\n\t * // alternatively, register the interceptor via an anonymous factory\n\t * $httpProvider.interceptors.push(function($q, dependency1, dependency2) {\n\t * return {\n\t * 'request': function(config) {\n\t * // same as above\n\t * },\n\t *\n\t * 'response': function(response) {\n\t * // same as above\n\t * }\n\t * };\n\t * });\n\t * ```\n\t *\n\t * ## Security Considerations\n\t *\n\t * When designing web applications, consider security threats from:\n\t *\n\t * - [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n\t * - [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)\n\t *\n\t * Both server and the client must cooperate in order to eliminate these threats. Angular comes\n\t * pre-configured with strategies that address these issues, but for this to work backend server\n\t * cooperation is required.\n\t *\n\t * ### JSON Vulnerability Protection\n\t *\n\t * A [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n\t * allows third party website to turn your JSON resource URL into\n\t * [JSONP](http://en.wikipedia.org/wiki/JSONP) request under some conditions. To\n\t * counter this your server can prefix all JSON requests with following string `\")]}',\\n\"`.\n\t * Angular will automatically strip the prefix before processing it as JSON.\n\t *\n\t * For example if your server needs to return:\n\t * ```js\n\t * ['one','two']\n\t * ```\n\t *\n\t * which is vulnerable to attack, your server can return:\n\t * ```js\n\t * )]}',\n\t * ['one','two']\n\t * ```\n\t *\n\t * Angular will strip the prefix, before processing the JSON.\n\t *\n\t *\n\t * ### Cross Site Request Forgery (XSRF) Protection\n\t *\n\t * [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) is an attack technique by\n\t * which the attacker can trick an authenticated user into unknowingly executing actions on your\n\t * website. Angular provides a mechanism to counter XSRF. When performing XHR requests, the\n\t * $http service reads a token from a cookie (by default, `XSRF-TOKEN`) and sets it as an HTTP\n\t * header (`X-XSRF-TOKEN`). Since only JavaScript that runs on your domain could read the\n\t * cookie, your server can be assured that the XHR came from JavaScript running on your domain.\n\t * The header will not be set for cross-domain requests.\n\t *\n\t * To take advantage of this, your server needs to set a token in a JavaScript readable session\n\t * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the\n\t * server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure\n\t * that only JavaScript running on your domain could have sent the request. The token must be\n\t * unique for each user and must be verifiable by the server (to prevent the JavaScript from\n\t * making up its own tokens). We recommend that the token is a digest of your site's\n\t * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography&#41;)\n\t * for added security.\n\t *\n\t * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName\n\t * properties of either $httpProvider.defaults at config-time, $http.defaults at run-time,\n\t * or the per-request config object.\n\t *\n\t * In order to prevent collisions in environments where multiple Angular apps share the\n\t * same domain or subdomain, we recommend that each application uses unique cookie name.\n\t *\n\t * @param {object} config Object describing the request to be made and how it should be\n\t * processed. The object has following properties:\n\t *\n\t * - **method** `{string}` HTTP method (e.g. 'GET', 'POST', etc)\n\t * - **url** `{string}` Absolute or relative URL of the resource that is being requested.\n\t * - **params** `{Object.<string|Object>}` Map of strings or objects which will be serialized\n\t * with the `paramSerializer` and appended as GET parameters.\n\t * - **data** `{string|Object}` Data to be sent as the request message data.\n\t * - **headers** `{Object}` Map of strings or functions which return strings representing\n\t * HTTP headers to send to the server. If the return value of a function is null, the\n\t * header will not be sent. Functions accept a config object as an argument.\n\t * - **xsrfHeaderName** `{string}` Name of HTTP header to populate with the XSRF token.\n\t * - **xsrfCookieName** `{string}` Name of cookie containing the XSRF token.\n\t * - **transformRequest** \n\t * `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` \n\t * transform function or an array of such functions. The transform function takes the http\n\t * request body and headers and returns its transformed (typically serialized) version.\n\t * See {@link ng.$http#overriding-the-default-transformations-per-request\n\t * Overriding the Default Transformations}\n\t * - **transformResponse** \n\t * `{function(data, headersGetter, status)|Array.<function(data, headersGetter, status)>}` \n\t * transform function or an array of such functions. The transform function takes the http\n\t * response body, headers and status and returns its transformed (typically deserialized) version.\n\t * See {@link ng.$http#overriding-the-default-transformations-per-request\n\t * Overriding the Default Transformations}\n\t * - **paramSerializer** - `{string|function(Object<string,string>):string}` - A function used to\n\t * prepare the string representation of request parameters (specified as an object).\n\t * If specified as string, it is interpreted as function registered with the\n\t * {@link $injector $injector}, which means you can create your own serializer\n\t * by registering it as a {@link auto.$provide#service service}.\n\t * The default serializer is the {@link $httpParamSerializer $httpParamSerializer};\n\t * alternatively, you can use the {@link $httpParamSerializerJQLike $httpParamSerializerJQLike}\n\t * - **cache** `{boolean|Object}` A boolean value or object created with\n\t * {@link ng.$cacheFactory `$cacheFactory`} to enable or disable caching of the HTTP response.\n\t * See {@link $http#caching $http Caching} for more information.\n\t * - **timeout** `{number|Promise}` timeout in milliseconds, or {@link ng.$q promise}\n\t * that should abort the request when resolved.\n\t * - **withCredentials** - `{boolean}` - whether to set the `withCredentials` flag on the\n\t * XHR object. See [requests with credentials](https://developer.mozilla.org/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials)\n\t * for more information.\n\t * - **responseType** - `{string}` - see\n\t * [XMLHttpRequest.responseType](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype).\n\t *\n\t * @returns {HttpPromise} Returns a {@link ng.$q `Promise}` that will be resolved to a response object\n\t * when the request succeeds or fails.\n\t *\n\t *\n\t * @property {Array.<Object>} pendingRequests Array of config objects for currently pending\n\t * requests. This is primarily meant to be used for debugging purposes.\n\t *\n\t *\n\t * @example\n\t<example module=\"httpExample\">\n\t<file name=\"index.html\">\n\t <div ng-controller=\"FetchController\">\n\t <select ng-model=\"method\" aria-label=\"Request method\">\n\t <option>GET</option>\n\t <option>JSONP</option>\n\t </select>\n\t <input type=\"text\" ng-model=\"url\" size=\"80\" aria-label=\"URL\" />\n\t <button id=\"fetchbtn\" ng-click=\"fetch()\">fetch</button><br>\n\t <button id=\"samplegetbtn\" ng-click=\"updateModel('GET', 'http-hello.html')\">Sample GET</button>\n\t <button id=\"samplejsonpbtn\"\n\t ng-click=\"updateModel('JSONP',\n\t 'https://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero')\">\n\t Sample JSONP\n\t </button>\n\t <button id=\"invalidjsonpbtn\"\n\t ng-click=\"updateModel('JSONP', 'https://angularjs.org/doesntexist&callback=JSON_CALLBACK')\">\n\t Invalid JSONP\n\t </button>\n\t <pre>http status code: {{status}}</pre>\n\t <pre>http response data: {{data}}</pre>\n\t </div>\n\t</file>\n\t<file name=\"script.js\">\n\t angular.module('httpExample', [])\n\t .controller('FetchController', ['$scope', '$http', '$templateCache',\n\t function($scope, $http, $templateCache) {\n\t $scope.method = 'GET';\n\t $scope.url = 'http-hello.html';\n\t\n\t $scope.fetch = function() {\n\t $scope.code = null;\n\t $scope.response = null;\n\t\n\t $http({method: $scope.method, url: $scope.url, cache: $templateCache}).\n\t then(function(response) {\n\t $scope.status = response.status;\n\t $scope.data = response.data;\n\t }, function(response) {\n\t $scope.data = response.data || \"Request failed\";\n\t $scope.status = response.status;\n\t });\n\t };\n\t\n\t $scope.updateModel = function(method, url) {\n\t $scope.method = method;\n\t $scope.url = url;\n\t };\n\t }]);\n\t</file>\n\t<file name=\"http-hello.html\">\n\t Hello, $http!\n\t</file>\n\t<file name=\"protractor.js\" type=\"protractor\">\n\t var status = element(by.binding('status'));\n\t var data = element(by.binding('data'));\n\t var fetchBtn = element(by.id('fetchbtn'));\n\t var sampleGetBtn = element(by.id('samplegetbtn'));\n\t var sampleJsonpBtn = element(by.id('samplejsonpbtn'));\n\t var invalidJsonpBtn = element(by.id('invalidjsonpbtn'));\n\t\n\t it('should make an xhr GET request', function() {\n\t sampleGetBtn.click();\n\t fetchBtn.click();\n\t expect(status.getText()).toMatch('200');\n\t expect(data.getText()).toMatch(/Hello, \\$http!/);\n\t });\n\t\n\t// Commented out due to flakes. See https://github.com/angular/angular.js/issues/9185\n\t// it('should make a JSONP request to angularjs.org', function() {\n\t// sampleJsonpBtn.click();\n\t// fetchBtn.click();\n\t// expect(status.getText()).toMatch('200');\n\t// expect(data.getText()).toMatch(/Super Hero!/);\n\t// });\n\t\n\t it('should make JSONP request to invalid URL and invoke the error handler',\n\t function() {\n\t invalidJsonpBtn.click();\n\t fetchBtn.click();\n\t expect(status.getText()).toMatch('0');\n\t expect(data.getText()).toMatch('Request failed');\n\t });\n\t</file>\n\t</example>\n\t */\n\t function $http(requestConfig) {\n\t\n\t if (!angular.isObject(requestConfig)) {\n\t throw minErr('$http')('badreq', 'Http request configuration must be an object. Received: {0}', requestConfig);\n\t }\n\t\n\t if (!isString(requestConfig.url)) {\n\t throw minErr('$http')('badreq', 'Http request configuration url must be a string. Received: {0}', requestConfig.url);\n\t }\n\t\n\t var config = extend({\n\t method: 'get',\n\t transformRequest: defaults.transformRequest,\n\t transformResponse: defaults.transformResponse,\n\t paramSerializer: defaults.paramSerializer\n\t }, requestConfig);\n\t\n\t config.headers = mergeHeaders(requestConfig);\n\t config.method = uppercase(config.method);\n\t config.paramSerializer = isString(config.paramSerializer) ?\n\t $injector.get(config.paramSerializer) : config.paramSerializer;\n\t\n\t var serverRequest = function(config) {\n\t var headers = config.headers;\n\t var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);\n\t\n\t // strip content-type if data is undefined\n\t if (isUndefined(reqData)) {\n\t forEach(headers, function(value, header) {\n\t if (lowercase(header) === 'content-type') {\n\t delete headers[header];\n\t }\n\t });\n\t }\n\t\n\t if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {\n\t config.withCredentials = defaults.withCredentials;\n\t }\n\t\n\t // send request\n\t return sendReq(config, reqData).then(transformResponse, transformResponse);\n\t };\n\t\n\t var chain = [serverRequest, undefined];\n\t var promise = $q.when(config);\n\t\n\t // apply interceptors\n\t forEach(reversedInterceptors, function(interceptor) {\n\t if (interceptor.request || interceptor.requestError) {\n\t chain.unshift(interceptor.request, interceptor.requestError);\n\t }\n\t if (interceptor.response || interceptor.responseError) {\n\t chain.push(interceptor.response, interceptor.responseError);\n\t }\n\t });\n\t\n\t while (chain.length) {\n\t var thenFn = chain.shift();\n\t var rejectFn = chain.shift();\n\t\n\t promise = promise.then(thenFn, rejectFn);\n\t }\n\t\n\t if (useLegacyPromise) {\n\t promise.success = function(fn) {\n\t assertArgFn(fn, 'fn');\n\t\n\t promise.then(function(response) {\n\t fn(response.data, response.status, response.headers, config);\n\t });\n\t return promise;\n\t };\n\t\n\t promise.error = function(fn) {\n\t assertArgFn(fn, 'fn');\n\t\n\t promise.then(null, function(response) {\n\t fn(response.data, response.status, response.headers, config);\n\t });\n\t return promise;\n\t };\n\t } else {\n\t promise.success = $httpMinErrLegacyFn('success');\n\t promise.error = $httpMinErrLegacyFn('error');\n\t }\n\t\n\t return promise;\n\t\n\t function transformResponse(response) {\n\t // make a copy since the response must be cacheable\n\t var resp = extend({}, response);\n\t resp.data = transformData(response.data, response.headers, response.status,\n\t config.transformResponse);\n\t return (isSuccess(response.status))\n\t ? resp\n\t : $q.reject(resp);\n\t }\n\t\n\t function executeHeaderFns(headers, config) {\n\t var headerContent, processedHeaders = {};\n\t\n\t forEach(headers, function(headerFn, header) {\n\t if (isFunction(headerFn)) {\n\t headerContent = headerFn(config);\n\t if (headerContent != null) {\n\t processedHeaders[header] = headerContent;\n\t }\n\t } else {\n\t processedHeaders[header] = headerFn;\n\t }\n\t });\n\t\n\t return processedHeaders;\n\t }\n\t\n\t function mergeHeaders(config) {\n\t var defHeaders = defaults.headers,\n\t reqHeaders = extend({}, config.headers),\n\t defHeaderName, lowercaseDefHeaderName, reqHeaderName;\n\t\n\t defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]);\n\t\n\t // using for-in instead of forEach to avoid unecessary iteration after header has been found\n\t defaultHeadersIteration:\n\t for (defHeaderName in defHeaders) {\n\t lowercaseDefHeaderName = lowercase(defHeaderName);\n\t\n\t for (reqHeaderName in reqHeaders) {\n\t if (lowercase(reqHeaderName) === lowercaseDefHeaderName) {\n\t continue defaultHeadersIteration;\n\t }\n\t }\n\t\n\t reqHeaders[defHeaderName] = defHeaders[defHeaderName];\n\t }\n\t\n\t // execute if header value is a function for merged headers\n\t return executeHeaderFns(reqHeaders, shallowCopy(config));\n\t }\n\t }\n\t\n\t $http.pendingRequests = [];\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $http#get\n\t *\n\t * @description\n\t * Shortcut method to perform `GET` request.\n\t *\n\t * @param {string} url Relative or absolute URL specifying the destination of the request\n\t * @param {Object=} config Optional configuration object\n\t * @returns {HttpPromise} Future object\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $http#delete\n\t *\n\t * @description\n\t * Shortcut method to perform `DELETE` request.\n\t *\n\t * @param {string} url Relative or absolute URL specifying the destination of the request\n\t * @param {Object=} config Optional configuration object\n\t * @returns {HttpPromise} Future object\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $http#head\n\t *\n\t * @description\n\t * Shortcut method to perform `HEAD` request.\n\t *\n\t * @param {string} url Relative or absolute URL specifying the destination of the request\n\t * @param {Object=} config Optional configuration object\n\t * @returns {HttpPromise} Future object\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $http#jsonp\n\t *\n\t * @description\n\t * Shortcut method to perform `JSONP` request.\n\t *\n\t * @param {string} url Relative or absolute URL specifying the destination of the request.\n\t * The name of the callback should be the string `JSON_CALLBACK`.\n\t * @param {Object=} config Optional configuration object\n\t * @returns {HttpPromise} Future object\n\t */\n\t createShortMethods('get', 'delete', 'head', 'jsonp');\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $http#post\n\t *\n\t * @description\n\t * Shortcut method to perform `POST` request.\n\t *\n\t * @param {string} url Relative or absolute URL specifying the destination of the request\n\t * @param {*} data Request content\n\t * @param {Object=} config Optional configuration object\n\t * @returns {HttpPromise} Future object\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $http#put\n\t *\n\t * @description\n\t * Shortcut method to perform `PUT` request.\n\t *\n\t * @param {string} url Relative or absolute URL specifying the destination of the request\n\t * @param {*} data Request content\n\t * @param {Object=} config Optional configuration object\n\t * @returns {HttpPromise} Future object\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $http#patch\n\t *\n\t * @description\n\t * Shortcut method to perform `PATCH` request.\n\t *\n\t * @param {string} url Relative or absolute URL specifying the destination of the request\n\t * @param {*} data Request content\n\t * @param {Object=} config Optional configuration object\n\t * @returns {HttpPromise} Future object\n\t */\n\t createShortMethodsWithData('post', 'put', 'patch');\n\t\n\t /**\n\t * @ngdoc property\n\t * @name $http#defaults\n\t *\n\t * @description\n\t * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of\n\t * default headers, withCredentials as well as request and response transformations.\n\t *\n\t * See \"Setting HTTP Headers\" and \"Transforming Requests and Responses\" sections above.\n\t */\n\t $http.defaults = defaults;\n\t\n\t\n\t return $http;\n\t\n\t\n\t function createShortMethods(names) {\n\t forEach(arguments, function(name) {\n\t $http[name] = function(url, config) {\n\t return $http(extend({}, config || {}, {\n\t method: name,\n\t url: url\n\t }));\n\t };\n\t });\n\t }\n\t\n\t\n\t function createShortMethodsWithData(name) {\n\t forEach(arguments, function(name) {\n\t $http[name] = function(url, data, config) {\n\t return $http(extend({}, config || {}, {\n\t method: name,\n\t url: url,\n\t data: data\n\t }));\n\t };\n\t });\n\t }\n\t\n\t\n\t /**\n\t * Makes the request.\n\t *\n\t * !!! ACCESSES CLOSURE VARS:\n\t * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests\n\t */\n\t function sendReq(config, reqData) {\n\t var deferred = $q.defer(),\n\t promise = deferred.promise,\n\t cache,\n\t cachedResp,\n\t reqHeaders = config.headers,\n\t url = buildUrl(config.url, config.paramSerializer(config.params));\n\t\n\t $http.pendingRequests.push(config);\n\t promise.then(removePendingReq, removePendingReq);\n\t\n\t\n\t if ((config.cache || defaults.cache) && config.cache !== false &&\n\t (config.method === 'GET' || config.method === 'JSONP')) {\n\t cache = isObject(config.cache) ? config.cache\n\t : isObject(defaults.cache) ? defaults.cache\n\t : defaultCache;\n\t }\n\t\n\t if (cache) {\n\t cachedResp = cache.get(url);\n\t if (isDefined(cachedResp)) {\n\t if (isPromiseLike(cachedResp)) {\n\t // cached request has already been sent, but there is no response yet\n\t cachedResp.then(resolvePromiseWithResult, resolvePromiseWithResult);\n\t } else {\n\t // serving from cache\n\t if (isArray(cachedResp)) {\n\t resolvePromise(cachedResp[1], cachedResp[0], shallowCopy(cachedResp[2]), cachedResp[3]);\n\t } else {\n\t resolvePromise(cachedResp, 200, {}, 'OK');\n\t }\n\t }\n\t } else {\n\t // put the promise for the non-transformed response into cache as a placeholder\n\t cache.put(url, promise);\n\t }\n\t }\n\t\n\t\n\t // if we won't have the response in cache, set the xsrf headers and\n\t // send the request to the backend\n\t if (isUndefined(cachedResp)) {\n\t var xsrfValue = urlIsSameOrigin(config.url)\n\t ? $$cookieReader()[config.xsrfCookieName || defaults.xsrfCookieName]\n\t : undefined;\n\t if (xsrfValue) {\n\t reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;\n\t }\n\t\n\t $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout,\n\t config.withCredentials, config.responseType);\n\t }\n\t\n\t return promise;\n\t\n\t\n\t /**\n\t * Callback registered to $httpBackend():\n\t * - caches the response if desired\n\t * - resolves the raw $http promise\n\t * - calls $apply\n\t */\n\t function done(status, response, headersString, statusText) {\n\t if (cache) {\n\t if (isSuccess(status)) {\n\t cache.put(url, [status, response, parseHeaders(headersString), statusText]);\n\t } else {\n\t // remove promise from the cache\n\t cache.remove(url);\n\t }\n\t }\n\t\n\t function resolveHttpPromise() {\n\t resolvePromise(response, status, headersString, statusText);\n\t }\n\t\n\t if (useApplyAsync) {\n\t $rootScope.$applyAsync(resolveHttpPromise);\n\t } else {\n\t resolveHttpPromise();\n\t if (!$rootScope.$$phase) $rootScope.$apply();\n\t }\n\t }\n\t\n\t\n\t /**\n\t * Resolves the raw $http promise.\n\t */\n\t function resolvePromise(response, status, headers, statusText) {\n\t //status: HTTP response status code, 0, -1 (aborted by timeout / promise)\n\t status = status >= -1 ? status : 0;\n\t\n\t (isSuccess(status) ? deferred.resolve : deferred.reject)({\n\t data: response,\n\t status: status,\n\t headers: headersGetter(headers),\n\t config: config,\n\t statusText: statusText\n\t });\n\t }\n\t\n\t function resolvePromiseWithResult(result) {\n\t resolvePromise(result.data, result.status, shallowCopy(result.headers()), result.statusText);\n\t }\n\t\n\t function removePendingReq() {\n\t var idx = $http.pendingRequests.indexOf(config);\n\t if (idx !== -1) $http.pendingRequests.splice(idx, 1);\n\t }\n\t }\n\t\n\t\n\t function buildUrl(url, serializedParams) {\n\t if (serializedParams.length > 0) {\n\t url += ((url.indexOf('?') == -1) ? '?' : '&') + serializedParams;\n\t }\n\t return url;\n\t }\n\t }];\n\t}\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $xhrFactory\n\t *\n\t * @description\n\t * Factory function used to create XMLHttpRequest objects.\n\t *\n\t * Replace or decorate this service to create your own custom XMLHttpRequest objects.\n\t *\n\t * ```\n\t * angular.module('myApp', [])\n\t * .factory('$xhrFactory', function() {\n\t * return function createXhr(method, url) {\n\t * return new window.XMLHttpRequest({mozSystem: true});\n\t * };\n\t * });\n\t * ```\n\t *\n\t * @param {string} method HTTP method of the request (GET, POST, PUT, ..)\n\t * @param {string} url URL of the request.\n\t */\n\tfunction $xhrFactoryProvider() {\n\t this.$get = function() {\n\t return function createXhr() {\n\t return new window.XMLHttpRequest();\n\t };\n\t };\n\t}\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $httpBackend\n\t * @requires $window\n\t * @requires $document\n\t * @requires $xhrFactory\n\t *\n\t * @description\n\t * HTTP backend used by the {@link ng.$http service} that delegates to\n\t * XMLHttpRequest object or JSONP and deals with browser incompatibilities.\n\t *\n\t * You should never need to use this service directly, instead use the higher-level abstractions:\n\t * {@link ng.$http $http} or {@link ngResource.$resource $resource}.\n\t *\n\t * During testing this implementation is swapped with {@link ngMock.$httpBackend mock\n\t * $httpBackend} which can be trained with responses.\n\t */\n\tfunction $HttpBackendProvider() {\n\t this.$get = ['$browser', '$window', '$document', '$xhrFactory', function($browser, $window, $document, $xhrFactory) {\n\t return createHttpBackend($browser, $xhrFactory, $browser.defer, $window.angular.callbacks, $document[0]);\n\t }];\n\t}\n\t\n\tfunction createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) {\n\t // TODO(vojta): fix the signature\n\t return function(method, url, post, callback, headers, timeout, withCredentials, responseType) {\n\t $browser.$$incOutstandingRequestCount();\n\t url = url || $browser.url();\n\t\n\t if (lowercase(method) == 'jsonp') {\n\t var callbackId = '_' + (callbacks.counter++).toString(36);\n\t callbacks[callbackId] = function(data) {\n\t callbacks[callbackId].data = data;\n\t callbacks[callbackId].called = true;\n\t };\n\t\n\t var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),\n\t callbackId, function(status, text) {\n\t completeRequest(callback, status, callbacks[callbackId].data, \"\", text);\n\t callbacks[callbackId] = noop;\n\t });\n\t } else {\n\t\n\t var xhr = createXhr(method, url);\n\t\n\t xhr.open(method, url, true);\n\t forEach(headers, function(value, key) {\n\t if (isDefined(value)) {\n\t xhr.setRequestHeader(key, value);\n\t }\n\t });\n\t\n\t xhr.onload = function requestLoaded() {\n\t var statusText = xhr.statusText || '';\n\t\n\t // responseText is the old-school way of retrieving response (supported by IE9)\n\t // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)\n\t var response = ('response' in xhr) ? xhr.response : xhr.responseText;\n\t\n\t // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)\n\t var status = xhr.status === 1223 ? 204 : xhr.status;\n\t\n\t // fix status code when it is 0 (0 status is undocumented).\n\t // Occurs when accessing file resources or on Android 4.1 stock browser\n\t // while retrieving files from application cache.\n\t if (status === 0) {\n\t status = response ? 200 : urlResolve(url).protocol == 'file' ? 404 : 0;\n\t }\n\t\n\t completeRequest(callback,\n\t status,\n\t response,\n\t xhr.getAllResponseHeaders(),\n\t statusText);\n\t };\n\t\n\t var requestError = function() {\n\t // The response is always empty\n\t // See https://xhr.spec.whatwg.org/#request-error-steps and https://fetch.spec.whatwg.org/#concept-network-error\n\t completeRequest(callback, -1, null, null, '');\n\t };\n\t\n\t xhr.onerror = requestError;\n\t xhr.onabort = requestError;\n\t\n\t if (withCredentials) {\n\t xhr.withCredentials = true;\n\t }\n\t\n\t if (responseType) {\n\t try {\n\t xhr.responseType = responseType;\n\t } catch (e) {\n\t // WebKit added support for the json responseType value on 09/03/2013\n\t // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are\n\t // known to throw when setting the value \"json\" as the response type. Other older\n\t // browsers implementing the responseType\n\t //\n\t // The json response type can be ignored if not supported, because JSON payloads are\n\t // parsed on the client-side regardless.\n\t if (responseType !== 'json') {\n\t throw e;\n\t }\n\t }\n\t }\n\t\n\t xhr.send(isUndefined(post) ? null : post);\n\t }\n\t\n\t if (timeout > 0) {\n\t var timeoutId = $browserDefer(timeoutRequest, timeout);\n\t } else if (isPromiseLike(timeout)) {\n\t timeout.then(timeoutRequest);\n\t }\n\t\n\t\n\t function timeoutRequest() {\n\t jsonpDone && jsonpDone();\n\t xhr && xhr.abort();\n\t }\n\t\n\t function completeRequest(callback, status, response, headersString, statusText) {\n\t // cancel timeout and subsequent timeout promise resolution\n\t if (isDefined(timeoutId)) {\n\t $browserDefer.cancel(timeoutId);\n\t }\n\t jsonpDone = xhr = null;\n\t\n\t callback(status, response, headersString, statusText);\n\t $browser.$$completeOutstandingRequest(noop);\n\t }\n\t };\n\t\n\t function jsonpReq(url, callbackId, done) {\n\t // we can't use jQuery/jqLite here because jQuery does crazy stuff with script elements, e.g.:\n\t // - fetches local scripts via XHR and evals them\n\t // - adds and immediately removes script elements from the document\n\t var script = rawDocument.createElement('script'), callback = null;\n\t script.type = \"text/javascript\";\n\t script.src = url;\n\t script.async = true;\n\t\n\t callback = function(event) {\n\t removeEventListenerFn(script, \"load\", callback);\n\t removeEventListenerFn(script, \"error\", callback);\n\t rawDocument.body.removeChild(script);\n\t script = null;\n\t var status = -1;\n\t var text = \"unknown\";\n\t\n\t if (event) {\n\t if (event.type === \"load\" && !callbacks[callbackId].called) {\n\t event = { type: \"error\" };\n\t }\n\t text = event.type;\n\t status = event.type === \"error\" ? 404 : 200;\n\t }\n\t\n\t if (done) {\n\t done(status, text);\n\t }\n\t };\n\t\n\t addEventListenerFn(script, \"load\", callback);\n\t addEventListenerFn(script, \"error\", callback);\n\t rawDocument.body.appendChild(script);\n\t return callback;\n\t }\n\t}\n\t\n\tvar $interpolateMinErr = angular.$interpolateMinErr = minErr('$interpolate');\n\t$interpolateMinErr.throwNoconcat = function(text) {\n\t throw $interpolateMinErr('noconcat',\n\t \"Error while interpolating: {0}\\nStrict Contextual Escaping disallows \" +\n\t \"interpolations that concatenate multiple expressions when a trusted value is \" +\n\t \"required. See http://docs.angularjs.org/api/ng.$sce\", text);\n\t};\n\t\n\t$interpolateMinErr.interr = function(text, err) {\n\t return $interpolateMinErr('interr', \"Can't interpolate: {0}\\n{1}\", text, err.toString());\n\t};\n\t\n\t/**\n\t * @ngdoc provider\n\t * @name $interpolateProvider\n\t *\n\t * @description\n\t *\n\t * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.\n\t *\n\t * @example\n\t<example name=\"custom-interpolation-markup\" module=\"customInterpolationApp\">\n\t<file name=\"index.html\">\n\t<script>\n\t var customInterpolationApp = angular.module('customInterpolationApp', []);\n\t\n\t customInterpolationApp.config(function($interpolateProvider) {\n\t $interpolateProvider.startSymbol('//');\n\t $interpolateProvider.endSymbol('//');\n\t });\n\t\n\t\n\t customInterpolationApp.controller('DemoController', function() {\n\t this.label = \"This binding is brought you by // interpolation symbols.\";\n\t });\n\t</script>\n\t<div ng-controller=\"DemoController as demo\">\n\t //demo.label//\n\t</div>\n\t</file>\n\t<file name=\"protractor.js\" type=\"protractor\">\n\t it('should interpolate binding with custom symbols', function() {\n\t expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.');\n\t });\n\t</file>\n\t</example>\n\t */\n\tfunction $InterpolateProvider() {\n\t var startSymbol = '{{';\n\t var endSymbol = '}}';\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $interpolateProvider#startSymbol\n\t * @description\n\t * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.\n\t *\n\t * @param {string=} value new value to set the starting symbol to.\n\t * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n\t */\n\t this.startSymbol = function(value) {\n\t if (value) {\n\t startSymbol = value;\n\t return this;\n\t } else {\n\t return startSymbol;\n\t }\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $interpolateProvider#endSymbol\n\t * @description\n\t * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n\t *\n\t * @param {string=} value new value to set the ending symbol to.\n\t * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n\t */\n\t this.endSymbol = function(value) {\n\t if (value) {\n\t endSymbol = value;\n\t return this;\n\t } else {\n\t return endSymbol;\n\t }\n\t };\n\t\n\t\n\t this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) {\n\t var startSymbolLength = startSymbol.length,\n\t endSymbolLength = endSymbol.length,\n\t escapedStartRegexp = new RegExp(startSymbol.replace(/./g, escape), 'g'),\n\t escapedEndRegexp = new RegExp(endSymbol.replace(/./g, escape), 'g');\n\t\n\t function escape(ch) {\n\t return '\\\\\\\\\\\\' + ch;\n\t }\n\t\n\t function unescapeText(text) {\n\t return text.replace(escapedStartRegexp, startSymbol).\n\t replace(escapedEndRegexp, endSymbol);\n\t }\n\t\n\t function stringify(value) {\n\t if (value == null) { // null || undefined\n\t return '';\n\t }\n\t switch (typeof value) {\n\t case 'string':\n\t break;\n\t case 'number':\n\t value = '' + value;\n\t break;\n\t default:\n\t value = toJson(value);\n\t }\n\t\n\t return value;\n\t }\n\t\n\t /**\n\t * @ngdoc service\n\t * @name $interpolate\n\t * @kind function\n\t *\n\t * @requires $parse\n\t * @requires $sce\n\t *\n\t * @description\n\t *\n\t * Compiles a string with markup into an interpolation function. This service is used by the\n\t * HTML {@link ng.$compile $compile} service for data binding. See\n\t * {@link ng.$interpolateProvider $interpolateProvider} for configuring the\n\t * interpolation markup.\n\t *\n\t *\n\t * ```js\n\t * var $interpolate = ...; // injected\n\t * var exp = $interpolate('Hello {{name | uppercase}}!');\n\t * expect(exp({name:'Angular'})).toEqual('Hello ANGULAR!');\n\t * ```\n\t *\n\t * `$interpolate` takes an optional fourth argument, `allOrNothing`. If `allOrNothing` is\n\t * `true`, the interpolation function will return `undefined` unless all embedded expressions\n\t * evaluate to a value other than `undefined`.\n\t *\n\t * ```js\n\t * var $interpolate = ...; // injected\n\t * var context = {greeting: 'Hello', name: undefined };\n\t *\n\t * // default \"forgiving\" mode\n\t * var exp = $interpolate('{{greeting}} {{name}}!');\n\t * expect(exp(context)).toEqual('Hello !');\n\t *\n\t * // \"allOrNothing\" mode\n\t * exp = $interpolate('{{greeting}} {{name}}!', false, null, true);\n\t * expect(exp(context)).toBeUndefined();\n\t * context.name = 'Angular';\n\t * expect(exp(context)).toEqual('Hello Angular!');\n\t * ```\n\t *\n\t * `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior.\n\t *\n\t * ####Escaped Interpolation\n\t * $interpolate provides a mechanism for escaping interpolation markers. Start and end markers\n\t * can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash).\n\t * It will be rendered as a regular start/end marker, and will not be interpreted as an expression\n\t * or binding.\n\t *\n\t * This enables web-servers to prevent script injection attacks and defacing attacks, to some\n\t * degree, while also enabling code examples to work without relying on the\n\t * {@link ng.directive:ngNonBindable ngNonBindable} directive.\n\t *\n\t * **For security purposes, it is strongly encouraged that web servers escape user-supplied data,\n\t * replacing angle brackets (&lt;, &gt;) with &amp;lt; and &amp;gt; respectively, and replacing all\n\t * interpolation start/end markers with their escaped counterparts.**\n\t *\n\t * Escaped interpolation markers are only replaced with the actual interpolation markers in rendered\n\t * output when the $interpolate service processes the text. So, for HTML elements interpolated\n\t * by {@link ng.$compile $compile}, or otherwise interpolated with the `mustHaveExpression` parameter\n\t * set to `true`, the interpolated text must contain an unescaped interpolation expression. As such,\n\t * this is typically useful only when user-data is used in rendering a template from the server, or\n\t * when otherwise untrusted data is used by a directive.\n\t *\n\t * <example>\n\t * <file name=\"index.html\">\n\t * <div ng-init=\"username='A user'\">\n\t * <p ng-init=\"apptitle='Escaping demo'\">{{apptitle}}: \\{\\{ username = \"defaced value\"; \\}\\}\n\t * </p>\n\t * <p><strong>{{username}}</strong> attempts to inject code which will deface the\n\t * application, but fails to accomplish their task, because the server has correctly\n\t * escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash)\n\t * characters.</p>\n\t * <p>Instead, the result of the attempted script injection is visible, and can be removed\n\t * from the database by an administrator.</p>\n\t * </div>\n\t * </file>\n\t * </example>\n\t *\n\t * @knownIssue\n\t * It is currently not possible for an interpolated expression to contain the interpolation end\n\t * symbol. For example, `{{ '}}' }}` will be incorrectly interpreted as `{{ ' }}` + `' }}`, i.e.\n\t * an interpolated expression consisting of a single-quote (`'`) and the `' }}` string.\n\t *\n\t * @param {string} text The text with markup to interpolate.\n\t * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have\n\t * embedded expression in order to return an interpolation function. Strings with no\n\t * embedded expression will return null for the interpolation function.\n\t * @param {string=} trustedContext when provided, the returned function passes the interpolated\n\t * result through {@link ng.$sce#getTrusted $sce.getTrusted(interpolatedResult,\n\t * trustedContext)} before returning it. Refer to the {@link ng.$sce $sce} service that\n\t * provides Strict Contextual Escaping for details.\n\t * @param {boolean=} allOrNothing if `true`, then the returned function returns undefined\n\t * unless all embedded expressions evaluate to a value other than `undefined`.\n\t * @returns {function(context)} an interpolation function which is used to compute the\n\t * interpolated string. The function has these parameters:\n\t *\n\t * - `context`: evaluation context for all expressions embedded in the interpolated text\n\t */\n\t function $interpolate(text, mustHaveExpression, trustedContext, allOrNothing) {\n\t allOrNothing = !!allOrNothing;\n\t var startIndex,\n\t endIndex,\n\t index = 0,\n\t expressions = [],\n\t parseFns = [],\n\t textLength = text.length,\n\t exp,\n\t concat = [],\n\t expressionPositions = [];\n\t\n\t while (index < textLength) {\n\t if (((startIndex = text.indexOf(startSymbol, index)) != -1) &&\n\t ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) != -1)) {\n\t if (index !== startIndex) {\n\t concat.push(unescapeText(text.substring(index, startIndex)));\n\t }\n\t exp = text.substring(startIndex + startSymbolLength, endIndex);\n\t expressions.push(exp);\n\t parseFns.push($parse(exp, parseStringifyInterceptor));\n\t index = endIndex + endSymbolLength;\n\t expressionPositions.push(concat.length);\n\t concat.push('');\n\t } else {\n\t // we did not find an interpolation, so we have to add the remainder to the separators array\n\t if (index !== textLength) {\n\t concat.push(unescapeText(text.substring(index)));\n\t }\n\t break;\n\t }\n\t }\n\t\n\t // Concatenating expressions makes it hard to reason about whether some combination of\n\t // concatenated values are unsafe to use and could easily lead to XSS. By requiring that a\n\t // single expression be used for iframe[src], object[src], etc., we ensure that the value\n\t // that's used is assigned or constructed by some JS code somewhere that is more testable or\n\t // make it obvious that you bound the value to some user controlled value. This helps reduce\n\t // the load when auditing for XSS issues.\n\t if (trustedContext && concat.length > 1) {\n\t $interpolateMinErr.throwNoconcat(text);\n\t }\n\t\n\t if (!mustHaveExpression || expressions.length) {\n\t var compute = function(values) {\n\t for (var i = 0, ii = expressions.length; i < ii; i++) {\n\t if (allOrNothing && isUndefined(values[i])) return;\n\t concat[expressionPositions[i]] = values[i];\n\t }\n\t return concat.join('');\n\t };\n\t\n\t var getValue = function(value) {\n\t return trustedContext ?\n\t $sce.getTrusted(trustedContext, value) :\n\t $sce.valueOf(value);\n\t };\n\t\n\t return extend(function interpolationFn(context) {\n\t var i = 0;\n\t var ii = expressions.length;\n\t var values = new Array(ii);\n\t\n\t try {\n\t for (; i < ii; i++) {\n\t values[i] = parseFns[i](context);\n\t }\n\t\n\t return compute(values);\n\t } catch (err) {\n\t $exceptionHandler($interpolateMinErr.interr(text, err));\n\t }\n\t\n\t }, {\n\t // all of these properties are undocumented for now\n\t exp: text, //just for compatibility with regular watchers created via $watch\n\t expressions: expressions,\n\t $$watchDelegate: function(scope, listener) {\n\t var lastValue;\n\t return scope.$watchGroup(parseFns, function interpolateFnWatcher(values, oldValues) {\n\t var currValue = compute(values);\n\t if (isFunction(listener)) {\n\t listener.call(this, currValue, values !== oldValues ? lastValue : currValue, scope);\n\t }\n\t lastValue = currValue;\n\t });\n\t }\n\t });\n\t }\n\t\n\t function parseStringifyInterceptor(value) {\n\t try {\n\t value = getValue(value);\n\t return allOrNothing && !isDefined(value) ? value : stringify(value);\n\t } catch (err) {\n\t $exceptionHandler($interpolateMinErr.interr(text, err));\n\t }\n\t }\n\t }\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $interpolate#startSymbol\n\t * @description\n\t * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.\n\t *\n\t * Use {@link ng.$interpolateProvider#startSymbol `$interpolateProvider.startSymbol`} to change\n\t * the symbol.\n\t *\n\t * @returns {string} start symbol.\n\t */\n\t $interpolate.startSymbol = function() {\n\t return startSymbol;\n\t };\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $interpolate#endSymbol\n\t * @description\n\t * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n\t *\n\t * Use {@link ng.$interpolateProvider#endSymbol `$interpolateProvider.endSymbol`} to change\n\t * the symbol.\n\t *\n\t * @returns {string} end symbol.\n\t */\n\t $interpolate.endSymbol = function() {\n\t return endSymbol;\n\t };\n\t\n\t return $interpolate;\n\t }];\n\t}\n\t\n\tfunction $IntervalProvider() {\n\t this.$get = ['$rootScope', '$window', '$q', '$$q',\n\t function($rootScope, $window, $q, $$q) {\n\t var intervals = {};\n\t\n\t\n\t /**\n\t * @ngdoc service\n\t * @name $interval\n\t *\n\t * @description\n\t * Angular's wrapper for `window.setInterval`. The `fn` function is executed every `delay`\n\t * milliseconds.\n\t *\n\t * The return value of registering an interval function is a promise. This promise will be\n\t * notified upon each tick of the interval, and will be resolved after `count` iterations, or\n\t * run indefinitely if `count` is not defined. The value of the notification will be the\n\t * number of iterations that have run.\n\t * To cancel an interval, call `$interval.cancel(promise)`.\n\t *\n\t * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to\n\t * move forward by `millis` milliseconds and trigger any functions scheduled to run in that\n\t * time.\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * **Note**: Intervals created by this service must be explicitly destroyed when you are finished\n\t * with them. In particular they are not automatically destroyed when a controller's scope or a\n\t * directive's element are destroyed.\n\t * You should take this into consideration and make sure to always cancel the interval at the\n\t * appropriate moment. See the example below for more details on how and when to do this.\n\t * </div>\n\t *\n\t * @param {function()} fn A function that should be called repeatedly.\n\t * @param {number} delay Number of milliseconds between each function call.\n\t * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat\n\t * indefinitely.\n\t * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n\t * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n\t * @param {...*=} Pass additional parameters to the executed function.\n\t * @returns {promise} A promise which will be notified on each iteration.\n\t *\n\t * @example\n\t * <example module=\"intervalExample\">\n\t * <file name=\"index.html\">\n\t * <script>\n\t * angular.module('intervalExample', [])\n\t * .controller('ExampleController', ['$scope', '$interval',\n\t * function($scope, $interval) {\n\t * $scope.format = 'M/d/yy h:mm:ss a';\n\t * $scope.blood_1 = 100;\n\t * $scope.blood_2 = 120;\n\t *\n\t * var stop;\n\t * $scope.fight = function() {\n\t * // Don't start a new fight if we are already fighting\n\t * if ( angular.isDefined(stop) ) return;\n\t *\n\t * stop = $interval(function() {\n\t * if ($scope.blood_1 > 0 && $scope.blood_2 > 0) {\n\t * $scope.blood_1 = $scope.blood_1 - 3;\n\t * $scope.blood_2 = $scope.blood_2 - 4;\n\t * } else {\n\t * $scope.stopFight();\n\t * }\n\t * }, 100);\n\t * };\n\t *\n\t * $scope.stopFight = function() {\n\t * if (angular.isDefined(stop)) {\n\t * $interval.cancel(stop);\n\t * stop = undefined;\n\t * }\n\t * };\n\t *\n\t * $scope.resetFight = function() {\n\t * $scope.blood_1 = 100;\n\t * $scope.blood_2 = 120;\n\t * };\n\t *\n\t * $scope.$on('$destroy', function() {\n\t * // Make sure that the interval is destroyed too\n\t * $scope.stopFight();\n\t * });\n\t * }])\n\t * // Register the 'myCurrentTime' directive factory method.\n\t * // We inject $interval and dateFilter service since the factory method is DI.\n\t * .directive('myCurrentTime', ['$interval', 'dateFilter',\n\t * function($interval, dateFilter) {\n\t * // return the directive link function. (compile function not needed)\n\t * return function(scope, element, attrs) {\n\t * var format, // date format\n\t * stopTime; // so that we can cancel the time updates\n\t *\n\t * // used to update the UI\n\t * function updateTime() {\n\t * element.text(dateFilter(new Date(), format));\n\t * }\n\t *\n\t * // watch the expression, and update the UI on change.\n\t * scope.$watch(attrs.myCurrentTime, function(value) {\n\t * format = value;\n\t * updateTime();\n\t * });\n\t *\n\t * stopTime = $interval(updateTime, 1000);\n\t *\n\t * // listen on DOM destroy (removal) event, and cancel the next UI update\n\t * // to prevent updating time after the DOM element was removed.\n\t * element.on('$destroy', function() {\n\t * $interval.cancel(stopTime);\n\t * });\n\t * }\n\t * }]);\n\t * </script>\n\t *\n\t * <div>\n\t * <div ng-controller=\"ExampleController\">\n\t * <label>Date format: <input ng-model=\"format\"></label> <hr/>\n\t * Current time is: <span my-current-time=\"format\"></span>\n\t * <hr/>\n\t * Blood 1 : <font color='red'>{{blood_1}}</font>\n\t * Blood 2 : <font color='red'>{{blood_2}}</font>\n\t * <button type=\"button\" data-ng-click=\"fight()\">Fight</button>\n\t * <button type=\"button\" data-ng-click=\"stopFight()\">StopFight</button>\n\t * <button type=\"button\" data-ng-click=\"resetFight()\">resetFight</button>\n\t * </div>\n\t * </div>\n\t *\n\t * </file>\n\t * </example>\n\t */\n\t function interval(fn, delay, count, invokeApply) {\n\t var hasParams = arguments.length > 4,\n\t args = hasParams ? sliceArgs(arguments, 4) : [],\n\t setInterval = $window.setInterval,\n\t clearInterval = $window.clearInterval,\n\t iteration = 0,\n\t skipApply = (isDefined(invokeApply) && !invokeApply),\n\t deferred = (skipApply ? $$q : $q).defer(),\n\t promise = deferred.promise;\n\t\n\t count = isDefined(count) ? count : 0;\n\t\n\t promise.then(null, null, (!hasParams) ? fn : function() {\n\t fn.apply(null, args);\n\t });\n\t\n\t promise.$$intervalId = setInterval(function tick() {\n\t deferred.notify(iteration++);\n\t\n\t if (count > 0 && iteration >= count) {\n\t deferred.resolve(iteration);\n\t clearInterval(promise.$$intervalId);\n\t delete intervals[promise.$$intervalId];\n\t }\n\t\n\t if (!skipApply) $rootScope.$apply();\n\t\n\t }, delay);\n\t\n\t intervals[promise.$$intervalId] = deferred;\n\t\n\t return promise;\n\t }\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $interval#cancel\n\t *\n\t * @description\n\t * Cancels a task associated with the `promise`.\n\t *\n\t * @param {Promise=} promise returned by the `$interval` function.\n\t * @returns {boolean} Returns `true` if the task was successfully canceled.\n\t */\n\t interval.cancel = function(promise) {\n\t if (promise && promise.$$intervalId in intervals) {\n\t intervals[promise.$$intervalId].reject('canceled');\n\t $window.clearInterval(promise.$$intervalId);\n\t delete intervals[promise.$$intervalId];\n\t return true;\n\t }\n\t return false;\n\t };\n\t\n\t return interval;\n\t }];\n\t}\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $locale\n\t *\n\t * @description\n\t * $locale service provides localization rules for various Angular components. As of right now the\n\t * only public api is:\n\t *\n\t * * `id` `{string}` locale id formatted as `languageId-countryId` (e.g. `en-us`)\n\t */\n\t\n\tvar PATH_MATCH = /^([^\\?#]*)(\\?([^#]*))?(#(.*))?$/,\n\t DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};\n\tvar $locationMinErr = minErr('$location');\n\t\n\t\n\t/**\n\t * Encode path using encodeUriSegment, ignoring forward slashes\n\t *\n\t * @param {string} path Path to encode\n\t * @returns {string}\n\t */\n\tfunction encodePath(path) {\n\t var segments = path.split('/'),\n\t i = segments.length;\n\t\n\t while (i--) {\n\t segments[i] = encodeUriSegment(segments[i]);\n\t }\n\t\n\t return segments.join('/');\n\t}\n\t\n\tfunction parseAbsoluteUrl(absoluteUrl, locationObj) {\n\t var parsedUrl = urlResolve(absoluteUrl);\n\t\n\t locationObj.$$protocol = parsedUrl.protocol;\n\t locationObj.$$host = parsedUrl.hostname;\n\t locationObj.$$port = toInt(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null;\n\t}\n\t\n\t\n\tfunction parseAppUrl(relativeUrl, locationObj) {\n\t var prefixed = (relativeUrl.charAt(0) !== '/');\n\t if (prefixed) {\n\t relativeUrl = '/' + relativeUrl;\n\t }\n\t var match = urlResolve(relativeUrl);\n\t locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' ?\n\t match.pathname.substring(1) : match.pathname);\n\t locationObj.$$search = parseKeyValue(match.search);\n\t locationObj.$$hash = decodeURIComponent(match.hash);\n\t\n\t // make sure path starts with '/';\n\t if (locationObj.$$path && locationObj.$$path.charAt(0) != '/') {\n\t locationObj.$$path = '/' + locationObj.$$path;\n\t }\n\t}\n\t\n\t\n\t/**\n\t *\n\t * @param {string} begin\n\t * @param {string} whole\n\t * @returns {string} returns text from whole after begin or undefined if it does not begin with\n\t * expected string.\n\t */\n\tfunction beginsWith(begin, whole) {\n\t if (whole.indexOf(begin) === 0) {\n\t return whole.substr(begin.length);\n\t }\n\t}\n\t\n\t\n\tfunction stripHash(url) {\n\t var index = url.indexOf('#');\n\t return index == -1 ? url : url.substr(0, index);\n\t}\n\t\n\tfunction trimEmptyHash(url) {\n\t return url.replace(/(#.+)|#$/, '$1');\n\t}\n\t\n\t\n\tfunction stripFile(url) {\n\t return url.substr(0, stripHash(url).lastIndexOf('/') + 1);\n\t}\n\t\n\t/* return the server only (scheme://host:port) */\n\tfunction serverBase(url) {\n\t return url.substring(0, url.indexOf('/', url.indexOf('//') + 2));\n\t}\n\t\n\t\n\t/**\n\t * LocationHtml5Url represents an url\n\t * This object is exposed as $location service when HTML5 mode is enabled and supported\n\t *\n\t * @constructor\n\t * @param {string} appBase application base URL\n\t * @param {string} appBaseNoFile application base URL stripped of any filename\n\t * @param {string} basePrefix url path prefix\n\t */\n\tfunction LocationHtml5Url(appBase, appBaseNoFile, basePrefix) {\n\t this.$$html5 = true;\n\t basePrefix = basePrefix || '';\n\t parseAbsoluteUrl(appBase, this);\n\t\n\t\n\t /**\n\t * Parse given html5 (regular) url string into properties\n\t * @param {string} url HTML5 url\n\t * @private\n\t */\n\t this.$$parse = function(url) {\n\t var pathUrl = beginsWith(appBaseNoFile, url);\n\t if (!isString(pathUrl)) {\n\t throw $locationMinErr('ipthprfx', 'Invalid url \"{0}\", missing path prefix \"{1}\".', url,\n\t appBaseNoFile);\n\t }\n\t\n\t parseAppUrl(pathUrl, this);\n\t\n\t if (!this.$$path) {\n\t this.$$path = '/';\n\t }\n\t\n\t this.$$compose();\n\t };\n\t\n\t /**\n\t * Compose url and update `absUrl` property\n\t * @private\n\t */\n\t this.$$compose = function() {\n\t var search = toKeyValue(this.$$search),\n\t hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\t\n\t this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n\t this.$$absUrl = appBaseNoFile + this.$$url.substr(1); // first char is always '/'\n\t };\n\t\n\t this.$$parseLinkUrl = function(url, relHref) {\n\t if (relHref && relHref[0] === '#') {\n\t // special case for links to hash fragments:\n\t // keep the old url and only replace the hash fragment\n\t this.hash(relHref.slice(1));\n\t return true;\n\t }\n\t var appUrl, prevAppUrl;\n\t var rewrittenUrl;\n\t\n\t if (isDefined(appUrl = beginsWith(appBase, url))) {\n\t prevAppUrl = appUrl;\n\t if (isDefined(appUrl = beginsWith(basePrefix, appUrl))) {\n\t rewrittenUrl = appBaseNoFile + (beginsWith('/', appUrl) || appUrl);\n\t } else {\n\t rewrittenUrl = appBase + prevAppUrl;\n\t }\n\t } else if (isDefined(appUrl = beginsWith(appBaseNoFile, url))) {\n\t rewrittenUrl = appBaseNoFile + appUrl;\n\t } else if (appBaseNoFile == url + '/') {\n\t rewrittenUrl = appBaseNoFile;\n\t }\n\t if (rewrittenUrl) {\n\t this.$$parse(rewrittenUrl);\n\t }\n\t return !!rewrittenUrl;\n\t };\n\t}\n\t\n\t\n\t/**\n\t * LocationHashbangUrl represents url\n\t * This object is exposed as $location service when developer doesn't opt into html5 mode.\n\t * It also serves as the base class for html5 mode fallback on legacy browsers.\n\t *\n\t * @constructor\n\t * @param {string} appBase application base URL\n\t * @param {string} appBaseNoFile application base URL stripped of any filename\n\t * @param {string} hashPrefix hashbang prefix\n\t */\n\tfunction LocationHashbangUrl(appBase, appBaseNoFile, hashPrefix) {\n\t\n\t parseAbsoluteUrl(appBase, this);\n\t\n\t\n\t /**\n\t * Parse given hashbang url into properties\n\t * @param {string} url Hashbang url\n\t * @private\n\t */\n\t this.$$parse = function(url) {\n\t var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url);\n\t var withoutHashUrl;\n\t\n\t if (!isUndefined(withoutBaseUrl) && withoutBaseUrl.charAt(0) === '#') {\n\t\n\t // The rest of the url starts with a hash so we have\n\t // got either a hashbang path or a plain hash fragment\n\t withoutHashUrl = beginsWith(hashPrefix, withoutBaseUrl);\n\t if (isUndefined(withoutHashUrl)) {\n\t // There was no hashbang prefix so we just have a hash fragment\n\t withoutHashUrl = withoutBaseUrl;\n\t }\n\t\n\t } else {\n\t // There was no hashbang path nor hash fragment:\n\t // If we are in HTML5 mode we use what is left as the path;\n\t // Otherwise we ignore what is left\n\t if (this.$$html5) {\n\t withoutHashUrl = withoutBaseUrl;\n\t } else {\n\t withoutHashUrl = '';\n\t if (isUndefined(withoutBaseUrl)) {\n\t appBase = url;\n\t this.replace();\n\t }\n\t }\n\t }\n\t\n\t parseAppUrl(withoutHashUrl, this);\n\t\n\t this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase);\n\t\n\t this.$$compose();\n\t\n\t /*\n\t * In Windows, on an anchor node on documents loaded from\n\t * the filesystem, the browser will return a pathname\n\t * prefixed with the drive name ('/C:/path') when a\n\t * pathname without a drive is set:\n\t * * a.setAttribute('href', '/foo')\n\t * * a.pathname === '/C:/foo' //true\n\t *\n\t * Inside of Angular, we're always using pathnames that\n\t * do not include drive names for routing.\n\t */\n\t function removeWindowsDriveName(path, url, base) {\n\t /*\n\t Matches paths for file protocol on windows,\n\t such as /C:/foo/bar, and captures only /foo/bar.\n\t */\n\t var windowsFilePathExp = /^\\/[A-Z]:(\\/.*)/;\n\t\n\t var firstPathSegmentMatch;\n\t\n\t //Get the relative path from the input URL.\n\t if (url.indexOf(base) === 0) {\n\t url = url.replace(base, '');\n\t }\n\t\n\t // The input URL intentionally contains a first path segment that ends with a colon.\n\t if (windowsFilePathExp.exec(url)) {\n\t return path;\n\t }\n\t\n\t firstPathSegmentMatch = windowsFilePathExp.exec(path);\n\t return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path;\n\t }\n\t };\n\t\n\t /**\n\t * Compose hashbang url and update `absUrl` property\n\t * @private\n\t */\n\t this.$$compose = function() {\n\t var search = toKeyValue(this.$$search),\n\t hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\t\n\t this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n\t this.$$absUrl = appBase + (this.$$url ? hashPrefix + this.$$url : '');\n\t };\n\t\n\t this.$$parseLinkUrl = function(url, relHref) {\n\t if (stripHash(appBase) == stripHash(url)) {\n\t this.$$parse(url);\n\t return true;\n\t }\n\t return false;\n\t };\n\t}\n\t\n\t\n\t/**\n\t * LocationHashbangUrl represents url\n\t * This object is exposed as $location service when html5 history api is enabled but the browser\n\t * does not support it.\n\t *\n\t * @constructor\n\t * @param {string} appBase application base URL\n\t * @param {string} appBaseNoFile application base URL stripped of any filename\n\t * @param {string} hashPrefix hashbang prefix\n\t */\n\tfunction LocationHashbangInHtml5Url(appBase, appBaseNoFile, hashPrefix) {\n\t this.$$html5 = true;\n\t LocationHashbangUrl.apply(this, arguments);\n\t\n\t this.$$parseLinkUrl = function(url, relHref) {\n\t if (relHref && relHref[0] === '#') {\n\t // special case for links to hash fragments:\n\t // keep the old url and only replace the hash fragment\n\t this.hash(relHref.slice(1));\n\t return true;\n\t }\n\t\n\t var rewrittenUrl;\n\t var appUrl;\n\t\n\t if (appBase == stripHash(url)) {\n\t rewrittenUrl = url;\n\t } else if ((appUrl = beginsWith(appBaseNoFile, url))) {\n\t rewrittenUrl = appBase + hashPrefix + appUrl;\n\t } else if (appBaseNoFile === url + '/') {\n\t rewrittenUrl = appBaseNoFile;\n\t }\n\t if (rewrittenUrl) {\n\t this.$$parse(rewrittenUrl);\n\t }\n\t return !!rewrittenUrl;\n\t };\n\t\n\t this.$$compose = function() {\n\t var search = toKeyValue(this.$$search),\n\t hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\t\n\t this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n\t // include hashPrefix in $$absUrl when $$url is empty so IE9 does not reload page because of removal of '#'\n\t this.$$absUrl = appBase + hashPrefix + this.$$url;\n\t };\n\t\n\t}\n\t\n\t\n\tvar locationPrototype = {\n\t\n\t /**\n\t * Are we in html5 mode?\n\t * @private\n\t */\n\t $$html5: false,\n\t\n\t /**\n\t * Has any change been replacing?\n\t * @private\n\t */\n\t $$replace: false,\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $location#absUrl\n\t *\n\t * @description\n\t * This method is getter only.\n\t *\n\t * Return full url representation with all segments encoded according to rules specified in\n\t * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt).\n\t *\n\t *\n\t * ```js\n\t * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n\t * var absUrl = $location.absUrl();\n\t * // => \"http://example.com/#/some/path?foo=bar&baz=xoxo\"\n\t * ```\n\t *\n\t * @return {string} full url\n\t */\n\t absUrl: locationGetter('$$absUrl'),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $location#url\n\t *\n\t * @description\n\t * This method is getter / setter.\n\t *\n\t * Return url (e.g. `/path?a=b#hash`) when called without any parameter.\n\t *\n\t * Change path, search and hash, when called with parameter and return `$location`.\n\t *\n\t *\n\t * ```js\n\t * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n\t * var url = $location.url();\n\t * // => \"/some/path?foo=bar&baz=xoxo\"\n\t * ```\n\t *\n\t * @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`)\n\t * @return {string} url\n\t */\n\t url: function(url) {\n\t if (isUndefined(url)) {\n\t return this.$$url;\n\t }\n\t\n\t var match = PATH_MATCH.exec(url);\n\t if (match[1] || url === '') this.path(decodeURIComponent(match[1]));\n\t if (match[2] || match[1] || url === '') this.search(match[3] || '');\n\t this.hash(match[5] || '');\n\t\n\t return this;\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $location#protocol\n\t *\n\t * @description\n\t * This method is getter only.\n\t *\n\t * Return protocol of current url.\n\t *\n\t *\n\t * ```js\n\t * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n\t * var protocol = $location.protocol();\n\t * // => \"http\"\n\t * ```\n\t *\n\t * @return {string} protocol of current url\n\t */\n\t protocol: locationGetter('$$protocol'),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $location#host\n\t *\n\t * @description\n\t * This method is getter only.\n\t *\n\t * Return host of current url.\n\t *\n\t * Note: compared to the non-angular version `location.host` which returns `hostname:port`, this returns the `hostname` portion only.\n\t *\n\t *\n\t * ```js\n\t * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n\t * var host = $location.host();\n\t * // => \"example.com\"\n\t *\n\t * // given url http://user:password@example.com:8080/#/some/path?foo=bar&baz=xoxo\n\t * host = $location.host();\n\t * // => \"example.com\"\n\t * host = location.host;\n\t * // => \"example.com:8080\"\n\t * ```\n\t *\n\t * @return {string} host of current url.\n\t */\n\t host: locationGetter('$$host'),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $location#port\n\t *\n\t * @description\n\t * This method is getter only.\n\t *\n\t * Return port of current url.\n\t *\n\t *\n\t * ```js\n\t * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n\t * var port = $location.port();\n\t * // => 80\n\t * ```\n\t *\n\t * @return {Number} port\n\t */\n\t port: locationGetter('$$port'),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $location#path\n\t *\n\t * @description\n\t * This method is getter / setter.\n\t *\n\t * Return path of current url when called without any parameter.\n\t *\n\t * Change path when called with parameter and return `$location`.\n\t *\n\t * Note: Path should always begin with forward slash (/), this method will add the forward slash\n\t * if it is missing.\n\t *\n\t *\n\t * ```js\n\t * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n\t * var path = $location.path();\n\t * // => \"/some/path\"\n\t * ```\n\t *\n\t * @param {(string|number)=} path New path\n\t * @return {(string|object)} path if called with no parameters, or `$location` if called with a parameter\n\t */\n\t path: locationGetterSetter('$$path', function(path) {\n\t path = path !== null ? path.toString() : '';\n\t return path.charAt(0) == '/' ? path : '/' + path;\n\t }),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $location#search\n\t *\n\t * @description\n\t * This method is getter / setter.\n\t *\n\t * Return search part (as object) of current url when called without any parameter.\n\t *\n\t * Change search part when called with parameter and return `$location`.\n\t *\n\t *\n\t * ```js\n\t * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n\t * var searchObject = $location.search();\n\t * // => {foo: 'bar', baz: 'xoxo'}\n\t *\n\t * // set foo to 'yipee'\n\t * $location.search('foo', 'yipee');\n\t * // $location.search() => {foo: 'yipee', baz: 'xoxo'}\n\t * ```\n\t *\n\t * @param {string|Object.<string>|Object.<Array.<string>>} search New search params - string or\n\t * hash object.\n\t *\n\t * When called with a single argument the method acts as a setter, setting the `search` component\n\t * of `$location` to the specified value.\n\t *\n\t * If the argument is a hash object containing an array of values, these values will be encoded\n\t * as duplicate search parameters in the url.\n\t *\n\t * @param {(string|Number|Array<string>|boolean)=} paramValue If `search` is a string or number, then `paramValue`\n\t * will override only a single search property.\n\t *\n\t * If `paramValue` is an array, it will override the property of the `search` component of\n\t * `$location` specified via the first argument.\n\t *\n\t * If `paramValue` is `null`, the property specified via the first argument will be deleted.\n\t *\n\t * If `paramValue` is `true`, the property specified via the first argument will be added with no\n\t * value nor trailing equal sign.\n\t *\n\t * @return {Object} If called with no arguments returns the parsed `search` object. If called with\n\t * one or more arguments returns `$location` object itself.\n\t */\n\t search: function(search, paramValue) {\n\t switch (arguments.length) {\n\t case 0:\n\t return this.$$search;\n\t case 1:\n\t if (isString(search) || isNumber(search)) {\n\t search = search.toString();\n\t this.$$search = parseKeyValue(search);\n\t } else if (isObject(search)) {\n\t search = copy(search, {});\n\t // remove object undefined or null properties\n\t forEach(search, function(value, key) {\n\t if (value == null) delete search[key];\n\t });\n\t\n\t this.$$search = search;\n\t } else {\n\t throw $locationMinErr('isrcharg',\n\t 'The first argument of the `$location#search()` call must be a string or an object.');\n\t }\n\t break;\n\t default:\n\t if (isUndefined(paramValue) || paramValue === null) {\n\t delete this.$$search[search];\n\t } else {\n\t this.$$search[search] = paramValue;\n\t }\n\t }\n\t\n\t this.$$compose();\n\t return this;\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $location#hash\n\t *\n\t * @description\n\t * This method is getter / setter.\n\t *\n\t * Returns the hash fragment when called without any parameters.\n\t *\n\t * Changes the hash fragment when called with a parameter and returns `$location`.\n\t *\n\t *\n\t * ```js\n\t * // given url http://example.com/#/some/path?foo=bar&baz=xoxo#hashValue\n\t * var hash = $location.hash();\n\t * // => \"hashValue\"\n\t * ```\n\t *\n\t * @param {(string|number)=} hash New hash fragment\n\t * @return {string} hash\n\t */\n\t hash: locationGetterSetter('$$hash', function(hash) {\n\t return hash !== null ? hash.toString() : '';\n\t }),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $location#replace\n\t *\n\t * @description\n\t * If called, all changes to $location during the current `$digest` will replace the current history\n\t * record, instead of adding a new one.\n\t */\n\t replace: function() {\n\t this.$$replace = true;\n\t return this;\n\t }\n\t};\n\t\n\tforEach([LocationHashbangInHtml5Url, LocationHashbangUrl, LocationHtml5Url], function(Location) {\n\t Location.prototype = Object.create(locationPrototype);\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $location#state\n\t *\n\t * @description\n\t * This method is getter / setter.\n\t *\n\t * Return the history state object when called without any parameter.\n\t *\n\t * Change the history state object when called with one parameter and return `$location`.\n\t * The state object is later passed to `pushState` or `replaceState`.\n\t *\n\t * NOTE: This method is supported only in HTML5 mode and only in browsers supporting\n\t * the HTML5 History API (i.e. methods `pushState` and `replaceState`). If you need to support\n\t * older browsers (like IE9 or Android < 4.0), don't use this method.\n\t *\n\t * @param {object=} state State object for pushState or replaceState\n\t * @return {object} state\n\t */\n\t Location.prototype.state = function(state) {\n\t if (!arguments.length) {\n\t return this.$$state;\n\t }\n\t\n\t if (Location !== LocationHtml5Url || !this.$$html5) {\n\t throw $locationMinErr('nostate', 'History API state support is available only ' +\n\t 'in HTML5 mode and only in browsers supporting HTML5 History API');\n\t }\n\t // The user might modify `stateObject` after invoking `$location.state(stateObject)`\n\t // but we're changing the $$state reference to $browser.state() during the $digest\n\t // so the modification window is narrow.\n\t this.$$state = isUndefined(state) ? null : state;\n\t\n\t return this;\n\t };\n\t});\n\t\n\t\n\tfunction locationGetter(property) {\n\t return function() {\n\t return this[property];\n\t };\n\t}\n\t\n\t\n\tfunction locationGetterSetter(property, preprocess) {\n\t return function(value) {\n\t if (isUndefined(value)) {\n\t return this[property];\n\t }\n\t\n\t this[property] = preprocess(value);\n\t this.$$compose();\n\t\n\t return this;\n\t };\n\t}\n\t\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $location\n\t *\n\t * @requires $rootElement\n\t *\n\t * @description\n\t * The $location service parses the URL in the browser address bar (based on the\n\t * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL\n\t * available to your application. Changes to the URL in the address bar are reflected into\n\t * $location service and changes to $location are reflected into the browser address bar.\n\t *\n\t * **The $location service:**\n\t *\n\t * - Exposes the current URL in the browser address bar, so you can\n\t * - Watch and observe the URL.\n\t * - Change the URL.\n\t * - Synchronizes the URL with the browser when the user\n\t * - Changes the address bar.\n\t * - Clicks the back or forward button (or clicks a History link).\n\t * - Clicks on a link.\n\t * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).\n\t *\n\t * For more information see {@link guide/$location Developer Guide: Using $location}\n\t */\n\t\n\t/**\n\t * @ngdoc provider\n\t * @name $locationProvider\n\t * @description\n\t * Use the `$locationProvider` to configure how the application deep linking paths are stored.\n\t */\n\tfunction $LocationProvider() {\n\t var hashPrefix = '',\n\t html5Mode = {\n\t enabled: false,\n\t requireBase: true,\n\t rewriteLinks: true\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $locationProvider#hashPrefix\n\t * @description\n\t * @param {string=} prefix Prefix for hash part (containing path and search)\n\t * @returns {*} current value if used as getter or itself (chaining) if used as setter\n\t */\n\t this.hashPrefix = function(prefix) {\n\t if (isDefined(prefix)) {\n\t hashPrefix = prefix;\n\t return this;\n\t } else {\n\t return hashPrefix;\n\t }\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $locationProvider#html5Mode\n\t * @description\n\t * @param {(boolean|Object)=} mode If boolean, sets `html5Mode.enabled` to value.\n\t * If object, sets `enabled`, `requireBase` and `rewriteLinks` to respective values. Supported\n\t * properties:\n\t * - **enabled** `{boolean}` (default: false) If true, will rely on `history.pushState` to\n\t * change urls where supported. Will fall back to hash-prefixed paths in browsers that do not\n\t * support `pushState`.\n\t * - **requireBase** - `{boolean}` - (default: `true`) When html5Mode is enabled, specifies\n\t * whether or not a <base> tag is required to be present. If `enabled` and `requireBase` are\n\t * true, and a base tag is not present, an error will be thrown when `$location` is injected.\n\t * See the {@link guide/$location $location guide for more information}\n\t * - **rewriteLinks** - `{boolean}` - (default: `true`) When html5Mode is enabled,\n\t * enables/disables url rewriting for relative links.\n\t *\n\t * @returns {Object} html5Mode object if used as getter or itself (chaining) if used as setter\n\t */\n\t this.html5Mode = function(mode) {\n\t if (isBoolean(mode)) {\n\t html5Mode.enabled = mode;\n\t return this;\n\t } else if (isObject(mode)) {\n\t\n\t if (isBoolean(mode.enabled)) {\n\t html5Mode.enabled = mode.enabled;\n\t }\n\t\n\t if (isBoolean(mode.requireBase)) {\n\t html5Mode.requireBase = mode.requireBase;\n\t }\n\t\n\t if (isBoolean(mode.rewriteLinks)) {\n\t html5Mode.rewriteLinks = mode.rewriteLinks;\n\t }\n\t\n\t return this;\n\t } else {\n\t return html5Mode;\n\t }\n\t };\n\t\n\t /**\n\t * @ngdoc event\n\t * @name $location#$locationChangeStart\n\t * @eventType broadcast on root scope\n\t * @description\n\t * Broadcasted before a URL will change.\n\t *\n\t * This change can be prevented by calling\n\t * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more\n\t * details about event object. Upon successful change\n\t * {@link ng.$location#$locationChangeSuccess $locationChangeSuccess} is fired.\n\t *\n\t * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when\n\t * the browser supports the HTML5 History API.\n\t *\n\t * @param {Object} angularEvent Synthetic event object.\n\t * @param {string} newUrl New URL\n\t * @param {string=} oldUrl URL that was before it was changed.\n\t * @param {string=} newState New history state object\n\t * @param {string=} oldState History state object that was before it was changed.\n\t */\n\t\n\t /**\n\t * @ngdoc event\n\t * @name $location#$locationChangeSuccess\n\t * @eventType broadcast on root scope\n\t * @description\n\t * Broadcasted after a URL was changed.\n\t *\n\t * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when\n\t * the browser supports the HTML5 History API.\n\t *\n\t * @param {Object} angularEvent Synthetic event object.\n\t * @param {string} newUrl New URL\n\t * @param {string=} oldUrl URL that was before it was changed.\n\t * @param {string=} newState New history state object\n\t * @param {string=} oldState History state object that was before it was changed.\n\t */\n\t\n\t this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement', '$window',\n\t function($rootScope, $browser, $sniffer, $rootElement, $window) {\n\t var $location,\n\t LocationMode,\n\t baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to ''\n\t initialUrl = $browser.url(),\n\t appBase;\n\t\n\t if (html5Mode.enabled) {\n\t if (!baseHref && html5Mode.requireBase) {\n\t throw $locationMinErr('nobase',\n\t \"$location in HTML5 mode requires a <base> tag to be present!\");\n\t }\n\t appBase = serverBase(initialUrl) + (baseHref || '/');\n\t LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url;\n\t } else {\n\t appBase = stripHash(initialUrl);\n\t LocationMode = LocationHashbangUrl;\n\t }\n\t var appBaseNoFile = stripFile(appBase);\n\t\n\t $location = new LocationMode(appBase, appBaseNoFile, '#' + hashPrefix);\n\t $location.$$parseLinkUrl(initialUrl, initialUrl);\n\t\n\t $location.$$state = $browser.state();\n\t\n\t var IGNORE_URI_REGEXP = /^\\s*(javascript|mailto):/i;\n\t\n\t function setBrowserUrlWithFallback(url, replace, state) {\n\t var oldUrl = $location.url();\n\t var oldState = $location.$$state;\n\t try {\n\t $browser.url(url, replace, state);\n\t\n\t // Make sure $location.state() returns referentially identical (not just deeply equal)\n\t // state object; this makes possible quick checking if the state changed in the digest\n\t // loop. Checking deep equality would be too expensive.\n\t $location.$$state = $browser.state();\n\t } catch (e) {\n\t // Restore old values if pushState fails\n\t $location.url(oldUrl);\n\t $location.$$state = oldState;\n\t\n\t throw e;\n\t }\n\t }\n\t\n\t $rootElement.on('click', function(event) {\n\t // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)\n\t // currently we open nice url link and redirect then\n\t\n\t if (!html5Mode.rewriteLinks || event.ctrlKey || event.metaKey || event.shiftKey || event.which == 2 || event.button == 2) return;\n\t\n\t var elm = jqLite(event.target);\n\t\n\t // traverse the DOM up to find first A tag\n\t while (nodeName_(elm[0]) !== 'a') {\n\t // ignore rewriting if no A tag (reached root element, or no parent - removed from document)\n\t if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return;\n\t }\n\t\n\t var absHref = elm.prop('href');\n\t // get the actual href attribute - see\n\t // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx\n\t var relHref = elm.attr('href') || elm.attr('xlink:href');\n\t\n\t if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') {\n\t // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during\n\t // an animation.\n\t absHref = urlResolve(absHref.animVal).href;\n\t }\n\t\n\t // Ignore when url is started with javascript: or mailto:\n\t if (IGNORE_URI_REGEXP.test(absHref)) return;\n\t\n\t if (absHref && !elm.attr('target') && !event.isDefaultPrevented()) {\n\t if ($location.$$parseLinkUrl(absHref, relHref)) {\n\t // We do a preventDefault for all urls that are part of the angular application,\n\t // in html5mode and also without, so that we are able to abort navigation without\n\t // getting double entries in the location history.\n\t event.preventDefault();\n\t // update location manually\n\t if ($location.absUrl() != $browser.url()) {\n\t $rootScope.$apply();\n\t // hack to work around FF6 bug 684208 when scenario runner clicks on links\n\t $window.angular['ff-684208-preventDefault'] = true;\n\t }\n\t }\n\t }\n\t });\n\t\n\t\n\t // rewrite hashbang url <> html5 url\n\t if (trimEmptyHash($location.absUrl()) != trimEmptyHash(initialUrl)) {\n\t $browser.url($location.absUrl(), true);\n\t }\n\t\n\t var initializing = true;\n\t\n\t // update $location when $browser url changes\n\t $browser.onUrlChange(function(newUrl, newState) {\n\t\n\t if (isUndefined(beginsWith(appBaseNoFile, newUrl))) {\n\t // If we are navigating outside of the app then force a reload\n\t $window.location.href = newUrl;\n\t return;\n\t }\n\t\n\t $rootScope.$evalAsync(function() {\n\t var oldUrl = $location.absUrl();\n\t var oldState = $location.$$state;\n\t var defaultPrevented;\n\t newUrl = trimEmptyHash(newUrl);\n\t $location.$$parse(newUrl);\n\t $location.$$state = newState;\n\t\n\t defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,\n\t newState, oldState).defaultPrevented;\n\t\n\t // if the location was changed by a `$locationChangeStart` handler then stop\n\t // processing this location change\n\t if ($location.absUrl() !== newUrl) return;\n\t\n\t if (defaultPrevented) {\n\t $location.$$parse(oldUrl);\n\t $location.$$state = oldState;\n\t setBrowserUrlWithFallback(oldUrl, false, oldState);\n\t } else {\n\t initializing = false;\n\t afterLocationChange(oldUrl, oldState);\n\t }\n\t });\n\t if (!$rootScope.$$phase) $rootScope.$digest();\n\t });\n\t\n\t // update browser\n\t $rootScope.$watch(function $locationWatch() {\n\t var oldUrl = trimEmptyHash($browser.url());\n\t var newUrl = trimEmptyHash($location.absUrl());\n\t var oldState = $browser.state();\n\t var currentReplace = $location.$$replace;\n\t var urlOrStateChanged = oldUrl !== newUrl ||\n\t ($location.$$html5 && $sniffer.history && oldState !== $location.$$state);\n\t\n\t if (initializing || urlOrStateChanged) {\n\t initializing = false;\n\t\n\t $rootScope.$evalAsync(function() {\n\t var newUrl = $location.absUrl();\n\t var defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,\n\t $location.$$state, oldState).defaultPrevented;\n\t\n\t // if the location was changed by a `$locationChangeStart` handler then stop\n\t // processing this location change\n\t if ($location.absUrl() !== newUrl) return;\n\t\n\t if (defaultPrevented) {\n\t $location.$$parse(oldUrl);\n\t $location.$$state = oldState;\n\t } else {\n\t if (urlOrStateChanged) {\n\t setBrowserUrlWithFallback(newUrl, currentReplace,\n\t oldState === $location.$$state ? null : $location.$$state);\n\t }\n\t afterLocationChange(oldUrl, oldState);\n\t }\n\t });\n\t }\n\t\n\t $location.$$replace = false;\n\t\n\t // we don't need to return anything because $evalAsync will make the digest loop dirty when\n\t // there is a change\n\t });\n\t\n\t return $location;\n\t\n\t function afterLocationChange(oldUrl, oldState) {\n\t $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl,\n\t $location.$$state, oldState);\n\t }\n\t}];\n\t}\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $log\n\t * @requires $window\n\t *\n\t * @description\n\t * Simple service for logging. Default implementation safely writes the message\n\t * into the browser's console (if present).\n\t *\n\t * The main purpose of this service is to simplify debugging and troubleshooting.\n\t *\n\t * The default is to log `debug` messages. You can use\n\t * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this.\n\t *\n\t * @example\n\t <example module=\"logExample\">\n\t <file name=\"script.js\">\n\t angular.module('logExample', [])\n\t .controller('LogController', ['$scope', '$log', function($scope, $log) {\n\t $scope.$log = $log;\n\t $scope.message = 'Hello World!';\n\t }]);\n\t </file>\n\t <file name=\"index.html\">\n\t <div ng-controller=\"LogController\">\n\t <p>Reload this page with open console, enter text and hit the log button...</p>\n\t <label>Message:\n\t <input type=\"text\" ng-model=\"message\" /></label>\n\t <button ng-click=\"$log.log(message)\">log</button>\n\t <button ng-click=\"$log.warn(message)\">warn</button>\n\t <button ng-click=\"$log.info(message)\">info</button>\n\t <button ng-click=\"$log.error(message)\">error</button>\n\t <button ng-click=\"$log.debug(message)\">debug</button>\n\t </div>\n\t </file>\n\t </example>\n\t */\n\t\n\t/**\n\t * @ngdoc provider\n\t * @name $logProvider\n\t * @description\n\t * Use the `$logProvider` to configure how the application logs messages\n\t */\n\tfunction $LogProvider() {\n\t var debug = true,\n\t self = this;\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $logProvider#debugEnabled\n\t * @description\n\t * @param {boolean=} flag enable or disable debug level messages\n\t * @returns {*} current value if used as getter or itself (chaining) if used as setter\n\t */\n\t this.debugEnabled = function(flag) {\n\t if (isDefined(flag)) {\n\t debug = flag;\n\t return this;\n\t } else {\n\t return debug;\n\t }\n\t };\n\t\n\t this.$get = ['$window', function($window) {\n\t return {\n\t /**\n\t * @ngdoc method\n\t * @name $log#log\n\t *\n\t * @description\n\t * Write a log message\n\t */\n\t log: consoleLog('log'),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $log#info\n\t *\n\t * @description\n\t * Write an information message\n\t */\n\t info: consoleLog('info'),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $log#warn\n\t *\n\t * @description\n\t * Write a warning message\n\t */\n\t warn: consoleLog('warn'),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $log#error\n\t *\n\t * @description\n\t * Write an error message\n\t */\n\t error: consoleLog('error'),\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $log#debug\n\t *\n\t * @description\n\t * Write a debug message\n\t */\n\t debug: (function() {\n\t var fn = consoleLog('debug');\n\t\n\t return function() {\n\t if (debug) {\n\t fn.apply(self, arguments);\n\t }\n\t };\n\t }())\n\t };\n\t\n\t function formatError(arg) {\n\t if (arg instanceof Error) {\n\t if (arg.stack) {\n\t arg = (arg.message && arg.stack.indexOf(arg.message) === -1)\n\t ? 'Error: ' + arg.message + '\\n' + arg.stack\n\t : arg.stack;\n\t } else if (arg.sourceURL) {\n\t arg = arg.message + '\\n' + arg.sourceURL + ':' + arg.line;\n\t }\n\t }\n\t return arg;\n\t }\n\t\n\t function consoleLog(type) {\n\t var console = $window.console || {},\n\t logFn = console[type] || console.log || noop,\n\t hasApply = false;\n\t\n\t // Note: reading logFn.apply throws an error in IE11 in IE8 document mode.\n\t // The reason behind this is that console.log has type \"object\" in IE8...\n\t try {\n\t hasApply = !!logFn.apply;\n\t } catch (e) {}\n\t\n\t if (hasApply) {\n\t return function() {\n\t var args = [];\n\t forEach(arguments, function(arg) {\n\t args.push(formatError(arg));\n\t });\n\t return logFn.apply(console, args);\n\t };\n\t }\n\t\n\t // we are IE which either doesn't have window.console => this is noop and we do nothing,\n\t // or we are IE where console.log doesn't have apply so we log at least first 2 args\n\t return function(arg1, arg2) {\n\t logFn(arg1, arg2 == null ? '' : arg2);\n\t };\n\t }\n\t }];\n\t}\n\t\n\t/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\t * Any commits to this file should be reviewed with security in mind. *\n\t * Changes to this file can potentially create security vulnerabilities. *\n\t * An approval from 2 Core members with history of modifying *\n\t * this file is required. *\n\t * *\n\t * Does the change somehow allow for arbitrary javascript to be executed? *\n\t * Or allows for someone to change the prototype of built-in objects? *\n\t * Or gives undesired access to variables likes document or window? *\n\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\t\n\tvar $parseMinErr = minErr('$parse');\n\t\n\t// Sandboxing Angular Expressions\n\t// ------------------------------\n\t// Angular expressions are generally considered safe because these expressions only have direct\n\t// access to `$scope` and locals. However, one can obtain the ability to execute arbitrary JS code by\n\t// obtaining a reference to native JS functions such as the Function constructor.\n\t//\n\t// As an example, consider the following Angular expression:\n\t//\n\t// {}.toString.constructor('alert(\"evil JS code\")')\n\t//\n\t// This sandboxing technique is not perfect and doesn't aim to be. The goal is to prevent exploits\n\t// against the expression language, but not to prevent exploits that were enabled by exposing\n\t// sensitive JavaScript or browser APIs on Scope. Exposing such objects on a Scope is never a good\n\t// practice and therefore we are not even trying to protect against interaction with an object\n\t// explicitly exposed in this way.\n\t//\n\t// In general, it is not possible to access a Window object from an angular expression unless a\n\t// window or some DOM object that has a reference to window is published onto a Scope.\n\t// Similarly we prevent invocations of function known to be dangerous, as well as assignments to\n\t// native objects.\n\t//\n\t// See https://docs.angularjs.org/guide/security\n\t\n\t\n\tfunction ensureSafeMemberName(name, fullExpression) {\n\t if (name === \"__defineGetter__\" || name === \"__defineSetter__\"\n\t || name === \"__lookupGetter__\" || name === \"__lookupSetter__\"\n\t || name === \"__proto__\") {\n\t throw $parseMinErr('isecfld',\n\t 'Attempting to access a disallowed field in Angular expressions! '\n\t + 'Expression: {0}', fullExpression);\n\t }\n\t return name;\n\t}\n\t\n\tfunction getStringValue(name, fullExpression) {\n\t // From the JavaScript docs:\n\t // Property names must be strings. This means that non-string objects cannot be used\n\t // as keys in an object. Any non-string object, including a number, is typecasted\n\t // into a string via the toString method.\n\t //\n\t // So, to ensure that we are checking the same `name` that JavaScript would use,\n\t // we cast it to a string, if possible.\n\t // Doing `name + ''` can cause a repl error if the result to `toString` is not a string,\n\t // this is, this will handle objects that misbehave.\n\t name = name + '';\n\t if (!isString(name)) {\n\t throw $parseMinErr('iseccst',\n\t 'Cannot convert object to primitive value! '\n\t + 'Expression: {0}', fullExpression);\n\t }\n\t return name;\n\t}\n\t\n\tfunction ensureSafeObject(obj, fullExpression) {\n\t // nifty check if obj is Function that is fast and works across iframes and other contexts\n\t if (obj) {\n\t if (obj.constructor === obj) {\n\t throw $parseMinErr('isecfn',\n\t 'Referencing Function in Angular expressions is disallowed! Expression: {0}',\n\t fullExpression);\n\t } else if (// isWindow(obj)\n\t obj.window === obj) {\n\t throw $parseMinErr('isecwindow',\n\t 'Referencing the Window in Angular expressions is disallowed! Expression: {0}',\n\t fullExpression);\n\t } else if (// isElement(obj)\n\t obj.children && (obj.nodeName || (obj.prop && obj.attr && obj.find))) {\n\t throw $parseMinErr('isecdom',\n\t 'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}',\n\t fullExpression);\n\t } else if (// block Object so that we can't get hold of dangerous Object.* methods\n\t obj === Object) {\n\t throw $parseMinErr('isecobj',\n\t 'Referencing Object in Angular expressions is disallowed! Expression: {0}',\n\t fullExpression);\n\t }\n\t }\n\t return obj;\n\t}\n\t\n\tvar CALL = Function.prototype.call;\n\tvar APPLY = Function.prototype.apply;\n\tvar BIND = Function.prototype.bind;\n\t\n\tfunction ensureSafeFunction(obj, fullExpression) {\n\t if (obj) {\n\t if (obj.constructor === obj) {\n\t throw $parseMinErr('isecfn',\n\t 'Referencing Function in Angular expressions is disallowed! Expression: {0}',\n\t fullExpression);\n\t } else if (obj === CALL || obj === APPLY || obj === BIND) {\n\t throw $parseMinErr('isecff',\n\t 'Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}',\n\t fullExpression);\n\t }\n\t }\n\t}\n\t\n\tfunction ensureSafeAssignContext(obj, fullExpression) {\n\t if (obj) {\n\t if (obj === (0).constructor || obj === (false).constructor || obj === ''.constructor ||\n\t obj === {}.constructor || obj === [].constructor || obj === Function.constructor) {\n\t throw $parseMinErr('isecaf',\n\t 'Assigning to a constructor is disallowed! Expression: {0}', fullExpression);\n\t }\n\t }\n\t}\n\t\n\tvar OPERATORS = createMap();\n\tforEach('+ - * / % === !== == != < > <= >= && || ! = |'.split(' '), function(operator) { OPERATORS[operator] = true; });\n\tvar ESCAPE = {\"n\":\"\\n\", \"f\":\"\\f\", \"r\":\"\\r\", \"t\":\"\\t\", \"v\":\"\\v\", \"'\":\"'\", '\"':'\"'};\n\t\n\t\n\t/////////////////////////////////////////\n\t\n\t\n\t/**\n\t * @constructor\n\t */\n\tvar Lexer = function(options) {\n\t this.options = options;\n\t};\n\t\n\tLexer.prototype = {\n\t constructor: Lexer,\n\t\n\t lex: function(text) {\n\t this.text = text;\n\t this.index = 0;\n\t this.tokens = [];\n\t\n\t while (this.index < this.text.length) {\n\t var ch = this.text.charAt(this.index);\n\t if (ch === '\"' || ch === \"'\") {\n\t this.readString(ch);\n\t } else if (this.isNumber(ch) || ch === '.' && this.isNumber(this.peek())) {\n\t this.readNumber();\n\t } else if (this.isIdent(ch)) {\n\t this.readIdent();\n\t } else if (this.is(ch, '(){}[].,;:?')) {\n\t this.tokens.push({index: this.index, text: ch});\n\t this.index++;\n\t } else if (this.isWhitespace(ch)) {\n\t this.index++;\n\t } else {\n\t var ch2 = ch + this.peek();\n\t var ch3 = ch2 + this.peek(2);\n\t var op1 = OPERATORS[ch];\n\t var op2 = OPERATORS[ch2];\n\t var op3 = OPERATORS[ch3];\n\t if (op1 || op2 || op3) {\n\t var token = op3 ? ch3 : (op2 ? ch2 : ch);\n\t this.tokens.push({index: this.index, text: token, operator: true});\n\t this.index += token.length;\n\t } else {\n\t this.throwError('Unexpected next character ', this.index, this.index + 1);\n\t }\n\t }\n\t }\n\t return this.tokens;\n\t },\n\t\n\t is: function(ch, chars) {\n\t return chars.indexOf(ch) !== -1;\n\t },\n\t\n\t peek: function(i) {\n\t var num = i || 1;\n\t return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false;\n\t },\n\t\n\t isNumber: function(ch) {\n\t return ('0' <= ch && ch <= '9') && typeof ch === \"string\";\n\t },\n\t\n\t isWhitespace: function(ch) {\n\t // IE treats non-breaking space as \\u00A0\n\t return (ch === ' ' || ch === '\\r' || ch === '\\t' ||\n\t ch === '\\n' || ch === '\\v' || ch === '\\u00A0');\n\t },\n\t\n\t isIdent: function(ch) {\n\t return ('a' <= ch && ch <= 'z' ||\n\t 'A' <= ch && ch <= 'Z' ||\n\t '_' === ch || ch === '$');\n\t },\n\t\n\t isExpOperator: function(ch) {\n\t return (ch === '-' || ch === '+' || this.isNumber(ch));\n\t },\n\t\n\t throwError: function(error, start, end) {\n\t end = end || this.index;\n\t var colStr = (isDefined(start)\n\t ? 's ' + start + '-' + this.index + ' [' + this.text.substring(start, end) + ']'\n\t : ' ' + end);\n\t throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].',\n\t error, colStr, this.text);\n\t },\n\t\n\t readNumber: function() {\n\t var number = '';\n\t var start = this.index;\n\t while (this.index < this.text.length) {\n\t var ch = lowercase(this.text.charAt(this.index));\n\t if (ch == '.' || this.isNumber(ch)) {\n\t number += ch;\n\t } else {\n\t var peekCh = this.peek();\n\t if (ch == 'e' && this.isExpOperator(peekCh)) {\n\t number += ch;\n\t } else if (this.isExpOperator(ch) &&\n\t peekCh && this.isNumber(peekCh) &&\n\t number.charAt(number.length - 1) == 'e') {\n\t number += ch;\n\t } else if (this.isExpOperator(ch) &&\n\t (!peekCh || !this.isNumber(peekCh)) &&\n\t number.charAt(number.length - 1) == 'e') {\n\t this.throwError('Invalid exponent');\n\t } else {\n\t break;\n\t }\n\t }\n\t this.index++;\n\t }\n\t this.tokens.push({\n\t index: start,\n\t text: number,\n\t constant: true,\n\t value: Number(number)\n\t });\n\t },\n\t\n\t readIdent: function() {\n\t var start = this.index;\n\t while (this.index < this.text.length) {\n\t var ch = this.text.charAt(this.index);\n\t if (!(this.isIdent(ch) || this.isNumber(ch))) {\n\t break;\n\t }\n\t this.index++;\n\t }\n\t this.tokens.push({\n\t index: start,\n\t text: this.text.slice(start, this.index),\n\t identifier: true\n\t });\n\t },\n\t\n\t readString: function(quote) {\n\t var start = this.index;\n\t this.index++;\n\t var string = '';\n\t var rawString = quote;\n\t var escape = false;\n\t while (this.index < this.text.length) {\n\t var ch = this.text.charAt(this.index);\n\t rawString += ch;\n\t if (escape) {\n\t if (ch === 'u') {\n\t var hex = this.text.substring(this.index + 1, this.index + 5);\n\t if (!hex.match(/[\\da-f]{4}/i)) {\n\t this.throwError('Invalid unicode escape [\\\\u' + hex + ']');\n\t }\n\t this.index += 4;\n\t string += String.fromCharCode(parseInt(hex, 16));\n\t } else {\n\t var rep = ESCAPE[ch];\n\t string = string + (rep || ch);\n\t }\n\t escape = false;\n\t } else if (ch === '\\\\') {\n\t escape = true;\n\t } else if (ch === quote) {\n\t this.index++;\n\t this.tokens.push({\n\t index: start,\n\t text: rawString,\n\t constant: true,\n\t value: string\n\t });\n\t return;\n\t } else {\n\t string += ch;\n\t }\n\t this.index++;\n\t }\n\t this.throwError('Unterminated quote', start);\n\t }\n\t};\n\t\n\tvar AST = function(lexer, options) {\n\t this.lexer = lexer;\n\t this.options = options;\n\t};\n\t\n\tAST.Program = 'Program';\n\tAST.ExpressionStatement = 'ExpressionStatement';\n\tAST.AssignmentExpression = 'AssignmentExpression';\n\tAST.ConditionalExpression = 'ConditionalExpression';\n\tAST.LogicalExpression = 'LogicalExpression';\n\tAST.BinaryExpression = 'BinaryExpression';\n\tAST.UnaryExpression = 'UnaryExpression';\n\tAST.CallExpression = 'CallExpression';\n\tAST.MemberExpression = 'MemberExpression';\n\tAST.Identifier = 'Identifier';\n\tAST.Literal = 'Literal';\n\tAST.ArrayExpression = 'ArrayExpression';\n\tAST.Property = 'Property';\n\tAST.ObjectExpression = 'ObjectExpression';\n\tAST.ThisExpression = 'ThisExpression';\n\t\n\t// Internal use only\n\tAST.NGValueParameter = 'NGValueParameter';\n\t\n\tAST.prototype = {\n\t ast: function(text) {\n\t this.text = text;\n\t this.tokens = this.lexer.lex(text);\n\t\n\t var value = this.program();\n\t\n\t if (this.tokens.length !== 0) {\n\t this.throwError('is an unexpected token', this.tokens[0]);\n\t }\n\t\n\t return value;\n\t },\n\t\n\t program: function() {\n\t var body = [];\n\t while (true) {\n\t if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']'))\n\t body.push(this.expressionStatement());\n\t if (!this.expect(';')) {\n\t return { type: AST.Program, body: body};\n\t }\n\t }\n\t },\n\t\n\t expressionStatement: function() {\n\t return { type: AST.ExpressionStatement, expression: this.filterChain() };\n\t },\n\t\n\t filterChain: function() {\n\t var left = this.expression();\n\t var token;\n\t while ((token = this.expect('|'))) {\n\t left = this.filter(left);\n\t }\n\t return left;\n\t },\n\t\n\t expression: function() {\n\t return this.assignment();\n\t },\n\t\n\t assignment: function() {\n\t var result = this.ternary();\n\t if (this.expect('=')) {\n\t result = { type: AST.AssignmentExpression, left: result, right: this.assignment(), operator: '='};\n\t }\n\t return result;\n\t },\n\t\n\t ternary: function() {\n\t var test = this.logicalOR();\n\t var alternate;\n\t var consequent;\n\t if (this.expect('?')) {\n\t alternate = this.expression();\n\t if (this.consume(':')) {\n\t consequent = this.expression();\n\t return { type: AST.ConditionalExpression, test: test, alternate: alternate, consequent: consequent};\n\t }\n\t }\n\t return test;\n\t },\n\t\n\t logicalOR: function() {\n\t var left = this.logicalAND();\n\t while (this.expect('||')) {\n\t left = { type: AST.LogicalExpression, operator: '||', left: left, right: this.logicalAND() };\n\t }\n\t return left;\n\t },\n\t\n\t logicalAND: function() {\n\t var left = this.equality();\n\t while (this.expect('&&')) {\n\t left = { type: AST.LogicalExpression, operator: '&&', left: left, right: this.equality()};\n\t }\n\t return left;\n\t },\n\t\n\t equality: function() {\n\t var left = this.relational();\n\t var token;\n\t while ((token = this.expect('==','!=','===','!=='))) {\n\t left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.relational() };\n\t }\n\t return left;\n\t },\n\t\n\t relational: function() {\n\t var left = this.additive();\n\t var token;\n\t while ((token = this.expect('<', '>', '<=', '>='))) {\n\t left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.additive() };\n\t }\n\t return left;\n\t },\n\t\n\t additive: function() {\n\t var left = this.multiplicative();\n\t var token;\n\t while ((token = this.expect('+','-'))) {\n\t left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.multiplicative() };\n\t }\n\t return left;\n\t },\n\t\n\t multiplicative: function() {\n\t var left = this.unary();\n\t var token;\n\t while ((token = this.expect('*','/','%'))) {\n\t left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.unary() };\n\t }\n\t return left;\n\t },\n\t\n\t unary: function() {\n\t var token;\n\t if ((token = this.expect('+', '-', '!'))) {\n\t return { type: AST.UnaryExpression, operator: token.text, prefix: true, argument: this.unary() };\n\t } else {\n\t return this.primary();\n\t }\n\t },\n\t\n\t primary: function() {\n\t var primary;\n\t if (this.expect('(')) {\n\t primary = this.filterChain();\n\t this.consume(')');\n\t } else if (this.expect('[')) {\n\t primary = this.arrayDeclaration();\n\t } else if (this.expect('{')) {\n\t primary = this.object();\n\t } else if (this.constants.hasOwnProperty(this.peek().text)) {\n\t primary = copy(this.constants[this.consume().text]);\n\t } else if (this.peek().identifier) {\n\t primary = this.identifier();\n\t } else if (this.peek().constant) {\n\t primary = this.constant();\n\t } else {\n\t this.throwError('not a primary expression', this.peek());\n\t }\n\t\n\t var next;\n\t while ((next = this.expect('(', '[', '.'))) {\n\t if (next.text === '(') {\n\t primary = {type: AST.CallExpression, callee: primary, arguments: this.parseArguments() };\n\t this.consume(')');\n\t } else if (next.text === '[') {\n\t primary = { type: AST.MemberExpression, object: primary, property: this.expression(), computed: true };\n\t this.consume(']');\n\t } else if (next.text === '.') {\n\t primary = { type: AST.MemberExpression, object: primary, property: this.identifier(), computed: false };\n\t } else {\n\t this.throwError('IMPOSSIBLE');\n\t }\n\t }\n\t return primary;\n\t },\n\t\n\t filter: function(baseExpression) {\n\t var args = [baseExpression];\n\t var result = {type: AST.CallExpression, callee: this.identifier(), arguments: args, filter: true};\n\t\n\t while (this.expect(':')) {\n\t args.push(this.expression());\n\t }\n\t\n\t return result;\n\t },\n\t\n\t parseArguments: function() {\n\t var args = [];\n\t if (this.peekToken().text !== ')') {\n\t do {\n\t args.push(this.expression());\n\t } while (this.expect(','));\n\t }\n\t return args;\n\t },\n\t\n\t identifier: function() {\n\t var token = this.consume();\n\t if (!token.identifier) {\n\t this.throwError('is not a valid identifier', token);\n\t }\n\t return { type: AST.Identifier, name: token.text };\n\t },\n\t\n\t constant: function() {\n\t // TODO check that it is a constant\n\t return { type: AST.Literal, value: this.consume().value };\n\t },\n\t\n\t arrayDeclaration: function() {\n\t var elements = [];\n\t if (this.peekToken().text !== ']') {\n\t do {\n\t if (this.peek(']')) {\n\t // Support trailing commas per ES5.1.\n\t break;\n\t }\n\t elements.push(this.expression());\n\t } while (this.expect(','));\n\t }\n\t this.consume(']');\n\t\n\t return { type: AST.ArrayExpression, elements: elements };\n\t },\n\t\n\t object: function() {\n\t var properties = [], property;\n\t if (this.peekToken().text !== '}') {\n\t do {\n\t if (this.peek('}')) {\n\t // Support trailing commas per ES5.1.\n\t break;\n\t }\n\t property = {type: AST.Property, kind: 'init'};\n\t if (this.peek().constant) {\n\t property.key = this.constant();\n\t } else if (this.peek().identifier) {\n\t property.key = this.identifier();\n\t } else {\n\t this.throwError(\"invalid key\", this.peek());\n\t }\n\t this.consume(':');\n\t property.value = this.expression();\n\t properties.push(property);\n\t } while (this.expect(','));\n\t }\n\t this.consume('}');\n\t\n\t return {type: AST.ObjectExpression, properties: properties };\n\t },\n\t\n\t throwError: function(msg, token) {\n\t throw $parseMinErr('syntax',\n\t 'Syntax Error: Token \\'{0}\\' {1} at column {2} of the expression [{3}] starting at [{4}].',\n\t token.text, msg, (token.index + 1), this.text, this.text.substring(token.index));\n\t },\n\t\n\t consume: function(e1) {\n\t if (this.tokens.length === 0) {\n\t throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);\n\t }\n\t\n\t var token = this.expect(e1);\n\t if (!token) {\n\t this.throwError('is unexpected, expecting [' + e1 + ']', this.peek());\n\t }\n\t return token;\n\t },\n\t\n\t peekToken: function() {\n\t if (this.tokens.length === 0) {\n\t throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);\n\t }\n\t return this.tokens[0];\n\t },\n\t\n\t peek: function(e1, e2, e3, e4) {\n\t return this.peekAhead(0, e1, e2, e3, e4);\n\t },\n\t\n\t peekAhead: function(i, e1, e2, e3, e4) {\n\t if (this.tokens.length > i) {\n\t var token = this.tokens[i];\n\t var t = token.text;\n\t if (t === e1 || t === e2 || t === e3 || t === e4 ||\n\t (!e1 && !e2 && !e3 && !e4)) {\n\t return token;\n\t }\n\t }\n\t return false;\n\t },\n\t\n\t expect: function(e1, e2, e3, e4) {\n\t var token = this.peek(e1, e2, e3, e4);\n\t if (token) {\n\t this.tokens.shift();\n\t return token;\n\t }\n\t return false;\n\t },\n\t\n\t\n\t /* `undefined` is not a constant, it is an identifier,\n\t * but using it as an identifier is not supported\n\t */\n\t constants: {\n\t 'true': { type: AST.Literal, value: true },\n\t 'false': { type: AST.Literal, value: false },\n\t 'null': { type: AST.Literal, value: null },\n\t 'undefined': {type: AST.Literal, value: undefined },\n\t 'this': {type: AST.ThisExpression }\n\t }\n\t};\n\t\n\tfunction ifDefined(v, d) {\n\t return typeof v !== 'undefined' ? v : d;\n\t}\n\t\n\tfunction plusFn(l, r) {\n\t if (typeof l === 'undefined') return r;\n\t if (typeof r === 'undefined') return l;\n\t return l + r;\n\t}\n\t\n\tfunction isStateless($filter, filterName) {\n\t var fn = $filter(filterName);\n\t return !fn.$stateful;\n\t}\n\t\n\tfunction findConstantAndWatchExpressions(ast, $filter) {\n\t var allConstants;\n\t var argsToWatch;\n\t switch (ast.type) {\n\t case AST.Program:\n\t allConstants = true;\n\t forEach(ast.body, function(expr) {\n\t findConstantAndWatchExpressions(expr.expression, $filter);\n\t allConstants = allConstants && expr.expression.constant;\n\t });\n\t ast.constant = allConstants;\n\t break;\n\t case AST.Literal:\n\t ast.constant = true;\n\t ast.toWatch = [];\n\t break;\n\t case AST.UnaryExpression:\n\t findConstantAndWatchExpressions(ast.argument, $filter);\n\t ast.constant = ast.argument.constant;\n\t ast.toWatch = ast.argument.toWatch;\n\t break;\n\t case AST.BinaryExpression:\n\t findConstantAndWatchExpressions(ast.left, $filter);\n\t findConstantAndWatchExpressions(ast.right, $filter);\n\t ast.constant = ast.left.constant && ast.right.constant;\n\t ast.toWatch = ast.left.toWatch.concat(ast.right.toWatch);\n\t break;\n\t case AST.LogicalExpression:\n\t findConstantAndWatchExpressions(ast.left, $filter);\n\t findConstantAndWatchExpressions(ast.right, $filter);\n\t ast.constant = ast.left.constant && ast.right.constant;\n\t ast.toWatch = ast.constant ? [] : [ast];\n\t break;\n\t case AST.ConditionalExpression:\n\t findConstantAndWatchExpressions(ast.test, $filter);\n\t findConstantAndWatchExpressions(ast.alternate, $filter);\n\t findConstantAndWatchExpressions(ast.consequent, $filter);\n\t ast.constant = ast.test.constant && ast.alternate.constant && ast.consequent.constant;\n\t ast.toWatch = ast.constant ? [] : [ast];\n\t break;\n\t case AST.Identifier:\n\t ast.constant = false;\n\t ast.toWatch = [ast];\n\t break;\n\t case AST.MemberExpression:\n\t findConstantAndWatchExpressions(ast.object, $filter);\n\t if (ast.computed) {\n\t findConstantAndWatchExpressions(ast.property, $filter);\n\t }\n\t ast.constant = ast.object.constant && (!ast.computed || ast.property.constant);\n\t ast.toWatch = [ast];\n\t break;\n\t case AST.CallExpression:\n\t allConstants = ast.filter ? isStateless($filter, ast.callee.name) : false;\n\t argsToWatch = [];\n\t forEach(ast.arguments, function(expr) {\n\t findConstantAndWatchExpressions(expr, $filter);\n\t allConstants = allConstants && expr.constant;\n\t if (!expr.constant) {\n\t argsToWatch.push.apply(argsToWatch, expr.toWatch);\n\t }\n\t });\n\t ast.constant = allConstants;\n\t ast.toWatch = ast.filter && isStateless($filter, ast.callee.name) ? argsToWatch : [ast];\n\t break;\n\t case AST.AssignmentExpression:\n\t findConstantAndWatchExpressions(ast.left, $filter);\n\t findConstantAndWatchExpressions(ast.right, $filter);\n\t ast.constant = ast.left.constant && ast.right.constant;\n\t ast.toWatch = [ast];\n\t break;\n\t case AST.ArrayExpression:\n\t allConstants = true;\n\t argsToWatch = [];\n\t forEach(ast.elements, function(expr) {\n\t findConstantAndWatchExpressions(expr, $filter);\n\t allConstants = allConstants && expr.constant;\n\t if (!expr.constant) {\n\t argsToWatch.push.apply(argsToWatch, expr.toWatch);\n\t }\n\t });\n\t ast.constant = allConstants;\n\t ast.toWatch = argsToWatch;\n\t break;\n\t case AST.ObjectExpression:\n\t allConstants = true;\n\t argsToWatch = [];\n\t forEach(ast.properties, function(property) {\n\t findConstantAndWatchExpressions(property.value, $filter);\n\t allConstants = allConstants && property.value.constant;\n\t if (!property.value.constant) {\n\t argsToWatch.push.apply(argsToWatch, property.value.toWatch);\n\t }\n\t });\n\t ast.constant = allConstants;\n\t ast.toWatch = argsToWatch;\n\t break;\n\t case AST.ThisExpression:\n\t ast.constant = false;\n\t ast.toWatch = [];\n\t break;\n\t }\n\t}\n\t\n\tfunction getInputs(body) {\n\t if (body.length != 1) return;\n\t var lastExpression = body[0].expression;\n\t var candidate = lastExpression.toWatch;\n\t if (candidate.length !== 1) return candidate;\n\t return candidate[0] !== lastExpression ? candidate : undefined;\n\t}\n\t\n\tfunction isAssignable(ast) {\n\t return ast.type === AST.Identifier || ast.type === AST.MemberExpression;\n\t}\n\t\n\tfunction assignableAST(ast) {\n\t if (ast.body.length === 1 && isAssignable(ast.body[0].expression)) {\n\t return {type: AST.AssignmentExpression, left: ast.body[0].expression, right: {type: AST.NGValueParameter}, operator: '='};\n\t }\n\t}\n\t\n\tfunction isLiteral(ast) {\n\t return ast.body.length === 0 ||\n\t ast.body.length === 1 && (\n\t ast.body[0].expression.type === AST.Literal ||\n\t ast.body[0].expression.type === AST.ArrayExpression ||\n\t ast.body[0].expression.type === AST.ObjectExpression);\n\t}\n\t\n\tfunction isConstant(ast) {\n\t return ast.constant;\n\t}\n\t\n\tfunction ASTCompiler(astBuilder, $filter) {\n\t this.astBuilder = astBuilder;\n\t this.$filter = $filter;\n\t}\n\t\n\tASTCompiler.prototype = {\n\t compile: function(expression, expensiveChecks) {\n\t var self = this;\n\t var ast = this.astBuilder.ast(expression);\n\t this.state = {\n\t nextId: 0,\n\t filters: {},\n\t expensiveChecks: expensiveChecks,\n\t fn: {vars: [], body: [], own: {}},\n\t assign: {vars: [], body: [], own: {}},\n\t inputs: []\n\t };\n\t findConstantAndWatchExpressions(ast, self.$filter);\n\t var extra = '';\n\t var assignable;\n\t this.stage = 'assign';\n\t if ((assignable = assignableAST(ast))) {\n\t this.state.computing = 'assign';\n\t var result = this.nextId();\n\t this.recurse(assignable, result);\n\t this.return_(result);\n\t extra = 'fn.assign=' + this.generateFunction('assign', 's,v,l');\n\t }\n\t var toWatch = getInputs(ast.body);\n\t self.stage = 'inputs';\n\t forEach(toWatch, function(watch, key) {\n\t var fnKey = 'fn' + key;\n\t self.state[fnKey] = {vars: [], body: [], own: {}};\n\t self.state.computing = fnKey;\n\t var intoId = self.nextId();\n\t self.recurse(watch, intoId);\n\t self.return_(intoId);\n\t self.state.inputs.push(fnKey);\n\t watch.watchId = key;\n\t });\n\t this.state.computing = 'fn';\n\t this.stage = 'main';\n\t this.recurse(ast);\n\t var fnString =\n\t // The build and minification steps remove the string \"use strict\" from the code, but this is done using a regex.\n\t // This is a workaround for this until we do a better job at only removing the prefix only when we should.\n\t '\"' + this.USE + ' ' + this.STRICT + '\";\\n' +\n\t this.filterPrefix() +\n\t 'var fn=' + this.generateFunction('fn', 's,l,a,i') +\n\t extra +\n\t this.watchFns() +\n\t 'return fn;';\n\t\n\t /* jshint -W054 */\n\t var fn = (new Function('$filter',\n\t 'ensureSafeMemberName',\n\t 'ensureSafeObject',\n\t 'ensureSafeFunction',\n\t 'getStringValue',\n\t 'ensureSafeAssignContext',\n\t 'ifDefined',\n\t 'plus',\n\t 'text',\n\t fnString))(\n\t this.$filter,\n\t ensureSafeMemberName,\n\t ensureSafeObject,\n\t ensureSafeFunction,\n\t getStringValue,\n\t ensureSafeAssignContext,\n\t ifDefined,\n\t plusFn,\n\t expression);\n\t /* jshint +W054 */\n\t this.state = this.stage = undefined;\n\t fn.literal = isLiteral(ast);\n\t fn.constant = isConstant(ast);\n\t return fn;\n\t },\n\t\n\t USE: 'use',\n\t\n\t STRICT: 'strict',\n\t\n\t watchFns: function() {\n\t var result = [];\n\t var fns = this.state.inputs;\n\t var self = this;\n\t forEach(fns, function(name) {\n\t result.push('var ' + name + '=' + self.generateFunction(name, 's'));\n\t });\n\t if (fns.length) {\n\t result.push('fn.inputs=[' + fns.join(',') + '];');\n\t }\n\t return result.join('');\n\t },\n\t\n\t generateFunction: function(name, params) {\n\t return 'function(' + params + '){' +\n\t this.varsPrefix(name) +\n\t this.body(name) +\n\t '};';\n\t },\n\t\n\t filterPrefix: function() {\n\t var parts = [];\n\t var self = this;\n\t forEach(this.state.filters, function(id, filter) {\n\t parts.push(id + '=$filter(' + self.escape(filter) + ')');\n\t });\n\t if (parts.length) return 'var ' + parts.join(',') + ';';\n\t return '';\n\t },\n\t\n\t varsPrefix: function(section) {\n\t return this.state[section].vars.length ? 'var ' + this.state[section].vars.join(',') + ';' : '';\n\t },\n\t\n\t body: function(section) {\n\t return this.state[section].body.join('');\n\t },\n\t\n\t recurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) {\n\t var left, right, self = this, args, expression;\n\t recursionFn = recursionFn || noop;\n\t if (!skipWatchIdCheck && isDefined(ast.watchId)) {\n\t intoId = intoId || this.nextId();\n\t this.if_('i',\n\t this.lazyAssign(intoId, this.computedMember('i', ast.watchId)),\n\t this.lazyRecurse(ast, intoId, nameId, recursionFn, create, true)\n\t );\n\t return;\n\t }\n\t switch (ast.type) {\n\t case AST.Program:\n\t forEach(ast.body, function(expression, pos) {\n\t self.recurse(expression.expression, undefined, undefined, function(expr) { right = expr; });\n\t if (pos !== ast.body.length - 1) {\n\t self.current().body.push(right, ';');\n\t } else {\n\t self.return_(right);\n\t }\n\t });\n\t break;\n\t case AST.Literal:\n\t expression = this.escape(ast.value);\n\t this.assign(intoId, expression);\n\t recursionFn(expression);\n\t break;\n\t case AST.UnaryExpression:\n\t this.recurse(ast.argument, undefined, undefined, function(expr) { right = expr; });\n\t expression = ast.operator + '(' + this.ifDefined(right, 0) + ')';\n\t this.assign(intoId, expression);\n\t recursionFn(expression);\n\t break;\n\t case AST.BinaryExpression:\n\t this.recurse(ast.left, undefined, undefined, function(expr) { left = expr; });\n\t this.recurse(ast.right, undefined, undefined, function(expr) { right = expr; });\n\t if (ast.operator === '+') {\n\t expression = this.plus(left, right);\n\t } else if (ast.operator === '-') {\n\t expression = this.ifDefined(left, 0) + ast.operator + this.ifDefined(right, 0);\n\t } else {\n\t expression = '(' + left + ')' + ast.operator + '(' + right + ')';\n\t }\n\t this.assign(intoId, expression);\n\t recursionFn(expression);\n\t break;\n\t case AST.LogicalExpression:\n\t intoId = intoId || this.nextId();\n\t self.recurse(ast.left, intoId);\n\t self.if_(ast.operator === '&&' ? intoId : self.not(intoId), self.lazyRecurse(ast.right, intoId));\n\t recursionFn(intoId);\n\t break;\n\t case AST.ConditionalExpression:\n\t intoId = intoId || this.nextId();\n\t self.recurse(ast.test, intoId);\n\t self.if_(intoId, self.lazyRecurse(ast.alternate, intoId), self.lazyRecurse(ast.consequent, intoId));\n\t recursionFn(intoId);\n\t break;\n\t case AST.Identifier:\n\t intoId = intoId || this.nextId();\n\t if (nameId) {\n\t nameId.context = self.stage === 'inputs' ? 's' : this.assign(this.nextId(), this.getHasOwnProperty('l', ast.name) + '?l:s');\n\t nameId.computed = false;\n\t nameId.name = ast.name;\n\t }\n\t ensureSafeMemberName(ast.name);\n\t self.if_(self.stage === 'inputs' || self.not(self.getHasOwnProperty('l', ast.name)),\n\t function() {\n\t self.if_(self.stage === 'inputs' || 's', function() {\n\t if (create && create !== 1) {\n\t self.if_(\n\t self.not(self.nonComputedMember('s', ast.name)),\n\t self.lazyAssign(self.nonComputedMember('s', ast.name), '{}'));\n\t }\n\t self.assign(intoId, self.nonComputedMember('s', ast.name));\n\t });\n\t }, intoId && self.lazyAssign(intoId, self.nonComputedMember('l', ast.name))\n\t );\n\t if (self.state.expensiveChecks || isPossiblyDangerousMemberName(ast.name)) {\n\t self.addEnsureSafeObject(intoId);\n\t }\n\t recursionFn(intoId);\n\t break;\n\t case AST.MemberExpression:\n\t left = nameId && (nameId.context = this.nextId()) || this.nextId();\n\t intoId = intoId || this.nextId();\n\t self.recurse(ast.object, left, undefined, function() {\n\t self.if_(self.notNull(left), function() {\n\t if (create && create !== 1) {\n\t self.addEnsureSafeAssignContext(left);\n\t }\n\t if (ast.computed) {\n\t right = self.nextId();\n\t self.recurse(ast.property, right);\n\t self.getStringValue(right);\n\t self.addEnsureSafeMemberName(right);\n\t if (create && create !== 1) {\n\t self.if_(self.not(self.computedMember(left, right)), self.lazyAssign(self.computedMember(left, right), '{}'));\n\t }\n\t expression = self.ensureSafeObject(self.computedMember(left, right));\n\t self.assign(intoId, expression);\n\t if (nameId) {\n\t nameId.computed = true;\n\t nameId.name = right;\n\t }\n\t } else {\n\t ensureSafeMemberName(ast.property.name);\n\t if (create && create !== 1) {\n\t self.if_(self.not(self.nonComputedMember(left, ast.property.name)), self.lazyAssign(self.nonComputedMember(left, ast.property.name), '{}'));\n\t }\n\t expression = self.nonComputedMember(left, ast.property.name);\n\t if (self.state.expensiveChecks || isPossiblyDangerousMemberName(ast.property.name)) {\n\t expression = self.ensureSafeObject(expression);\n\t }\n\t self.assign(intoId, expression);\n\t if (nameId) {\n\t nameId.computed = false;\n\t nameId.name = ast.property.name;\n\t }\n\t }\n\t }, function() {\n\t self.assign(intoId, 'undefined');\n\t });\n\t recursionFn(intoId);\n\t }, !!create);\n\t break;\n\t case AST.CallExpression:\n\t intoId = intoId || this.nextId();\n\t if (ast.filter) {\n\t right = self.filter(ast.callee.name);\n\t args = [];\n\t forEach(ast.arguments, function(expr) {\n\t var argument = self.nextId();\n\t self.recurse(expr, argument);\n\t args.push(argument);\n\t });\n\t expression = right + '(' + args.join(',') + ')';\n\t self.assign(intoId, expression);\n\t recursionFn(intoId);\n\t } else {\n\t right = self.nextId();\n\t left = {};\n\t args = [];\n\t self.recurse(ast.callee, right, left, function() {\n\t self.if_(self.notNull(right), function() {\n\t self.addEnsureSafeFunction(right);\n\t forEach(ast.arguments, function(expr) {\n\t self.recurse(expr, self.nextId(), undefined, function(argument) {\n\t args.push(self.ensureSafeObject(argument));\n\t });\n\t });\n\t if (left.name) {\n\t if (!self.state.expensiveChecks) {\n\t self.addEnsureSafeObject(left.context);\n\t }\n\t expression = self.member(left.context, left.name, left.computed) + '(' + args.join(',') + ')';\n\t } else {\n\t expression = right + '(' + args.join(',') + ')';\n\t }\n\t expression = self.ensureSafeObject(expression);\n\t self.assign(intoId, expression);\n\t }, function() {\n\t self.assign(intoId, 'undefined');\n\t });\n\t recursionFn(intoId);\n\t });\n\t }\n\t break;\n\t case AST.AssignmentExpression:\n\t right = this.nextId();\n\t left = {};\n\t if (!isAssignable(ast.left)) {\n\t throw $parseMinErr('lval', 'Trying to assign a value to a non l-value');\n\t }\n\t this.recurse(ast.left, undefined, left, function() {\n\t self.if_(self.notNull(left.context), function() {\n\t self.recurse(ast.right, right);\n\t self.addEnsureSafeObject(self.member(left.context, left.name, left.computed));\n\t self.addEnsureSafeAssignContext(left.context);\n\t expression = self.member(left.context, left.name, left.computed) + ast.operator + right;\n\t self.assign(intoId, expression);\n\t recursionFn(intoId || expression);\n\t });\n\t }, 1);\n\t break;\n\t case AST.ArrayExpression:\n\t args = [];\n\t forEach(ast.elements, function(expr) {\n\t self.recurse(expr, self.nextId(), undefined, function(argument) {\n\t args.push(argument);\n\t });\n\t });\n\t expression = '[' + args.join(',') + ']';\n\t this.assign(intoId, expression);\n\t recursionFn(expression);\n\t break;\n\t case AST.ObjectExpression:\n\t args = [];\n\t forEach(ast.properties, function(property) {\n\t self.recurse(property.value, self.nextId(), undefined, function(expr) {\n\t args.push(self.escape(\n\t property.key.type === AST.Identifier ? property.key.name :\n\t ('' + property.key.value)) +\n\t ':' + expr);\n\t });\n\t });\n\t expression = '{' + args.join(',') + '}';\n\t this.assign(intoId, expression);\n\t recursionFn(expression);\n\t break;\n\t case AST.ThisExpression:\n\t this.assign(intoId, 's');\n\t recursionFn('s');\n\t break;\n\t case AST.NGValueParameter:\n\t this.assign(intoId, 'v');\n\t recursionFn('v');\n\t break;\n\t }\n\t },\n\t\n\t getHasOwnProperty: function(element, property) {\n\t var key = element + '.' + property;\n\t var own = this.current().own;\n\t if (!own.hasOwnProperty(key)) {\n\t own[key] = this.nextId(false, element + '&&(' + this.escape(property) + ' in ' + element + ')');\n\t }\n\t return own[key];\n\t },\n\t\n\t assign: function(id, value) {\n\t if (!id) return;\n\t this.current().body.push(id, '=', value, ';');\n\t return id;\n\t },\n\t\n\t filter: function(filterName) {\n\t if (!this.state.filters.hasOwnProperty(filterName)) {\n\t this.state.filters[filterName] = this.nextId(true);\n\t }\n\t return this.state.filters[filterName];\n\t },\n\t\n\t ifDefined: function(id, defaultValue) {\n\t return 'ifDefined(' + id + ',' + this.escape(defaultValue) + ')';\n\t },\n\t\n\t plus: function(left, right) {\n\t return 'plus(' + left + ',' + right + ')';\n\t },\n\t\n\t return_: function(id) {\n\t this.current().body.push('return ', id, ';');\n\t },\n\t\n\t if_: function(test, alternate, consequent) {\n\t if (test === true) {\n\t alternate();\n\t } else {\n\t var body = this.current().body;\n\t body.push('if(', test, '){');\n\t alternate();\n\t body.push('}');\n\t if (consequent) {\n\t body.push('else{');\n\t consequent();\n\t body.push('}');\n\t }\n\t }\n\t },\n\t\n\t not: function(expression) {\n\t return '!(' + expression + ')';\n\t },\n\t\n\t notNull: function(expression) {\n\t return expression + '!=null';\n\t },\n\t\n\t nonComputedMember: function(left, right) {\n\t return left + '.' + right;\n\t },\n\t\n\t computedMember: function(left, right) {\n\t return left + '[' + right + ']';\n\t },\n\t\n\t member: function(left, right, computed) {\n\t if (computed) return this.computedMember(left, right);\n\t return this.nonComputedMember(left, right);\n\t },\n\t\n\t addEnsureSafeObject: function(item) {\n\t this.current().body.push(this.ensureSafeObject(item), ';');\n\t },\n\t\n\t addEnsureSafeMemberName: function(item) {\n\t this.current().body.push(this.ensureSafeMemberName(item), ';');\n\t },\n\t\n\t addEnsureSafeFunction: function(item) {\n\t this.current().body.push(this.ensureSafeFunction(item), ';');\n\t },\n\t\n\t addEnsureSafeAssignContext: function(item) {\n\t this.current().body.push(this.ensureSafeAssignContext(item), ';');\n\t },\n\t\n\t ensureSafeObject: function(item) {\n\t return 'ensureSafeObject(' + item + ',text)';\n\t },\n\t\n\t ensureSafeMemberName: function(item) {\n\t return 'ensureSafeMemberName(' + item + ',text)';\n\t },\n\t\n\t ensureSafeFunction: function(item) {\n\t return 'ensureSafeFunction(' + item + ',text)';\n\t },\n\t\n\t getStringValue: function(item) {\n\t this.assign(item, 'getStringValue(' + item + ',text)');\n\t },\n\t\n\t ensureSafeAssignContext: function(item) {\n\t return 'ensureSafeAssignContext(' + item + ',text)';\n\t },\n\t\n\t lazyRecurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) {\n\t var self = this;\n\t return function() {\n\t self.recurse(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck);\n\t };\n\t },\n\t\n\t lazyAssign: function(id, value) {\n\t var self = this;\n\t return function() {\n\t self.assign(id, value);\n\t };\n\t },\n\t\n\t stringEscapeRegex: /[^ a-zA-Z0-9]/g,\n\t\n\t stringEscapeFn: function(c) {\n\t return '\\\\u' + ('0000' + c.charCodeAt(0).toString(16)).slice(-4);\n\t },\n\t\n\t escape: function(value) {\n\t if (isString(value)) return \"'\" + value.replace(this.stringEscapeRegex, this.stringEscapeFn) + \"'\";\n\t if (isNumber(value)) return value.toString();\n\t if (value === true) return 'true';\n\t if (value === false) return 'false';\n\t if (value === null) return 'null';\n\t if (typeof value === 'undefined') return 'undefined';\n\t\n\t throw $parseMinErr('esc', 'IMPOSSIBLE');\n\t },\n\t\n\t nextId: function(skip, init) {\n\t var id = 'v' + (this.state.nextId++);\n\t if (!skip) {\n\t this.current().vars.push(id + (init ? '=' + init : ''));\n\t }\n\t return id;\n\t },\n\t\n\t current: function() {\n\t return this.state[this.state.computing];\n\t }\n\t};\n\t\n\t\n\tfunction ASTInterpreter(astBuilder, $filter) {\n\t this.astBuilder = astBuilder;\n\t this.$filter = $filter;\n\t}\n\t\n\tASTInterpreter.prototype = {\n\t compile: function(expression, expensiveChecks) {\n\t var self = this;\n\t var ast = this.astBuilder.ast(expression);\n\t this.expression = expression;\n\t this.expensiveChecks = expensiveChecks;\n\t findConstantAndWatchExpressions(ast, self.$filter);\n\t var assignable;\n\t var assign;\n\t if ((assignable = assignableAST(ast))) {\n\t assign = this.recurse(assignable);\n\t }\n\t var toWatch = getInputs(ast.body);\n\t var inputs;\n\t if (toWatch) {\n\t inputs = [];\n\t forEach(toWatch, function(watch, key) {\n\t var input = self.recurse(watch);\n\t watch.input = input;\n\t inputs.push(input);\n\t watch.watchId = key;\n\t });\n\t }\n\t var expressions = [];\n\t forEach(ast.body, function(expression) {\n\t expressions.push(self.recurse(expression.expression));\n\t });\n\t var fn = ast.body.length === 0 ? function() {} :\n\t ast.body.length === 1 ? expressions[0] :\n\t function(scope, locals) {\n\t var lastValue;\n\t forEach(expressions, function(exp) {\n\t lastValue = exp(scope, locals);\n\t });\n\t return lastValue;\n\t };\n\t if (assign) {\n\t fn.assign = function(scope, value, locals) {\n\t return assign(scope, locals, value);\n\t };\n\t }\n\t if (inputs) {\n\t fn.inputs = inputs;\n\t }\n\t fn.literal = isLiteral(ast);\n\t fn.constant = isConstant(ast);\n\t return fn;\n\t },\n\t\n\t recurse: function(ast, context, create) {\n\t var left, right, self = this, args, expression;\n\t if (ast.input) {\n\t return this.inputs(ast.input, ast.watchId);\n\t }\n\t switch (ast.type) {\n\t case AST.Literal:\n\t return this.value(ast.value, context);\n\t case AST.UnaryExpression:\n\t right = this.recurse(ast.argument);\n\t return this['unary' + ast.operator](right, context);\n\t case AST.BinaryExpression:\n\t left = this.recurse(ast.left);\n\t right = this.recurse(ast.right);\n\t return this['binary' + ast.operator](left, right, context);\n\t case AST.LogicalExpression:\n\t left = this.recurse(ast.left);\n\t right = this.recurse(ast.right);\n\t return this['binary' + ast.operator](left, right, context);\n\t case AST.ConditionalExpression:\n\t return this['ternary?:'](\n\t this.recurse(ast.test),\n\t this.recurse(ast.alternate),\n\t this.recurse(ast.consequent),\n\t context\n\t );\n\t case AST.Identifier:\n\t ensureSafeMemberName(ast.name, self.expression);\n\t return self.identifier(ast.name,\n\t self.expensiveChecks || isPossiblyDangerousMemberName(ast.name),\n\t context, create, self.expression);\n\t case AST.MemberExpression:\n\t left = this.recurse(ast.object, false, !!create);\n\t if (!ast.computed) {\n\t ensureSafeMemberName(ast.property.name, self.expression);\n\t right = ast.property.name;\n\t }\n\t if (ast.computed) right = this.recurse(ast.property);\n\t return ast.computed ?\n\t this.computedMember(left, right, context, create, self.expression) :\n\t this.nonComputedMember(left, right, self.expensiveChecks, context, create, self.expression);\n\t case AST.CallExpression:\n\t args = [];\n\t forEach(ast.arguments, function(expr) {\n\t args.push(self.recurse(expr));\n\t });\n\t if (ast.filter) right = this.$filter(ast.callee.name);\n\t if (!ast.filter) right = this.recurse(ast.callee, true);\n\t return ast.filter ?\n\t function(scope, locals, assign, inputs) {\n\t var values = [];\n\t for (var i = 0; i < args.length; ++i) {\n\t values.push(args[i](scope, locals, assign, inputs));\n\t }\n\t var value = right.apply(undefined, values, inputs);\n\t return context ? {context: undefined, name: undefined, value: value} : value;\n\t } :\n\t function(scope, locals, assign, inputs) {\n\t var rhs = right(scope, locals, assign, inputs);\n\t var value;\n\t if (rhs.value != null) {\n\t ensureSafeObject(rhs.context, self.expression);\n\t ensureSafeFunction(rhs.value, self.expression);\n\t var values = [];\n\t for (var i = 0; i < args.length; ++i) {\n\t values.push(ensureSafeObject(args[i](scope, locals, assign, inputs), self.expression));\n\t }\n\t value = ensureSafeObject(rhs.value.apply(rhs.context, values), self.expression);\n\t }\n\t return context ? {value: value} : value;\n\t };\n\t case AST.AssignmentExpression:\n\t left = this.recurse(ast.left, true, 1);\n\t right = this.recurse(ast.right);\n\t return function(scope, locals, assign, inputs) {\n\t var lhs = left(scope, locals, assign, inputs);\n\t var rhs = right(scope, locals, assign, inputs);\n\t ensureSafeObject(lhs.value, self.expression);\n\t ensureSafeAssignContext(lhs.context);\n\t lhs.context[lhs.name] = rhs;\n\t return context ? {value: rhs} : rhs;\n\t };\n\t case AST.ArrayExpression:\n\t args = [];\n\t forEach(ast.elements, function(expr) {\n\t args.push(self.recurse(expr));\n\t });\n\t return function(scope, locals, assign, inputs) {\n\t var value = [];\n\t for (var i = 0; i < args.length; ++i) {\n\t value.push(args[i](scope, locals, assign, inputs));\n\t }\n\t return context ? {value: value} : value;\n\t };\n\t case AST.ObjectExpression:\n\t args = [];\n\t forEach(ast.properties, function(property) {\n\t args.push({key: property.key.type === AST.Identifier ?\n\t property.key.name :\n\t ('' + property.key.value),\n\t value: self.recurse(property.value)\n\t });\n\t });\n\t return function(scope, locals, assign, inputs) {\n\t var value = {};\n\t for (var i = 0; i < args.length; ++i) {\n\t value[args[i].key] = args[i].value(scope, locals, assign, inputs);\n\t }\n\t return context ? {value: value} : value;\n\t };\n\t case AST.ThisExpression:\n\t return function(scope) {\n\t return context ? {value: scope} : scope;\n\t };\n\t case AST.NGValueParameter:\n\t return function(scope, locals, assign, inputs) {\n\t return context ? {value: assign} : assign;\n\t };\n\t }\n\t },\n\t\n\t 'unary+': function(argument, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var arg = argument(scope, locals, assign, inputs);\n\t if (isDefined(arg)) {\n\t arg = +arg;\n\t } else {\n\t arg = 0;\n\t }\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t 'unary-': function(argument, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var arg = argument(scope, locals, assign, inputs);\n\t if (isDefined(arg)) {\n\t arg = -arg;\n\t } else {\n\t arg = 0;\n\t }\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t 'unary!': function(argument, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var arg = !argument(scope, locals, assign, inputs);\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t 'binary+': function(left, right, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var lhs = left(scope, locals, assign, inputs);\n\t var rhs = right(scope, locals, assign, inputs);\n\t var arg = plusFn(lhs, rhs);\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t 'binary-': function(left, right, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var lhs = left(scope, locals, assign, inputs);\n\t var rhs = right(scope, locals, assign, inputs);\n\t var arg = (isDefined(lhs) ? lhs : 0) - (isDefined(rhs) ? rhs : 0);\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t 'binary*': function(left, right, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var arg = left(scope, locals, assign, inputs) * right(scope, locals, assign, inputs);\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t 'binary/': function(left, right, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var arg = left(scope, locals, assign, inputs) / right(scope, locals, assign, inputs);\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t 'binary%': function(left, right, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var arg = left(scope, locals, assign, inputs) % right(scope, locals, assign, inputs);\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t 'binary===': function(left, right, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var arg = left(scope, locals, assign, inputs) === right(scope, locals, assign, inputs);\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t 'binary!==': function(left, right, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var arg = left(scope, locals, assign, inputs) !== right(scope, locals, assign, inputs);\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t 'binary==': function(left, right, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var arg = left(scope, locals, assign, inputs) == right(scope, locals, assign, inputs);\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t 'binary!=': function(left, right, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var arg = left(scope, locals, assign, inputs) != right(scope, locals, assign, inputs);\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t 'binary<': function(left, right, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var arg = left(scope, locals, assign, inputs) < right(scope, locals, assign, inputs);\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t 'binary>': function(left, right, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var arg = left(scope, locals, assign, inputs) > right(scope, locals, assign, inputs);\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t 'binary<=': function(left, right, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var arg = left(scope, locals, assign, inputs) <= right(scope, locals, assign, inputs);\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t 'binary>=': function(left, right, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var arg = left(scope, locals, assign, inputs) >= right(scope, locals, assign, inputs);\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t 'binary&&': function(left, right, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var arg = left(scope, locals, assign, inputs) && right(scope, locals, assign, inputs);\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t 'binary||': function(left, right, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var arg = left(scope, locals, assign, inputs) || right(scope, locals, assign, inputs);\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t 'ternary?:': function(test, alternate, consequent, context) {\n\t return function(scope, locals, assign, inputs) {\n\t var arg = test(scope, locals, assign, inputs) ? alternate(scope, locals, assign, inputs) : consequent(scope, locals, assign, inputs);\n\t return context ? {value: arg} : arg;\n\t };\n\t },\n\t value: function(value, context) {\n\t return function() { return context ? {context: undefined, name: undefined, value: value} : value; };\n\t },\n\t identifier: function(name, expensiveChecks, context, create, expression) {\n\t return function(scope, locals, assign, inputs) {\n\t var base = locals && (name in locals) ? locals : scope;\n\t if (create && create !== 1 && base && !(base[name])) {\n\t base[name] = {};\n\t }\n\t var value = base ? base[name] : undefined;\n\t if (expensiveChecks) {\n\t ensureSafeObject(value, expression);\n\t }\n\t if (context) {\n\t return {context: base, name: name, value: value};\n\t } else {\n\t return value;\n\t }\n\t };\n\t },\n\t computedMember: function(left, right, context, create, expression) {\n\t return function(scope, locals, assign, inputs) {\n\t var lhs = left(scope, locals, assign, inputs);\n\t var rhs;\n\t var value;\n\t if (lhs != null) {\n\t rhs = right(scope, locals, assign, inputs);\n\t rhs = getStringValue(rhs);\n\t ensureSafeMemberName(rhs, expression);\n\t if (create && create !== 1) {\n\t ensureSafeAssignContext(lhs);\n\t if (lhs && !(lhs[rhs])) {\n\t lhs[rhs] = {};\n\t }\n\t }\n\t value = lhs[rhs];\n\t ensureSafeObject(value, expression);\n\t }\n\t if (context) {\n\t return {context: lhs, name: rhs, value: value};\n\t } else {\n\t return value;\n\t }\n\t };\n\t },\n\t nonComputedMember: function(left, right, expensiveChecks, context, create, expression) {\n\t return function(scope, locals, assign, inputs) {\n\t var lhs = left(scope, locals, assign, inputs);\n\t if (create && create !== 1) {\n\t ensureSafeAssignContext(lhs);\n\t if (lhs && !(lhs[right])) {\n\t lhs[right] = {};\n\t }\n\t }\n\t var value = lhs != null ? lhs[right] : undefined;\n\t if (expensiveChecks || isPossiblyDangerousMemberName(right)) {\n\t ensureSafeObject(value, expression);\n\t }\n\t if (context) {\n\t return {context: lhs, name: right, value: value};\n\t } else {\n\t return value;\n\t }\n\t };\n\t },\n\t inputs: function(input, watchId) {\n\t return function(scope, value, locals, inputs) {\n\t if (inputs) return inputs[watchId];\n\t return input(scope, value, locals);\n\t };\n\t }\n\t};\n\t\n\t/**\n\t * @constructor\n\t */\n\tvar Parser = function(lexer, $filter, options) {\n\t this.lexer = lexer;\n\t this.$filter = $filter;\n\t this.options = options;\n\t this.ast = new AST(this.lexer);\n\t this.astCompiler = options.csp ? new ASTInterpreter(this.ast, $filter) :\n\t new ASTCompiler(this.ast, $filter);\n\t};\n\t\n\tParser.prototype = {\n\t constructor: Parser,\n\t\n\t parse: function(text) {\n\t return this.astCompiler.compile(text, this.options.expensiveChecks);\n\t }\n\t};\n\t\n\tfunction isPossiblyDangerousMemberName(name) {\n\t return name == 'constructor';\n\t}\n\t\n\tvar objectValueOf = Object.prototype.valueOf;\n\t\n\tfunction getValueOf(value) {\n\t return isFunction(value.valueOf) ? value.valueOf() : objectValueOf.call(value);\n\t}\n\t\n\t///////////////////////////////////\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $parse\n\t * @kind function\n\t *\n\t * @description\n\t *\n\t * Converts Angular {@link guide/expression expression} into a function.\n\t *\n\t * ```js\n\t * var getter = $parse('user.name');\n\t * var setter = getter.assign;\n\t * var context = {user:{name:'angular'}};\n\t * var locals = {user:{name:'local'}};\n\t *\n\t * expect(getter(context)).toEqual('angular');\n\t * setter(context, 'newValue');\n\t * expect(context.user.name).toEqual('newValue');\n\t * expect(getter(context, locals)).toEqual('local');\n\t * ```\n\t *\n\t *\n\t * @param {string} expression String expression to compile.\n\t * @returns {function(context, locals)} a function which represents the compiled expression:\n\t *\n\t * * `context` `{object}` an object against which any expressions embedded in the strings\n\t * are evaluated against (typically a scope object).\n\t * * `locals` `{object=}` local variables context object, useful for overriding values in\n\t * `context`.\n\t *\n\t * The returned function also has the following properties:\n\t * * `literal` `{boolean}` whether the expression's top-level node is a JavaScript\n\t * literal.\n\t * * `constant` `{boolean}` whether the expression is made entirely of JavaScript\n\t * constant literals.\n\t * * `assign` `{?function(context, value)}` if the expression is assignable, this will be\n\t * set to a function to change its value on the given context.\n\t *\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc provider\n\t * @name $parseProvider\n\t *\n\t * @description\n\t * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse}\n\t * service.\n\t */\n\tfunction $ParseProvider() {\n\t var cacheDefault = createMap();\n\t var cacheExpensive = createMap();\n\t\n\t this.$get = ['$filter', function($filter) {\n\t var noUnsafeEval = csp().noUnsafeEval;\n\t var $parseOptions = {\n\t csp: noUnsafeEval,\n\t expensiveChecks: false\n\t },\n\t $parseOptionsExpensive = {\n\t csp: noUnsafeEval,\n\t expensiveChecks: true\n\t };\n\t var runningChecksEnabled = false;\n\t\n\t $parse.$$runningExpensiveChecks = function() {\n\t return runningChecksEnabled;\n\t };\n\t\n\t return $parse;\n\t\n\t function $parse(exp, interceptorFn, expensiveChecks) {\n\t var parsedExpression, oneTime, cacheKey;\n\t\n\t expensiveChecks = expensiveChecks || runningChecksEnabled;\n\t\n\t switch (typeof exp) {\n\t case 'string':\n\t exp = exp.trim();\n\t cacheKey = exp;\n\t\n\t var cache = (expensiveChecks ? cacheExpensive : cacheDefault);\n\t parsedExpression = cache[cacheKey];\n\t\n\t if (!parsedExpression) {\n\t if (exp.charAt(0) === ':' && exp.charAt(1) === ':') {\n\t oneTime = true;\n\t exp = exp.substring(2);\n\t }\n\t var parseOptions = expensiveChecks ? $parseOptionsExpensive : $parseOptions;\n\t var lexer = new Lexer(parseOptions);\n\t var parser = new Parser(lexer, $filter, parseOptions);\n\t parsedExpression = parser.parse(exp);\n\t if (parsedExpression.constant) {\n\t parsedExpression.$$watchDelegate = constantWatchDelegate;\n\t } else if (oneTime) {\n\t parsedExpression.$$watchDelegate = parsedExpression.literal ?\n\t oneTimeLiteralWatchDelegate : oneTimeWatchDelegate;\n\t } else if (parsedExpression.inputs) {\n\t parsedExpression.$$watchDelegate = inputsWatchDelegate;\n\t }\n\t if (expensiveChecks) {\n\t parsedExpression = expensiveChecksInterceptor(parsedExpression);\n\t }\n\t cache[cacheKey] = parsedExpression;\n\t }\n\t return addInterceptor(parsedExpression, interceptorFn);\n\t\n\t case 'function':\n\t return addInterceptor(exp, interceptorFn);\n\t\n\t default:\n\t return addInterceptor(noop, interceptorFn);\n\t }\n\t }\n\t\n\t function expensiveChecksInterceptor(fn) {\n\t if (!fn) return fn;\n\t expensiveCheckFn.$$watchDelegate = fn.$$watchDelegate;\n\t expensiveCheckFn.assign = expensiveChecksInterceptor(fn.assign);\n\t expensiveCheckFn.constant = fn.constant;\n\t expensiveCheckFn.literal = fn.literal;\n\t for (var i = 0; fn.inputs && i < fn.inputs.length; ++i) {\n\t fn.inputs[i] = expensiveChecksInterceptor(fn.inputs[i]);\n\t }\n\t expensiveCheckFn.inputs = fn.inputs;\n\t\n\t return expensiveCheckFn;\n\t\n\t function expensiveCheckFn(scope, locals, assign, inputs) {\n\t var expensiveCheckOldValue = runningChecksEnabled;\n\t runningChecksEnabled = true;\n\t try {\n\t return fn(scope, locals, assign, inputs);\n\t } finally {\n\t runningChecksEnabled = expensiveCheckOldValue;\n\t }\n\t }\n\t }\n\t\n\t function expressionInputDirtyCheck(newValue, oldValueOfValue) {\n\t\n\t if (newValue == null || oldValueOfValue == null) { // null/undefined\n\t return newValue === oldValueOfValue;\n\t }\n\t\n\t if (typeof newValue === 'object') {\n\t\n\t // attempt to convert the value to a primitive type\n\t // TODO(docs): add a note to docs that by implementing valueOf even objects and arrays can\n\t // be cheaply dirty-checked\n\t newValue = getValueOf(newValue);\n\t\n\t if (typeof newValue === 'object') {\n\t // objects/arrays are not supported - deep-watching them would be too expensive\n\t return false;\n\t }\n\t\n\t // fall-through to the primitive equality check\n\t }\n\t\n\t //Primitive or NaN\n\t return newValue === oldValueOfValue || (newValue !== newValue && oldValueOfValue !== oldValueOfValue);\n\t }\n\t\n\t function inputsWatchDelegate(scope, listener, objectEquality, parsedExpression, prettyPrintExpression) {\n\t var inputExpressions = parsedExpression.inputs;\n\t var lastResult;\n\t\n\t if (inputExpressions.length === 1) {\n\t var oldInputValueOf = expressionInputDirtyCheck; // init to something unique so that equals check fails\n\t inputExpressions = inputExpressions[0];\n\t return scope.$watch(function expressionInputWatch(scope) {\n\t var newInputValue = inputExpressions(scope);\n\t if (!expressionInputDirtyCheck(newInputValue, oldInputValueOf)) {\n\t lastResult = parsedExpression(scope, undefined, undefined, [newInputValue]);\n\t oldInputValueOf = newInputValue && getValueOf(newInputValue);\n\t }\n\t return lastResult;\n\t }, listener, objectEquality, prettyPrintExpression);\n\t }\n\t\n\t var oldInputValueOfValues = [];\n\t var oldInputValues = [];\n\t for (var i = 0, ii = inputExpressions.length; i < ii; i++) {\n\t oldInputValueOfValues[i] = expressionInputDirtyCheck; // init to something unique so that equals check fails\n\t oldInputValues[i] = null;\n\t }\n\t\n\t return scope.$watch(function expressionInputsWatch(scope) {\n\t var changed = false;\n\t\n\t for (var i = 0, ii = inputExpressions.length; i < ii; i++) {\n\t var newInputValue = inputExpressions[i](scope);\n\t if (changed || (changed = !expressionInputDirtyCheck(newInputValue, oldInputValueOfValues[i]))) {\n\t oldInputValues[i] = newInputValue;\n\t oldInputValueOfValues[i] = newInputValue && getValueOf(newInputValue);\n\t }\n\t }\n\t\n\t if (changed) {\n\t lastResult = parsedExpression(scope, undefined, undefined, oldInputValues);\n\t }\n\t\n\t return lastResult;\n\t }, listener, objectEquality, prettyPrintExpression);\n\t }\n\t\n\t function oneTimeWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n\t var unwatch, lastValue;\n\t return unwatch = scope.$watch(function oneTimeWatch(scope) {\n\t return parsedExpression(scope);\n\t }, function oneTimeListener(value, old, scope) {\n\t lastValue = value;\n\t if (isFunction(listener)) {\n\t listener.apply(this, arguments);\n\t }\n\t if (isDefined(value)) {\n\t scope.$$postDigest(function() {\n\t if (isDefined(lastValue)) {\n\t unwatch();\n\t }\n\t });\n\t }\n\t }, objectEquality);\n\t }\n\t\n\t function oneTimeLiteralWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n\t var unwatch, lastValue;\n\t return unwatch = scope.$watch(function oneTimeWatch(scope) {\n\t return parsedExpression(scope);\n\t }, function oneTimeListener(value, old, scope) {\n\t lastValue = value;\n\t if (isFunction(listener)) {\n\t listener.call(this, value, old, scope);\n\t }\n\t if (isAllDefined(value)) {\n\t scope.$$postDigest(function() {\n\t if (isAllDefined(lastValue)) unwatch();\n\t });\n\t }\n\t }, objectEquality);\n\t\n\t function isAllDefined(value) {\n\t var allDefined = true;\n\t forEach(value, function(val) {\n\t if (!isDefined(val)) allDefined = false;\n\t });\n\t return allDefined;\n\t }\n\t }\n\t\n\t function constantWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n\t var unwatch;\n\t return unwatch = scope.$watch(function constantWatch(scope) {\n\t return parsedExpression(scope);\n\t }, function constantListener(value, old, scope) {\n\t if (isFunction(listener)) {\n\t listener.apply(this, arguments);\n\t }\n\t unwatch();\n\t }, objectEquality);\n\t }\n\t\n\t function addInterceptor(parsedExpression, interceptorFn) {\n\t if (!interceptorFn) return parsedExpression;\n\t var watchDelegate = parsedExpression.$$watchDelegate;\n\t var useInputs = false;\n\t\n\t var regularWatch =\n\t watchDelegate !== oneTimeLiteralWatchDelegate &&\n\t watchDelegate !== oneTimeWatchDelegate;\n\t\n\t var fn = regularWatch ? function regularInterceptedExpression(scope, locals, assign, inputs) {\n\t var value = useInputs && inputs ? inputs[0] : parsedExpression(scope, locals, assign, inputs);\n\t return interceptorFn(value, scope, locals);\n\t } : function oneTimeInterceptedExpression(scope, locals, assign, inputs) {\n\t var value = parsedExpression(scope, locals, assign, inputs);\n\t var result = interceptorFn(value, scope, locals);\n\t // we only return the interceptor's result if the\n\t // initial value is defined (for bind-once)\n\t return isDefined(value) ? result : value;\n\t };\n\t\n\t // Propagate $$watchDelegates other then inputsWatchDelegate\n\t if (parsedExpression.$$watchDelegate &&\n\t parsedExpression.$$watchDelegate !== inputsWatchDelegate) {\n\t fn.$$watchDelegate = parsedExpression.$$watchDelegate;\n\t } else if (!interceptorFn.$stateful) {\n\t // If there is an interceptor, but no watchDelegate then treat the interceptor like\n\t // we treat filters - it is assumed to be a pure function unless flagged with $stateful\n\t fn.$$watchDelegate = inputsWatchDelegate;\n\t useInputs = !parsedExpression.inputs;\n\t fn.inputs = parsedExpression.inputs ? parsedExpression.inputs : [parsedExpression];\n\t }\n\t\n\t return fn;\n\t }\n\t }];\n\t}\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $q\n\t * @requires $rootScope\n\t *\n\t * @description\n\t * A service that helps you run functions asynchronously, and use their return values (or exceptions)\n\t * when they are done processing.\n\t *\n\t * This is an implementation of promises/deferred objects inspired by\n\t * [Kris Kowal's Q](https://github.com/kriskowal/q).\n\t *\n\t * $q can be used in two fashions --- one which is more similar to Kris Kowal's Q or jQuery's Deferred\n\t * implementations, and the other which resembles ES6 (ES2015) promises to some degree.\n\t *\n\t * # $q constructor\n\t *\n\t * The streamlined ES6 style promise is essentially just using $q as a constructor which takes a `resolver`\n\t * function as the first argument. This is similar to the native Promise implementation from ES6,\n\t * see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n\t *\n\t * While the constructor-style use is supported, not all of the supporting methods from ES6 promises are\n\t * available yet.\n\t *\n\t * It can be used like so:\n\t *\n\t * ```js\n\t * // for the purpose of this example let's assume that variables `$q` and `okToGreet`\n\t * // are available in the current lexical scope (they could have been injected or passed in).\n\t *\n\t * function asyncGreet(name) {\n\t * // perform some asynchronous operation, resolve or reject the promise when appropriate.\n\t * return $q(function(resolve, reject) {\n\t * setTimeout(function() {\n\t * if (okToGreet(name)) {\n\t * resolve('Hello, ' + name + '!');\n\t * } else {\n\t * reject('Greeting ' + name + ' is not allowed.');\n\t * }\n\t * }, 1000);\n\t * });\n\t * }\n\t *\n\t * var promise = asyncGreet('Robin Hood');\n\t * promise.then(function(greeting) {\n\t * alert('Success: ' + greeting);\n\t * }, function(reason) {\n\t * alert('Failed: ' + reason);\n\t * });\n\t * ```\n\t *\n\t * Note: progress/notify callbacks are not currently supported via the ES6-style interface.\n\t *\n\t * Note: unlike ES6 behaviour, an exception thrown in the constructor function will NOT implicitly reject the promise.\n\t *\n\t * However, the more traditional CommonJS-style usage is still available, and documented below.\n\t *\n\t * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an\n\t * interface for interacting with an object that represents the result of an action that is\n\t * performed asynchronously, and may or may not be finished at any given point in time.\n\t *\n\t * From the perspective of dealing with error handling, deferred and promise APIs are to\n\t * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming.\n\t *\n\t * ```js\n\t * // for the purpose of this example let's assume that variables `$q` and `okToGreet`\n\t * // are available in the current lexical scope (they could have been injected or passed in).\n\t *\n\t * function asyncGreet(name) {\n\t * var deferred = $q.defer();\n\t *\n\t * setTimeout(function() {\n\t * deferred.notify('About to greet ' + name + '.');\n\t *\n\t * if (okToGreet(name)) {\n\t * deferred.resolve('Hello, ' + name + '!');\n\t * } else {\n\t * deferred.reject('Greeting ' + name + ' is not allowed.');\n\t * }\n\t * }, 1000);\n\t *\n\t * return deferred.promise;\n\t * }\n\t *\n\t * var promise = asyncGreet('Robin Hood');\n\t * promise.then(function(greeting) {\n\t * alert('Success: ' + greeting);\n\t * }, function(reason) {\n\t * alert('Failed: ' + reason);\n\t * }, function(update) {\n\t * alert('Got notification: ' + update);\n\t * });\n\t * ```\n\t *\n\t * At first it might not be obvious why this extra complexity is worth the trouble. The payoff\n\t * comes in the way of guarantees that promise and deferred APIs make, see\n\t * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md.\n\t *\n\t * Additionally the promise api allows for composition that is very hard to do with the\n\t * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach.\n\t * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the\n\t * section on serial or parallel joining of promises.\n\t *\n\t * # The Deferred API\n\t *\n\t * A new instance of deferred is constructed by calling `$q.defer()`.\n\t *\n\t * The purpose of the deferred object is to expose the associated Promise instance as well as APIs\n\t * that can be used for signaling the successful or unsuccessful completion, as well as the status\n\t * of the task.\n\t *\n\t * **Methods**\n\t *\n\t * - `resolve(value)` resolves the derived promise with the `value`. If the value is a rejection\n\t * constructed via `$q.reject`, the promise will be rejected instead.\n\t * - `reject(reason)` rejects the derived promise with the `reason`. This is equivalent to\n\t * resolving it with a rejection constructed via `$q.reject`.\n\t * - `notify(value)` - provides updates on the status of the promise's execution. This may be called\n\t * multiple times before the promise is either resolved or rejected.\n\t *\n\t * **Properties**\n\t *\n\t * - promise `{Promise}` promise object associated with this deferred.\n\t *\n\t *\n\t * # The Promise API\n\t *\n\t * A new promise instance is created when a deferred instance is created and can be retrieved by\n\t * calling `deferred.promise`.\n\t *\n\t * The purpose of the promise object is to allow for interested parties to get access to the result\n\t * of the deferred task when it completes.\n\t *\n\t * **Methods**\n\t *\n\t * - `then(successCallback, errorCallback, notifyCallback)` regardless of when the promise was or\n\t * will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously\n\t * as soon as the result is available. The callbacks are called with a single argument: the result\n\t * or rejection reason. Additionally, the notify callback may be called zero or more times to\n\t * provide a progress indication, before the promise is resolved or rejected.\n\t *\n\t * This method *returns a new promise* which is resolved or rejected via the return value of the\n\t * `successCallback`, `errorCallback` (unless that value is a promise, in which case it is resolved\n\t * with the value which is resolved in that promise using\n\t * [promise chaining](http://www.html5rocks.com/en/tutorials/es6/promises/#toc-promises-queues)).\n\t * It also notifies via the return value of the `notifyCallback` method. The promise cannot be\n\t * resolved or rejected from the notifyCallback method.\n\t *\n\t * - `catch(errorCallback)` shorthand for `promise.then(null, errorCallback)`\n\t *\n\t * - `finally(callback, notifyCallback)` allows you to observe either the fulfillment or rejection of a promise,\n\t * but to do so without modifying the final value. This is useful to release resources or do some\n\t * clean-up that needs to be done whether the promise was rejected or resolved. See the [full\n\t * specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for\n\t * more information.\n\t *\n\t * # Chaining promises\n\t *\n\t * Because calling the `then` method of a promise returns a new derived promise, it is easily\n\t * possible to create a chain of promises:\n\t *\n\t * ```js\n\t * promiseB = promiseA.then(function(result) {\n\t * return result + 1;\n\t * });\n\t *\n\t * // promiseB will be resolved immediately after promiseA is resolved and its value\n\t * // will be the result of promiseA incremented by 1\n\t * ```\n\t *\n\t * It is possible to create chains of any length and since a promise can be resolved with another\n\t * promise (which will defer its resolution further), it is possible to pause/defer resolution of\n\t * the promises at any point in the chain. This makes it possible to implement powerful APIs like\n\t * $http's response interceptors.\n\t *\n\t *\n\t * # Differences between Kris Kowal's Q and $q\n\t *\n\t * There are two main differences:\n\t *\n\t * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation\n\t * mechanism in angular, which means faster propagation of resolution or rejection into your\n\t * models and avoiding unnecessary browser repaints, which would result in flickering UI.\n\t * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains\n\t * all the important functionality needed for common async tasks.\n\t *\n\t * # Testing\n\t *\n\t * ```js\n\t * it('should simulate promise', inject(function($q, $rootScope) {\n\t * var deferred = $q.defer();\n\t * var promise = deferred.promise;\n\t * var resolvedValue;\n\t *\n\t * promise.then(function(value) { resolvedValue = value; });\n\t * expect(resolvedValue).toBeUndefined();\n\t *\n\t * // Simulate resolving of promise\n\t * deferred.resolve(123);\n\t * // Note that the 'then' function does not get called synchronously.\n\t * // This is because we want the promise API to always be async, whether or not\n\t * // it got called synchronously or asynchronously.\n\t * expect(resolvedValue).toBeUndefined();\n\t *\n\t * // Propagate promise resolution to 'then' functions using $apply().\n\t * $rootScope.$apply();\n\t * expect(resolvedValue).toEqual(123);\n\t * }));\n\t * ```\n\t *\n\t * @param {function(function, function)} resolver Function which is responsible for resolving or\n\t * rejecting the newly created promise. The first parameter is a function which resolves the\n\t * promise, the second parameter is a function which rejects the promise.\n\t *\n\t * @returns {Promise} The newly created promise.\n\t */\n\tfunction $QProvider() {\n\t\n\t this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {\n\t return qFactory(function(callback) {\n\t $rootScope.$evalAsync(callback);\n\t }, $exceptionHandler);\n\t }];\n\t}\n\t\n\tfunction $$QProvider() {\n\t this.$get = ['$browser', '$exceptionHandler', function($browser, $exceptionHandler) {\n\t return qFactory(function(callback) {\n\t $browser.defer(callback);\n\t }, $exceptionHandler);\n\t }];\n\t}\n\t\n\t/**\n\t * Constructs a promise manager.\n\t *\n\t * @param {function(function)} nextTick Function for executing functions in the next turn.\n\t * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for\n\t * debugging purposes.\n\t * @returns {object} Promise manager.\n\t */\n\tfunction qFactory(nextTick, exceptionHandler) {\n\t var $qMinErr = minErr('$q', TypeError);\n\t function callOnce(self, resolveFn, rejectFn) {\n\t var called = false;\n\t function wrap(fn) {\n\t return function(value) {\n\t if (called) return;\n\t called = true;\n\t fn.call(self, value);\n\t };\n\t }\n\t\n\t return [wrap(resolveFn), wrap(rejectFn)];\n\t }\n\t\n\t /**\n\t * @ngdoc method\n\t * @name ng.$q#defer\n\t * @kind function\n\t *\n\t * @description\n\t * Creates a `Deferred` object which represents a task which will finish in the future.\n\t *\n\t * @returns {Deferred} Returns a new instance of deferred.\n\t */\n\t var defer = function() {\n\t return new Deferred();\n\t };\n\t\n\t function Promise() {\n\t this.$$state = { status: 0 };\n\t }\n\t\n\t extend(Promise.prototype, {\n\t then: function(onFulfilled, onRejected, progressBack) {\n\t if (isUndefined(onFulfilled) && isUndefined(onRejected) && isUndefined(progressBack)) {\n\t return this;\n\t }\n\t var result = new Deferred();\n\t\n\t this.$$state.pending = this.$$state.pending || [];\n\t this.$$state.pending.push([result, onFulfilled, onRejected, progressBack]);\n\t if (this.$$state.status > 0) scheduleProcessQueue(this.$$state);\n\t\n\t return result.promise;\n\t },\n\t\n\t \"catch\": function(callback) {\n\t return this.then(null, callback);\n\t },\n\t\n\t \"finally\": function(callback, progressBack) {\n\t return this.then(function(value) {\n\t return handleCallback(value, true, callback);\n\t }, function(error) {\n\t return handleCallback(error, false, callback);\n\t }, progressBack);\n\t }\n\t });\n\t\n\t //Faster, more basic than angular.bind http://jsperf.com/angular-bind-vs-custom-vs-native\n\t function simpleBind(context, fn) {\n\t return function(value) {\n\t fn.call(context, value);\n\t };\n\t }\n\t\n\t function processQueue(state) {\n\t var fn, deferred, pending;\n\t\n\t pending = state.pending;\n\t state.processScheduled = false;\n\t state.pending = undefined;\n\t for (var i = 0, ii = pending.length; i < ii; ++i) {\n\t deferred = pending[i][0];\n\t fn = pending[i][state.status];\n\t try {\n\t if (isFunction(fn)) {\n\t deferred.resolve(fn(state.value));\n\t } else if (state.status === 1) {\n\t deferred.resolve(state.value);\n\t } else {\n\t deferred.reject(state.value);\n\t }\n\t } catch (e) {\n\t deferred.reject(e);\n\t exceptionHandler(e);\n\t }\n\t }\n\t }\n\t\n\t function scheduleProcessQueue(state) {\n\t if (state.processScheduled || !state.pending) return;\n\t state.processScheduled = true;\n\t nextTick(function() { processQueue(state); });\n\t }\n\t\n\t function Deferred() {\n\t this.promise = new Promise();\n\t //Necessary to support unbound execution :/\n\t this.resolve = simpleBind(this, this.resolve);\n\t this.reject = simpleBind(this, this.reject);\n\t this.notify = simpleBind(this, this.notify);\n\t }\n\t\n\t extend(Deferred.prototype, {\n\t resolve: function(val) {\n\t if (this.promise.$$state.status) return;\n\t if (val === this.promise) {\n\t this.$$reject($qMinErr(\n\t 'qcycle',\n\t \"Expected promise to be resolved with value other than itself '{0}'\",\n\t val));\n\t } else {\n\t this.$$resolve(val);\n\t }\n\t\n\t },\n\t\n\t $$resolve: function(val) {\n\t var then, fns;\n\t\n\t fns = callOnce(this, this.$$resolve, this.$$reject);\n\t try {\n\t if ((isObject(val) || isFunction(val))) then = val && val.then;\n\t if (isFunction(then)) {\n\t this.promise.$$state.status = -1;\n\t then.call(val, fns[0], fns[1], this.notify);\n\t } else {\n\t this.promise.$$state.value = val;\n\t this.promise.$$state.status = 1;\n\t scheduleProcessQueue(this.promise.$$state);\n\t }\n\t } catch (e) {\n\t fns[1](e);\n\t exceptionHandler(e);\n\t }\n\t },\n\t\n\t reject: function(reason) {\n\t if (this.promise.$$state.status) return;\n\t this.$$reject(reason);\n\t },\n\t\n\t $$reject: function(reason) {\n\t this.promise.$$state.value = reason;\n\t this.promise.$$state.status = 2;\n\t scheduleProcessQueue(this.promise.$$state);\n\t },\n\t\n\t notify: function(progress) {\n\t var callbacks = this.promise.$$state.pending;\n\t\n\t if ((this.promise.$$state.status <= 0) && callbacks && callbacks.length) {\n\t nextTick(function() {\n\t var callback, result;\n\t for (var i = 0, ii = callbacks.length; i < ii; i++) {\n\t result = callbacks[i][0];\n\t callback = callbacks[i][3];\n\t try {\n\t result.notify(isFunction(callback) ? callback(progress) : progress);\n\t } catch (e) {\n\t exceptionHandler(e);\n\t }\n\t }\n\t });\n\t }\n\t }\n\t });\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $q#reject\n\t * @kind function\n\t *\n\t * @description\n\t * Creates a promise that is resolved as rejected with the specified `reason`. This api should be\n\t * used to forward rejection in a chain of promises. If you are dealing with the last promise in\n\t * a promise chain, you don't need to worry about it.\n\t *\n\t * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of\n\t * `reject` as the `throw` keyword in JavaScript. This also means that if you \"catch\" an error via\n\t * a promise error callback and you want to forward the error to the promise derived from the\n\t * current promise, you have to \"rethrow\" the error by returning a rejection constructed via\n\t * `reject`.\n\t *\n\t * ```js\n\t * promiseB = promiseA.then(function(result) {\n\t * // success: do something and resolve promiseB\n\t * // with the old or a new result\n\t * return result;\n\t * }, function(reason) {\n\t * // error: handle the error if possible and\n\t * // resolve promiseB with newPromiseOrValue,\n\t * // otherwise forward the rejection to promiseB\n\t * if (canHandle(reason)) {\n\t * // handle the error and recover\n\t * return newPromiseOrValue;\n\t * }\n\t * return $q.reject(reason);\n\t * });\n\t * ```\n\t *\n\t * @param {*} reason Constant, message, exception or an object representing the rejection reason.\n\t * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`.\n\t */\n\t var reject = function(reason) {\n\t var result = new Deferred();\n\t result.reject(reason);\n\t return result.promise;\n\t };\n\t\n\t var makePromise = function makePromise(value, resolved) {\n\t var result = new Deferred();\n\t if (resolved) {\n\t result.resolve(value);\n\t } else {\n\t result.reject(value);\n\t }\n\t return result.promise;\n\t };\n\t\n\t var handleCallback = function handleCallback(value, isResolved, callback) {\n\t var callbackOutput = null;\n\t try {\n\t if (isFunction(callback)) callbackOutput = callback();\n\t } catch (e) {\n\t return makePromise(e, false);\n\t }\n\t if (isPromiseLike(callbackOutput)) {\n\t return callbackOutput.then(function() {\n\t return makePromise(value, isResolved);\n\t }, function(error) {\n\t return makePromise(error, false);\n\t });\n\t } else {\n\t return makePromise(value, isResolved);\n\t }\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $q#when\n\t * @kind function\n\t *\n\t * @description\n\t * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.\n\t * This is useful when you are dealing with an object that might or might not be a promise, or if\n\t * the promise comes from a source that can't be trusted.\n\t *\n\t * @param {*} value Value or a promise\n\t * @param {Function=} successCallback\n\t * @param {Function=} errorCallback\n\t * @param {Function=} progressCallback\n\t * @returns {Promise} Returns a promise of the passed value or promise\n\t */\n\t\n\t\n\t var when = function(value, callback, errback, progressBack) {\n\t var result = new Deferred();\n\t result.resolve(value);\n\t return result.promise.then(callback, errback, progressBack);\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $q#resolve\n\t * @kind function\n\t *\n\t * @description\n\t * Alias of {@link ng.$q#when when} to maintain naming consistency with ES6.\n\t *\n\t * @param {*} value Value or a promise\n\t * @param {Function=} successCallback\n\t * @param {Function=} errorCallback\n\t * @param {Function=} progressCallback\n\t * @returns {Promise} Returns a promise of the passed value or promise\n\t */\n\t var resolve = when;\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $q#all\n\t * @kind function\n\t *\n\t * @description\n\t * Combines multiple promises into a single promise that is resolved when all of the input\n\t * promises are resolved.\n\t *\n\t * @param {Array.<Promise>|Object.<Promise>} promises An array or hash of promises.\n\t * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values,\n\t * each value corresponding to the promise at the same index/key in the `promises` array/hash.\n\t * If any of the promises is resolved with a rejection, this resulting promise will be rejected\n\t * with the same rejection value.\n\t */\n\t\n\t function all(promises) {\n\t var deferred = new Deferred(),\n\t counter = 0,\n\t results = isArray(promises) ? [] : {};\n\t\n\t forEach(promises, function(promise, key) {\n\t counter++;\n\t when(promise).then(function(value) {\n\t if (results.hasOwnProperty(key)) return;\n\t results[key] = value;\n\t if (!(--counter)) deferred.resolve(results);\n\t }, function(reason) {\n\t if (results.hasOwnProperty(key)) return;\n\t deferred.reject(reason);\n\t });\n\t });\n\t\n\t if (counter === 0) {\n\t deferred.resolve(results);\n\t }\n\t\n\t return deferred.promise;\n\t }\n\t\n\t var $Q = function Q(resolver) {\n\t if (!isFunction(resolver)) {\n\t throw $qMinErr('norslvr', \"Expected resolverFn, got '{0}'\", resolver);\n\t }\n\t\n\t if (!(this instanceof Q)) {\n\t // More useful when $Q is the Promise itself.\n\t return new Q(resolver);\n\t }\n\t\n\t var deferred = new Deferred();\n\t\n\t function resolveFn(value) {\n\t deferred.resolve(value);\n\t }\n\t\n\t function rejectFn(reason) {\n\t deferred.reject(reason);\n\t }\n\t\n\t resolver(resolveFn, rejectFn);\n\t\n\t return deferred.promise;\n\t };\n\t\n\t $Q.defer = defer;\n\t $Q.reject = reject;\n\t $Q.when = when;\n\t $Q.resolve = resolve;\n\t $Q.all = all;\n\t\n\t return $Q;\n\t}\n\t\n\tfunction $$RAFProvider() { //rAF\n\t this.$get = ['$window', '$timeout', function($window, $timeout) {\n\t var requestAnimationFrame = $window.requestAnimationFrame ||\n\t $window.webkitRequestAnimationFrame;\n\t\n\t var cancelAnimationFrame = $window.cancelAnimationFrame ||\n\t $window.webkitCancelAnimationFrame ||\n\t $window.webkitCancelRequestAnimationFrame;\n\t\n\t var rafSupported = !!requestAnimationFrame;\n\t var raf = rafSupported\n\t ? function(fn) {\n\t var id = requestAnimationFrame(fn);\n\t return function() {\n\t cancelAnimationFrame(id);\n\t };\n\t }\n\t : function(fn) {\n\t var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666\n\t return function() {\n\t $timeout.cancel(timer);\n\t };\n\t };\n\t\n\t raf.supported = rafSupported;\n\t\n\t return raf;\n\t }];\n\t}\n\t\n\t/**\n\t * DESIGN NOTES\n\t *\n\t * The design decisions behind the scope are heavily favored for speed and memory consumption.\n\t *\n\t * The typical use of scope is to watch the expressions, which most of the time return the same\n\t * value as last time so we optimize the operation.\n\t *\n\t * Closures construction is expensive in terms of speed as well as memory:\n\t * - No closures, instead use prototypical inheritance for API\n\t * - Internal state needs to be stored on scope directly, which means that private state is\n\t * exposed as $$____ properties\n\t *\n\t * Loop operations are optimized by using while(count--) { ... }\n\t * - This means that in order to keep the same order of execution as addition we have to add\n\t * items to the array at the beginning (unshift) instead of at the end (push)\n\t *\n\t * Child scopes are created and removed often\n\t * - Using an array would be slow since inserts in the middle are expensive; so we use linked lists\n\t *\n\t * There are fewer watches than observers. This is why you don't want the observer to be implemented\n\t * in the same way as watch. Watch requires return of the initialization function which is expensive\n\t * to construct.\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc provider\n\t * @name $rootScopeProvider\n\t * @description\n\t *\n\t * Provider for the $rootScope service.\n\t */\n\t\n\t/**\n\t * @ngdoc method\n\t * @name $rootScopeProvider#digestTtl\n\t * @description\n\t *\n\t * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and\n\t * assuming that the model is unstable.\n\t *\n\t * The current default is 10 iterations.\n\t *\n\t * In complex applications it's possible that the dependencies between `$watch`s will result in\n\t * several digest iterations. However if an application needs more than the default 10 digest\n\t * iterations for its model to stabilize then you should investigate what is causing the model to\n\t * continuously change during the digest.\n\t *\n\t * Increasing the TTL could have performance implications, so you should not change it without\n\t * proper justification.\n\t *\n\t * @param {number} limit The number of digest iterations.\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $rootScope\n\t * @description\n\t *\n\t * Every application has a single root {@link ng.$rootScope.Scope scope}.\n\t * All other scopes are descendant scopes of the root scope. Scopes provide separation\n\t * between the model and the view, via a mechanism for watching the model for changes.\n\t * They also provide event emission/broadcast and subscription facility. See the\n\t * {@link guide/scope developer guide on scopes}.\n\t */\n\tfunction $RootScopeProvider() {\n\t var TTL = 10;\n\t var $rootScopeMinErr = minErr('$rootScope');\n\t var lastDirtyWatch = null;\n\t var applyAsyncId = null;\n\t\n\t this.digestTtl = function(value) {\n\t if (arguments.length) {\n\t TTL = value;\n\t }\n\t return TTL;\n\t };\n\t\n\t function createChildScopeClass(parent) {\n\t function ChildScope() {\n\t this.$$watchers = this.$$nextSibling =\n\t this.$$childHead = this.$$childTail = null;\n\t this.$$listeners = {};\n\t this.$$listenerCount = {};\n\t this.$$watchersCount = 0;\n\t this.$id = nextUid();\n\t this.$$ChildScope = null;\n\t }\n\t ChildScope.prototype = parent;\n\t return ChildScope;\n\t }\n\t\n\t this.$get = ['$injector', '$exceptionHandler', '$parse', '$browser',\n\t function($injector, $exceptionHandler, $parse, $browser) {\n\t\n\t function destroyChildScope($event) {\n\t $event.currentScope.$$destroyed = true;\n\t }\n\t\n\t function cleanUpScope($scope) {\n\t\n\t if (msie === 9) {\n\t // There is a memory leak in IE9 if all child scopes are not disconnected\n\t // completely when a scope is destroyed. So this code will recurse up through\n\t // all this scopes children\n\t //\n\t // See issue https://github.com/angular/angular.js/issues/10706\n\t $scope.$$childHead && cleanUpScope($scope.$$childHead);\n\t $scope.$$nextSibling && cleanUpScope($scope.$$nextSibling);\n\t }\n\t\n\t // The code below works around IE9 and V8's memory leaks\n\t //\n\t // See:\n\t // - https://code.google.com/p/v8/issues/detail?id=2073#c26\n\t // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909\n\t // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451\n\t\n\t $scope.$parent = $scope.$$nextSibling = $scope.$$prevSibling = $scope.$$childHead =\n\t $scope.$$childTail = $scope.$root = $scope.$$watchers = null;\n\t }\n\t\n\t /**\n\t * @ngdoc type\n\t * @name $rootScope.Scope\n\t *\n\t * @description\n\t * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the\n\t * {@link auto.$injector $injector}. Child scopes are created using the\n\t * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when\n\t * compiled HTML template is executed.) See also the {@link guide/scope Scopes guide} for\n\t * an in-depth introduction and usage examples.\n\t *\n\t *\n\t * # Inheritance\n\t * A scope can inherit from a parent scope, as in this example:\n\t * ```js\n\t var parent = $rootScope;\n\t var child = parent.$new();\n\t\n\t parent.salutation = \"Hello\";\n\t expect(child.salutation).toEqual('Hello');\n\t\n\t child.salutation = \"Welcome\";\n\t expect(child.salutation).toEqual('Welcome');\n\t expect(parent.salutation).toEqual('Hello');\n\t * ```\n\t *\n\t * When interacting with `Scope` in tests, additional helper methods are available on the\n\t * instances of `Scope` type. See {@link ngMock.$rootScope.Scope ngMock Scope} for additional\n\t * details.\n\t *\n\t *\n\t * @param {Object.<string, function()>=} providers Map of service factory which need to be\n\t * provided for the current scope. Defaults to {@link ng}.\n\t * @param {Object.<string, *>=} instanceCache Provides pre-instantiated services which should\n\t * append/override services provided by `providers`. This is handy\n\t * when unit-testing and having the need to override a default\n\t * service.\n\t * @returns {Object} Newly created scope.\n\t *\n\t */\n\t function Scope() {\n\t this.$id = nextUid();\n\t this.$$phase = this.$parent = this.$$watchers =\n\t this.$$nextSibling = this.$$prevSibling =\n\t this.$$childHead = this.$$childTail = null;\n\t this.$root = this;\n\t this.$$destroyed = false;\n\t this.$$listeners = {};\n\t this.$$listenerCount = {};\n\t this.$$watchersCount = 0;\n\t this.$$isolateBindings = null;\n\t }\n\t\n\t /**\n\t * @ngdoc property\n\t * @name $rootScope.Scope#$id\n\t *\n\t * @description\n\t * Unique scope ID (monotonically increasing) useful for debugging.\n\t */\n\t\n\t /**\n\t * @ngdoc property\n\t * @name $rootScope.Scope#$parent\n\t *\n\t * @description\n\t * Reference to the parent scope.\n\t */\n\t\n\t /**\n\t * @ngdoc property\n\t * @name $rootScope.Scope#$root\n\t *\n\t * @description\n\t * Reference to the root scope.\n\t */\n\t\n\t Scope.prototype = {\n\t constructor: Scope,\n\t /**\n\t * @ngdoc method\n\t * @name $rootScope.Scope#$new\n\t * @kind function\n\t *\n\t * @description\n\t * Creates a new child {@link ng.$rootScope.Scope scope}.\n\t *\n\t * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} event.\n\t * The scope can be removed from the scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.\n\t *\n\t * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is\n\t * desired for the scope and its child scopes to be permanently detached from the parent and\n\t * thus stop participating in model change detection and listener notification by invoking.\n\t *\n\t * @param {boolean} isolate If true, then the scope does not prototypically inherit from the\n\t * parent scope. The scope is isolated, as it can not see parent scope properties.\n\t * When creating widgets, it is useful for the widget to not accidentally read parent\n\t * state.\n\t *\n\t * @param {Scope} [parent=this] The {@link ng.$rootScope.Scope `Scope`} that will be the `$parent`\n\t * of the newly created scope. Defaults to `this` scope if not provided.\n\t * This is used when creating a transclude scope to correctly place it\n\t * in the scope hierarchy while maintaining the correct prototypical\n\t * inheritance.\n\t *\n\t * @returns {Object} The newly created child scope.\n\t *\n\t */\n\t $new: function(isolate, parent) {\n\t var child;\n\t\n\t parent = parent || this;\n\t\n\t if (isolate) {\n\t child = new Scope();\n\t child.$root = this.$root;\n\t } else {\n\t // Only create a child scope class if somebody asks for one,\n\t // but cache it to allow the VM to optimize lookups.\n\t if (!this.$$ChildScope) {\n\t this.$$ChildScope = createChildScopeClass(this);\n\t }\n\t child = new this.$$ChildScope();\n\t }\n\t child.$parent = parent;\n\t child.$$prevSibling = parent.$$childTail;\n\t if (parent.$$childHead) {\n\t parent.$$childTail.$$nextSibling = child;\n\t parent.$$childTail = child;\n\t } else {\n\t parent.$$childHead = parent.$$childTail = child;\n\t }\n\t\n\t // When the new scope is not isolated or we inherit from `this`, and\n\t // the parent scope is destroyed, the property `$$destroyed` is inherited\n\t // prototypically. In all other cases, this property needs to be set\n\t // when the parent scope is destroyed.\n\t // The listener needs to be added after the parent is set\n\t if (isolate || parent != this) child.$on('$destroy', destroyChildScope);\n\t\n\t return child;\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $rootScope.Scope#$watch\n\t * @kind function\n\t *\n\t * @description\n\t * Registers a `listener` callback to be executed whenever the `watchExpression` changes.\n\t *\n\t * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest\n\t * $digest()} and should return the value that will be watched. (`watchExpression` should not change\n\t * its value when executed multiple times with the same input because it may be executed multiple\n\t * times by {@link ng.$rootScope.Scope#$digest $digest()}. That is, `watchExpression` should be\n\t * [idempotent](http://en.wikipedia.org/wiki/Idempotence).\n\t * - The `listener` is called only when the value from the current `watchExpression` and the\n\t * previous call to `watchExpression` are not equal (with the exception of the initial run,\n\t * see below). Inequality is determined according to reference inequality,\n\t * [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)\n\t * via the `!==` Javascript operator, unless `objectEquality == true`\n\t * (see next point)\n\t * - When `objectEquality == true`, inequality of the `watchExpression` is determined\n\t * according to the {@link angular.equals} function. To save the value of the object for\n\t * later comparison, the {@link angular.copy} function is used. This therefore means that\n\t * watching complex objects will have adverse memory and performance implications.\n\t * - The watch `listener` may change the model, which may trigger other `listener`s to fire.\n\t * This is achieved by rerunning the watchers until no changes are detected. The rerun\n\t * iteration limit is 10 to prevent an infinite loop deadlock.\n\t *\n\t *\n\t * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,\n\t * you can register a `watchExpression` function with no `listener`. (Be prepared for\n\t * multiple calls to your `watchExpression` because it will execute multiple times in a\n\t * single {@link ng.$rootScope.Scope#$digest $digest} cycle if a change is detected.)\n\t *\n\t * After a watcher is registered with the scope, the `listener` fn is called asynchronously\n\t * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the\n\t * watcher. In rare cases, this is undesirable because the listener is called when the result\n\t * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you\n\t * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the\n\t * listener was called due to initialization.\n\t *\n\t *\n\t *\n\t * # Example\n\t * ```js\n\t // let's assume that scope was dependency injected as the $rootScope\n\t var scope = $rootScope;\n\t scope.name = 'misko';\n\t scope.counter = 0;\n\t\n\t expect(scope.counter).toEqual(0);\n\t scope.$watch('name', function(newValue, oldValue) {\n\t scope.counter = scope.counter + 1;\n\t });\n\t expect(scope.counter).toEqual(0);\n\t\n\t scope.$digest();\n\t // the listener is always called during the first $digest loop after it was registered\n\t expect(scope.counter).toEqual(1);\n\t\n\t scope.$digest();\n\t // but now it will not be called unless the value changes\n\t expect(scope.counter).toEqual(1);\n\t\n\t scope.name = 'adam';\n\t scope.$digest();\n\t expect(scope.counter).toEqual(2);\n\t\n\t\n\t\n\t // Using a function as a watchExpression\n\t var food;\n\t scope.foodCounter = 0;\n\t expect(scope.foodCounter).toEqual(0);\n\t scope.$watch(\n\t // This function returns the value being watched. It is called for each turn of the $digest loop\n\t function() { return food; },\n\t // This is the change listener, called when the value returned from the above function changes\n\t function(newValue, oldValue) {\n\t if ( newValue !== oldValue ) {\n\t // Only increment the counter if the value changed\n\t scope.foodCounter = scope.foodCounter + 1;\n\t }\n\t }\n\t );\n\t // No digest has been run so the counter will be zero\n\t expect(scope.foodCounter).toEqual(0);\n\t\n\t // Run the digest but since food has not changed count will still be zero\n\t scope.$digest();\n\t expect(scope.foodCounter).toEqual(0);\n\t\n\t // Update food and run digest. Now the counter will increment\n\t food = 'cheeseburger';\n\t scope.$digest();\n\t expect(scope.foodCounter).toEqual(1);\n\t\n\t * ```\n\t *\n\t *\n\t *\n\t * @param {(function()|string)} watchExpression Expression that is evaluated on each\n\t * {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers\n\t * a call to the `listener`.\n\t *\n\t * - `string`: Evaluated as {@link guide/expression expression}\n\t * - `function(scope)`: called with current `scope` as a parameter.\n\t * @param {function(newVal, oldVal, scope)} listener Callback called whenever the value\n\t * of `watchExpression` changes.\n\t *\n\t * - `newVal` contains the current value of the `watchExpression`\n\t * - `oldVal` contains the previous value of the `watchExpression`\n\t * - `scope` refers to the current scope\n\t * @param {boolean=} objectEquality Compare for object equality using {@link angular.equals} instead of\n\t * comparing for reference equality.\n\t * @returns {function()} Returns a deregistration function for this listener.\n\t */\n\t $watch: function(watchExp, listener, objectEquality, prettyPrintExpression) {\n\t var get = $parse(watchExp);\n\t\n\t if (get.$$watchDelegate) {\n\t return get.$$watchDelegate(this, listener, objectEquality, get, watchExp);\n\t }\n\t var scope = this,\n\t array = scope.$$watchers,\n\t watcher = {\n\t fn: listener,\n\t last: initWatchVal,\n\t get: get,\n\t exp: prettyPrintExpression || watchExp,\n\t eq: !!objectEquality\n\t };\n\t\n\t lastDirtyWatch = null;\n\t\n\t if (!isFunction(listener)) {\n\t watcher.fn = noop;\n\t }\n\t\n\t if (!array) {\n\t array = scope.$$watchers = [];\n\t }\n\t // we use unshift since we use a while loop in $digest for speed.\n\t // the while loop reads in reverse order.\n\t array.unshift(watcher);\n\t incrementWatchersCount(this, 1);\n\t\n\t return function deregisterWatch() {\n\t if (arrayRemove(array, watcher) >= 0) {\n\t incrementWatchersCount(scope, -1);\n\t }\n\t lastDirtyWatch = null;\n\t };\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $rootScope.Scope#$watchGroup\n\t * @kind function\n\t *\n\t * @description\n\t * A variant of {@link ng.$rootScope.Scope#$watch $watch()} where it watches an array of `watchExpressions`.\n\t * If any one expression in the collection changes the `listener` is executed.\n\t *\n\t * - The items in the `watchExpressions` array are observed via standard $watch operation and are examined on every\n\t * call to $digest() to see if any items changes.\n\t * - The `listener` is called whenever any expression in the `watchExpressions` array changes.\n\t *\n\t * @param {Array.<string|Function(scope)>} watchExpressions Array of expressions that will be individually\n\t * watched using {@link ng.$rootScope.Scope#$watch $watch()}\n\t *\n\t * @param {function(newValues, oldValues, scope)} listener Callback called whenever the return value of any\n\t * expression in `watchExpressions` changes\n\t * The `newValues` array contains the current values of the `watchExpressions`, with the indexes matching\n\t * those of `watchExpression`\n\t * and the `oldValues` array contains the previous values of the `watchExpressions`, with the indexes matching\n\t * those of `watchExpression`\n\t * The `scope` refers to the current scope.\n\t * @returns {function()} Returns a de-registration function for all listeners.\n\t */\n\t $watchGroup: function(watchExpressions, listener) {\n\t var oldValues = new Array(watchExpressions.length);\n\t var newValues = new Array(watchExpressions.length);\n\t var deregisterFns = [];\n\t var self = this;\n\t var changeReactionScheduled = false;\n\t var firstRun = true;\n\t\n\t if (!watchExpressions.length) {\n\t // No expressions means we call the listener ASAP\n\t var shouldCall = true;\n\t self.$evalAsync(function() {\n\t if (shouldCall) listener(newValues, newValues, self);\n\t });\n\t return function deregisterWatchGroup() {\n\t shouldCall = false;\n\t };\n\t }\n\t\n\t if (watchExpressions.length === 1) {\n\t // Special case size of one\n\t return this.$watch(watchExpressions[0], function watchGroupAction(value, oldValue, scope) {\n\t newValues[0] = value;\n\t oldValues[0] = oldValue;\n\t listener(newValues, (value === oldValue) ? newValues : oldValues, scope);\n\t });\n\t }\n\t\n\t forEach(watchExpressions, function(expr, i) {\n\t var unwatchFn = self.$watch(expr, function watchGroupSubAction(value, oldValue) {\n\t newValues[i] = value;\n\t oldValues[i] = oldValue;\n\t if (!changeReactionScheduled) {\n\t changeReactionScheduled = true;\n\t self.$evalAsync(watchGroupAction);\n\t }\n\t });\n\t deregisterFns.push(unwatchFn);\n\t });\n\t\n\t function watchGroupAction() {\n\t changeReactionScheduled = false;\n\t\n\t if (firstRun) {\n\t firstRun = false;\n\t listener(newValues, newValues, self);\n\t } else {\n\t listener(newValues, oldValues, self);\n\t }\n\t }\n\t\n\t return function deregisterWatchGroup() {\n\t while (deregisterFns.length) {\n\t deregisterFns.shift()();\n\t }\n\t };\n\t },\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $rootScope.Scope#$watchCollection\n\t * @kind function\n\t *\n\t * @description\n\t * Shallow watches the properties of an object and fires whenever any of the properties change\n\t * (for arrays, this implies watching the array items; for object maps, this implies watching\n\t * the properties). If a change is detected, the `listener` callback is fired.\n\t *\n\t * - The `obj` collection is observed via standard $watch operation and is examined on every\n\t * call to $digest() to see if any items have been added, removed, or moved.\n\t * - The `listener` is called whenever anything within the `obj` has changed. Examples include\n\t * adding, removing, and moving items belonging to an object or array.\n\t *\n\t *\n\t * # Example\n\t * ```js\n\t $scope.names = ['igor', 'matias', 'misko', 'james'];\n\t $scope.dataCount = 4;\n\t\n\t $scope.$watchCollection('names', function(newNames, oldNames) {\n\t $scope.dataCount = newNames.length;\n\t });\n\t\n\t expect($scope.dataCount).toEqual(4);\n\t $scope.$digest();\n\t\n\t //still at 4 ... no changes\n\t expect($scope.dataCount).toEqual(4);\n\t\n\t $scope.names.pop();\n\t $scope.$digest();\n\t\n\t //now there's been a change\n\t expect($scope.dataCount).toEqual(3);\n\t * ```\n\t *\n\t *\n\t * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The\n\t * expression value should evaluate to an object or an array which is observed on each\n\t * {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the\n\t * collection will trigger a call to the `listener`.\n\t *\n\t * @param {function(newCollection, oldCollection, scope)} listener a callback function called\n\t * when a change is detected.\n\t * - The `newCollection` object is the newly modified data obtained from the `obj` expression\n\t * - The `oldCollection` object is a copy of the former collection data.\n\t * Due to performance considerations, the`oldCollection` value is computed only if the\n\t * `listener` function declares two or more arguments.\n\t * - The `scope` argument refers to the current scope.\n\t *\n\t * @returns {function()} Returns a de-registration function for this listener. When the\n\t * de-registration function is executed, the internal watch operation is terminated.\n\t */\n\t $watchCollection: function(obj, listener) {\n\t $watchCollectionInterceptor.$stateful = true;\n\t\n\t var self = this;\n\t // the current value, updated on each dirty-check run\n\t var newValue;\n\t // a shallow copy of the newValue from the last dirty-check run,\n\t // updated to match newValue during dirty-check run\n\t var oldValue;\n\t // a shallow copy of the newValue from when the last change happened\n\t var veryOldValue;\n\t // only track veryOldValue if the listener is asking for it\n\t var trackVeryOldValue = (listener.length > 1);\n\t var changeDetected = 0;\n\t var changeDetector = $parse(obj, $watchCollectionInterceptor);\n\t var internalArray = [];\n\t var internalObject = {};\n\t var initRun = true;\n\t var oldLength = 0;\n\t\n\t function $watchCollectionInterceptor(_value) {\n\t newValue = _value;\n\t var newLength, key, bothNaN, newItem, oldItem;\n\t\n\t // If the new value is undefined, then return undefined as the watch may be a one-time watch\n\t if (isUndefined(newValue)) return;\n\t\n\t if (!isObject(newValue)) { // if primitive\n\t if (oldValue !== newValue) {\n\t oldValue = newValue;\n\t changeDetected++;\n\t }\n\t } else if (isArrayLike(newValue)) {\n\t if (oldValue !== internalArray) {\n\t // we are transitioning from something which was not an array into array.\n\t oldValue = internalArray;\n\t oldLength = oldValue.length = 0;\n\t changeDetected++;\n\t }\n\t\n\t newLength = newValue.length;\n\t\n\t if (oldLength !== newLength) {\n\t // if lengths do not match we need to trigger change notification\n\t changeDetected++;\n\t oldValue.length = oldLength = newLength;\n\t }\n\t // copy the items to oldValue and look for changes.\n\t for (var i = 0; i < newLength; i++) {\n\t oldItem = oldValue[i];\n\t newItem = newValue[i];\n\t\n\t bothNaN = (oldItem !== oldItem) && (newItem !== newItem);\n\t if (!bothNaN && (oldItem !== newItem)) {\n\t changeDetected++;\n\t oldValue[i] = newItem;\n\t }\n\t }\n\t } else {\n\t if (oldValue !== internalObject) {\n\t // we are transitioning from something which was not an object into object.\n\t oldValue = internalObject = {};\n\t oldLength = 0;\n\t changeDetected++;\n\t }\n\t // copy the items to oldValue and look for changes.\n\t newLength = 0;\n\t for (key in newValue) {\n\t if (hasOwnProperty.call(newValue, key)) {\n\t newLength++;\n\t newItem = newValue[key];\n\t oldItem = oldValue[key];\n\t\n\t if (key in oldValue) {\n\t bothNaN = (oldItem !== oldItem) && (newItem !== newItem);\n\t if (!bothNaN && (oldItem !== newItem)) {\n\t changeDetected++;\n\t oldValue[key] = newItem;\n\t }\n\t } else {\n\t oldLength++;\n\t oldValue[key] = newItem;\n\t changeDetected++;\n\t }\n\t }\n\t }\n\t if (oldLength > newLength) {\n\t // we used to have more keys, need to find them and destroy them.\n\t changeDetected++;\n\t for (key in oldValue) {\n\t if (!hasOwnProperty.call(newValue, key)) {\n\t oldLength--;\n\t delete oldValue[key];\n\t }\n\t }\n\t }\n\t }\n\t return changeDetected;\n\t }\n\t\n\t function $watchCollectionAction() {\n\t if (initRun) {\n\t initRun = false;\n\t listener(newValue, newValue, self);\n\t } else {\n\t listener(newValue, veryOldValue, self);\n\t }\n\t\n\t // make a copy for the next time a collection is changed\n\t if (trackVeryOldValue) {\n\t if (!isObject(newValue)) {\n\t //primitive\n\t veryOldValue = newValue;\n\t } else if (isArrayLike(newValue)) {\n\t veryOldValue = new Array(newValue.length);\n\t for (var i = 0; i < newValue.length; i++) {\n\t veryOldValue[i] = newValue[i];\n\t }\n\t } else { // if object\n\t veryOldValue = {};\n\t for (var key in newValue) {\n\t if (hasOwnProperty.call(newValue, key)) {\n\t veryOldValue[key] = newValue[key];\n\t }\n\t }\n\t }\n\t }\n\t }\n\t\n\t return this.$watch(changeDetector, $watchCollectionAction);\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $rootScope.Scope#$digest\n\t * @kind function\n\t *\n\t * @description\n\t * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and\n\t * its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change\n\t * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers}\n\t * until no more listeners are firing. This means that it is possible to get into an infinite\n\t * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of\n\t * iterations exceeds 10.\n\t *\n\t * Usually, you don't call `$digest()` directly in\n\t * {@link ng.directive:ngController controllers} or in\n\t * {@link ng.$compileProvider#directive directives}.\n\t * Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within\n\t * a {@link ng.$compileProvider#directive directive}), which will force a `$digest()`.\n\t *\n\t * If you want to be notified whenever `$digest()` is called,\n\t * you can register a `watchExpression` function with\n\t * {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`.\n\t *\n\t * In unit tests, you may need to call `$digest()` to simulate the scope life cycle.\n\t *\n\t * # Example\n\t * ```js\n\t var scope = ...;\n\t scope.name = 'misko';\n\t scope.counter = 0;\n\t\n\t expect(scope.counter).toEqual(0);\n\t scope.$watch('name', function(newValue, oldValue) {\n\t scope.counter = scope.counter + 1;\n\t });\n\t expect(scope.counter).toEqual(0);\n\t\n\t scope.$digest();\n\t // the listener is always called during the first $digest loop after it was registered\n\t expect(scope.counter).toEqual(1);\n\t\n\t scope.$digest();\n\t // but now it will not be called unless the value changes\n\t expect(scope.counter).toEqual(1);\n\t\n\t scope.name = 'adam';\n\t scope.$digest();\n\t expect(scope.counter).toEqual(2);\n\t * ```\n\t *\n\t */\n\t $digest: function() {\n\t var watch, value, last, fn, get,\n\t watchers,\n\t length,\n\t dirty, ttl = TTL,\n\t next, current, target = this,\n\t watchLog = [],\n\t logIdx, logMsg, asyncTask;\n\t\n\t beginPhase('$digest');\n\t // Check for changes to browser url that happened in sync before the call to $digest\n\t $browser.$$checkUrlChange();\n\t\n\t if (this === $rootScope && applyAsyncId !== null) {\n\t // If this is the root scope, and $applyAsync has scheduled a deferred $apply(), then\n\t // cancel the scheduled $apply and flush the queue of expressions to be evaluated.\n\t $browser.defer.cancel(applyAsyncId);\n\t flushApplyAsync();\n\t }\n\t\n\t lastDirtyWatch = null;\n\t\n\t do { // \"while dirty\" loop\n\t dirty = false;\n\t current = target;\n\t\n\t while (asyncQueue.length) {\n\t try {\n\t asyncTask = asyncQueue.shift();\n\t asyncTask.scope.$eval(asyncTask.expression, asyncTask.locals);\n\t } catch (e) {\n\t $exceptionHandler(e);\n\t }\n\t lastDirtyWatch = null;\n\t }\n\t\n\t traverseScopesLoop:\n\t do { // \"traverse the scopes\" loop\n\t if ((watchers = current.$$watchers)) {\n\t // process our watches\n\t length = watchers.length;\n\t while (length--) {\n\t try {\n\t watch = watchers[length];\n\t // Most common watches are on primitives, in which case we can short\n\t // circuit it with === operator, only when === fails do we use .equals\n\t if (watch) {\n\t get = watch.get;\n\t if ((value = get(current)) !== (last = watch.last) &&\n\t !(watch.eq\n\t ? equals(value, last)\n\t : (typeof value === 'number' && typeof last === 'number'\n\t && isNaN(value) && isNaN(last)))) {\n\t dirty = true;\n\t lastDirtyWatch = watch;\n\t watch.last = watch.eq ? copy(value, null) : value;\n\t fn = watch.fn;\n\t fn(value, ((last === initWatchVal) ? value : last), current);\n\t if (ttl < 5) {\n\t logIdx = 4 - ttl;\n\t if (!watchLog[logIdx]) watchLog[logIdx] = [];\n\t watchLog[logIdx].push({\n\t msg: isFunction(watch.exp) ? 'fn: ' + (watch.exp.name || watch.exp.toString()) : watch.exp,\n\t newVal: value,\n\t oldVal: last\n\t });\n\t }\n\t } else if (watch === lastDirtyWatch) {\n\t // If the most recently dirty watcher is now clean, short circuit since the remaining watchers\n\t // have already been tested.\n\t dirty = false;\n\t break traverseScopesLoop;\n\t }\n\t }\n\t } catch (e) {\n\t $exceptionHandler(e);\n\t }\n\t }\n\t }\n\t\n\t // Insanity Warning: scope depth-first traversal\n\t // yes, this code is a bit crazy, but it works and we have tests to prove it!\n\t // this piece should be kept in sync with the traversal in $broadcast\n\t if (!(next = ((current.$$watchersCount && current.$$childHead) ||\n\t (current !== target && current.$$nextSibling)))) {\n\t while (current !== target && !(next = current.$$nextSibling)) {\n\t current = current.$parent;\n\t }\n\t }\n\t } while ((current = next));\n\t\n\t // `break traverseScopesLoop;` takes us to here\n\t\n\t if ((dirty || asyncQueue.length) && !(ttl--)) {\n\t clearPhase();\n\t throw $rootScopeMinErr('infdig',\n\t '{0} $digest() iterations reached. Aborting!\\n' +\n\t 'Watchers fired in the last 5 iterations: {1}',\n\t TTL, watchLog);\n\t }\n\t\n\t } while (dirty || asyncQueue.length);\n\t\n\t clearPhase();\n\t\n\t while (postDigestQueue.length) {\n\t try {\n\t postDigestQueue.shift()();\n\t } catch (e) {\n\t $exceptionHandler(e);\n\t }\n\t }\n\t },\n\t\n\t\n\t /**\n\t * @ngdoc event\n\t * @name $rootScope.Scope#$destroy\n\t * @eventType broadcast on scope being destroyed\n\t *\n\t * @description\n\t * Broadcasted when a scope and its children are being destroyed.\n\t *\n\t * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n\t * clean up DOM bindings before an element is removed from the DOM.\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $rootScope.Scope#$destroy\n\t * @kind function\n\t *\n\t * @description\n\t * Removes the current scope (and all of its children) from the parent scope. Removal implies\n\t * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer\n\t * propagate to the current scope and its children. Removal also implies that the current\n\t * scope is eligible for garbage collection.\n\t *\n\t * The `$destroy()` is usually used by directives such as\n\t * {@link ng.directive:ngRepeat ngRepeat} for managing the\n\t * unrolling of the loop.\n\t *\n\t * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.\n\t * Application code can register a `$destroy` event handler that will give it a chance to\n\t * perform any necessary cleanup.\n\t *\n\t * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n\t * clean up DOM bindings before an element is removed from the DOM.\n\t */\n\t $destroy: function() {\n\t // We can't destroy a scope that has been already destroyed.\n\t if (this.$$destroyed) return;\n\t var parent = this.$parent;\n\t\n\t this.$broadcast('$destroy');\n\t this.$$destroyed = true;\n\t\n\t if (this === $rootScope) {\n\t //Remove handlers attached to window when $rootScope is removed\n\t $browser.$$applicationDestroyed();\n\t }\n\t\n\t incrementWatchersCount(this, -this.$$watchersCount);\n\t for (var eventName in this.$$listenerCount) {\n\t decrementListenerCount(this, this.$$listenerCount[eventName], eventName);\n\t }\n\t\n\t // sever all the references to parent scopes (after this cleanup, the current scope should\n\t // not be retained by any of our references and should be eligible for garbage collection)\n\t if (parent && parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;\n\t if (parent && parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;\n\t if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;\n\t if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;\n\t\n\t // Disable listeners, watchers and apply/digest methods\n\t this.$destroy = this.$digest = this.$apply = this.$evalAsync = this.$applyAsync = noop;\n\t this.$on = this.$watch = this.$watchGroup = function() { return noop; };\n\t this.$$listeners = {};\n\t\n\t // Disconnect the next sibling to prevent `cleanUpScope` destroying those too\n\t this.$$nextSibling = null;\n\t cleanUpScope(this);\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $rootScope.Scope#$eval\n\t * @kind function\n\t *\n\t * @description\n\t * Executes the `expression` on the current scope and returns the result. Any exceptions in\n\t * the expression are propagated (uncaught). This is useful when evaluating Angular\n\t * expressions.\n\t *\n\t * # Example\n\t * ```js\n\t var scope = ng.$rootScope.Scope();\n\t scope.a = 1;\n\t scope.b = 2;\n\t\n\t expect(scope.$eval('a+b')).toEqual(3);\n\t expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);\n\t * ```\n\t *\n\t * @param {(string|function())=} expression An angular expression to be executed.\n\t *\n\t * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n\t * - `function(scope)`: execute the function with the current `scope` parameter.\n\t *\n\t * @param {(object)=} locals Local variables object, useful for overriding values in scope.\n\t * @returns {*} The result of evaluating the expression.\n\t */\n\t $eval: function(expr, locals) {\n\t return $parse(expr)(this, locals);\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $rootScope.Scope#$evalAsync\n\t * @kind function\n\t *\n\t * @description\n\t * Executes the expression on the current scope at a later point in time.\n\t *\n\t * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only\n\t * that:\n\t *\n\t * - it will execute after the function that scheduled the evaluation (preferably before DOM\n\t * rendering).\n\t * - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after\n\t * `expression` execution.\n\t *\n\t * Any exceptions from the execution of the expression are forwarded to the\n\t * {@link ng.$exceptionHandler $exceptionHandler} service.\n\t *\n\t * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle\n\t * will be scheduled. However, it is encouraged to always call code that changes the model\n\t * from within an `$apply` call. That includes code evaluated via `$evalAsync`.\n\t *\n\t * @param {(string|function())=} expression An angular expression to be executed.\n\t *\n\t * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n\t * - `function(scope)`: execute the function with the current `scope` parameter.\n\t *\n\t * @param {(object)=} locals Local variables object, useful for overriding values in scope.\n\t */\n\t $evalAsync: function(expr, locals) {\n\t // if we are outside of an $digest loop and this is the first time we are scheduling async\n\t // task also schedule async auto-flush\n\t if (!$rootScope.$$phase && !asyncQueue.length) {\n\t $browser.defer(function() {\n\t if (asyncQueue.length) {\n\t $rootScope.$digest();\n\t }\n\t });\n\t }\n\t\n\t asyncQueue.push({scope: this, expression: $parse(expr), locals: locals});\n\t },\n\t\n\t $$postDigest: function(fn) {\n\t postDigestQueue.push(fn);\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $rootScope.Scope#$apply\n\t * @kind function\n\t *\n\t * @description\n\t * `$apply()` is used to execute an expression in angular from outside of the angular\n\t * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries).\n\t * Because we are calling into the angular framework we need to perform proper scope life\n\t * cycle of {@link ng.$exceptionHandler exception handling},\n\t * {@link ng.$rootScope.Scope#$digest executing watches}.\n\t *\n\t * ## Life cycle\n\t *\n\t * # Pseudo-Code of `$apply()`\n\t * ```js\n\t function $apply(expr) {\n\t try {\n\t return $eval(expr);\n\t } catch (e) {\n\t $exceptionHandler(e);\n\t } finally {\n\t $root.$digest();\n\t }\n\t }\n\t * ```\n\t *\n\t *\n\t * Scope's `$apply()` method transitions through the following stages:\n\t *\n\t * 1. The {@link guide/expression expression} is executed using the\n\t * {@link ng.$rootScope.Scope#$eval $eval()} method.\n\t * 2. Any exceptions from the execution of the expression are forwarded to the\n\t * {@link ng.$exceptionHandler $exceptionHandler} service.\n\t * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the\n\t * expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method.\n\t *\n\t *\n\t * @param {(string|function())=} exp An angular expression to be executed.\n\t *\n\t * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n\t * - `function(scope)`: execute the function with current `scope` parameter.\n\t *\n\t * @returns {*} The result of evaluating the expression.\n\t */\n\t $apply: function(expr) {\n\t try {\n\t beginPhase('$apply');\n\t try {\n\t return this.$eval(expr);\n\t } finally {\n\t clearPhase();\n\t }\n\t } catch (e) {\n\t $exceptionHandler(e);\n\t } finally {\n\t try {\n\t $rootScope.$digest();\n\t } catch (e) {\n\t $exceptionHandler(e);\n\t throw e;\n\t }\n\t }\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $rootScope.Scope#$applyAsync\n\t * @kind function\n\t *\n\t * @description\n\t * Schedule the invocation of $apply to occur at a later time. The actual time difference\n\t * varies across browsers, but is typically around ~10 milliseconds.\n\t *\n\t * This can be used to queue up multiple expressions which need to be evaluated in the same\n\t * digest.\n\t *\n\t * @param {(string|function())=} exp An angular expression to be executed.\n\t *\n\t * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n\t * - `function(scope)`: execute the function with current `scope` parameter.\n\t */\n\t $applyAsync: function(expr) {\n\t var scope = this;\n\t expr && applyAsyncQueue.push($applyAsyncExpression);\n\t expr = $parse(expr);\n\t scheduleApplyAsync();\n\t\n\t function $applyAsyncExpression() {\n\t scope.$eval(expr);\n\t }\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $rootScope.Scope#$on\n\t * @kind function\n\t *\n\t * @description\n\t * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for\n\t * discussion of event life cycle.\n\t *\n\t * The event listener function format is: `function(event, args...)`. The `event` object\n\t * passed into the listener has the following attributes:\n\t *\n\t * - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or\n\t * `$broadcast`-ed.\n\t * - `currentScope` - `{Scope}`: the scope that is currently handling the event. Once the\n\t * event propagates through the scope hierarchy, this property is set to null.\n\t * - `name` - `{string}`: name of the event.\n\t * - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel\n\t * further event propagation (available only for events that were `$emit`-ed).\n\t * - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag\n\t * to true.\n\t * - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.\n\t *\n\t * @param {string} name Event name to listen on.\n\t * @param {function(event, ...args)} listener Function to call when the event is emitted.\n\t * @returns {function()} Returns a deregistration function for this listener.\n\t */\n\t $on: function(name, listener) {\n\t var namedListeners = this.$$listeners[name];\n\t if (!namedListeners) {\n\t this.$$listeners[name] = namedListeners = [];\n\t }\n\t namedListeners.push(listener);\n\t\n\t var current = this;\n\t do {\n\t if (!current.$$listenerCount[name]) {\n\t current.$$listenerCount[name] = 0;\n\t }\n\t current.$$listenerCount[name]++;\n\t } while ((current = current.$parent));\n\t\n\t var self = this;\n\t return function() {\n\t var indexOfListener = namedListeners.indexOf(listener);\n\t if (indexOfListener !== -1) {\n\t namedListeners[indexOfListener] = null;\n\t decrementListenerCount(self, 1, name);\n\t }\n\t };\n\t },\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $rootScope.Scope#$emit\n\t * @kind function\n\t *\n\t * @description\n\t * Dispatches an event `name` upwards through the scope hierarchy notifying the\n\t * registered {@link ng.$rootScope.Scope#$on} listeners.\n\t *\n\t * The event life cycle starts at the scope on which `$emit` was called. All\n\t * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get\n\t * notified. Afterwards, the event traverses upwards toward the root scope and calls all\n\t * registered listeners along the way. The event will stop propagating if one of the listeners\n\t * cancels it.\n\t *\n\t * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed\n\t * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n\t *\n\t * @param {string} name Event name to emit.\n\t * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n\t * @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}).\n\t */\n\t $emit: function(name, args) {\n\t var empty = [],\n\t namedListeners,\n\t scope = this,\n\t stopPropagation = false,\n\t event = {\n\t name: name,\n\t targetScope: scope,\n\t stopPropagation: function() {stopPropagation = true;},\n\t preventDefault: function() {\n\t event.defaultPrevented = true;\n\t },\n\t defaultPrevented: false\n\t },\n\t listenerArgs = concat([event], arguments, 1),\n\t i, length;\n\t\n\t do {\n\t namedListeners = scope.$$listeners[name] || empty;\n\t event.currentScope = scope;\n\t for (i = 0, length = namedListeners.length; i < length; i++) {\n\t\n\t // if listeners were deregistered, defragment the array\n\t if (!namedListeners[i]) {\n\t namedListeners.splice(i, 1);\n\t i--;\n\t length--;\n\t continue;\n\t }\n\t try {\n\t //allow all listeners attached to the current scope to run\n\t namedListeners[i].apply(null, listenerArgs);\n\t } catch (e) {\n\t $exceptionHandler(e);\n\t }\n\t }\n\t //if any listener on the current scope stops propagation, prevent bubbling\n\t if (stopPropagation) {\n\t event.currentScope = null;\n\t return event;\n\t }\n\t //traverse upwards\n\t scope = scope.$parent;\n\t } while (scope);\n\t\n\t event.currentScope = null;\n\t\n\t return event;\n\t },\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $rootScope.Scope#$broadcast\n\t * @kind function\n\t *\n\t * @description\n\t * Dispatches an event `name` downwards to all child scopes (and their children) notifying the\n\t * registered {@link ng.$rootScope.Scope#$on} listeners.\n\t *\n\t * The event life cycle starts at the scope on which `$broadcast` was called. All\n\t * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get\n\t * notified. Afterwards, the event propagates to all direct and indirect scopes of the current\n\t * scope and calls all registered listeners along the way. The event cannot be canceled.\n\t *\n\t * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed\n\t * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n\t *\n\t * @param {string} name Event name to broadcast.\n\t * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n\t * @return {Object} Event object, see {@link ng.$rootScope.Scope#$on}\n\t */\n\t $broadcast: function(name, args) {\n\t var target = this,\n\t current = target,\n\t next = target,\n\t event = {\n\t name: name,\n\t targetScope: target,\n\t preventDefault: function() {\n\t event.defaultPrevented = true;\n\t },\n\t defaultPrevented: false\n\t };\n\t\n\t if (!target.$$listenerCount[name]) return event;\n\t\n\t var listenerArgs = concat([event], arguments, 1),\n\t listeners, i, length;\n\t\n\t //down while you can, then up and next sibling or up and next sibling until back at root\n\t while ((current = next)) {\n\t event.currentScope = current;\n\t listeners = current.$$listeners[name] || [];\n\t for (i = 0, length = listeners.length; i < length; i++) {\n\t // if listeners were deregistered, defragment the array\n\t if (!listeners[i]) {\n\t listeners.splice(i, 1);\n\t i--;\n\t length--;\n\t continue;\n\t }\n\t\n\t try {\n\t listeners[i].apply(null, listenerArgs);\n\t } catch (e) {\n\t $exceptionHandler(e);\n\t }\n\t }\n\t\n\t // Insanity Warning: scope depth-first traversal\n\t // yes, this code is a bit crazy, but it works and we have tests to prove it!\n\t // this piece should be kept in sync with the traversal in $digest\n\t // (though it differs due to having the extra check for $$listenerCount)\n\t if (!(next = ((current.$$listenerCount[name] && current.$$childHead) ||\n\t (current !== target && current.$$nextSibling)))) {\n\t while (current !== target && !(next = current.$$nextSibling)) {\n\t current = current.$parent;\n\t }\n\t }\n\t }\n\t\n\t event.currentScope = null;\n\t return event;\n\t }\n\t };\n\t\n\t var $rootScope = new Scope();\n\t\n\t //The internal queues. Expose them on the $rootScope for debugging/testing purposes.\n\t var asyncQueue = $rootScope.$$asyncQueue = [];\n\t var postDigestQueue = $rootScope.$$postDigestQueue = [];\n\t var applyAsyncQueue = $rootScope.$$applyAsyncQueue = [];\n\t\n\t return $rootScope;\n\t\n\t\n\t function beginPhase(phase) {\n\t if ($rootScope.$$phase) {\n\t throw $rootScopeMinErr('inprog', '{0} already in progress', $rootScope.$$phase);\n\t }\n\t\n\t $rootScope.$$phase = phase;\n\t }\n\t\n\t function clearPhase() {\n\t $rootScope.$$phase = null;\n\t }\n\t\n\t function incrementWatchersCount(current, count) {\n\t do {\n\t current.$$watchersCount += count;\n\t } while ((current = current.$parent));\n\t }\n\t\n\t function decrementListenerCount(current, count, name) {\n\t do {\n\t current.$$listenerCount[name] -= count;\n\t\n\t if (current.$$listenerCount[name] === 0) {\n\t delete current.$$listenerCount[name];\n\t }\n\t } while ((current = current.$parent));\n\t }\n\t\n\t /**\n\t * function used as an initial value for watchers.\n\t * because it's unique we can easily tell it apart from other values\n\t */\n\t function initWatchVal() {}\n\t\n\t function flushApplyAsync() {\n\t while (applyAsyncQueue.length) {\n\t try {\n\t applyAsyncQueue.shift()();\n\t } catch (e) {\n\t $exceptionHandler(e);\n\t }\n\t }\n\t applyAsyncId = null;\n\t }\n\t\n\t function scheduleApplyAsync() {\n\t if (applyAsyncId === null) {\n\t applyAsyncId = $browser.defer(function() {\n\t $rootScope.$apply(flushApplyAsync);\n\t });\n\t }\n\t }\n\t }];\n\t}\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $rootElement\n\t *\n\t * @description\n\t * The root element of Angular application. This is either the element where {@link\n\t * ng.directive:ngApp ngApp} was declared or the element passed into\n\t * {@link angular.bootstrap}. The element represents the root element of application. It is also the\n\t * location where the application's {@link auto.$injector $injector} service gets\n\t * published, and can be retrieved using `$rootElement.injector()`.\n\t */\n\t\n\t\n\t// the implementation is in angular.bootstrap\n\t\n\t/**\n\t * @description\n\t * Private service to sanitize uris for links and images. Used by $compile and $sanitize.\n\t */\n\tfunction $$SanitizeUriProvider() {\n\t var aHrefSanitizationWhitelist = /^\\s*(https?|ftp|mailto|tel|file):/,\n\t imgSrcSanitizationWhitelist = /^\\s*((https?|ftp|file|blob):|data:image\\/)/;\n\t\n\t /**\n\t * @description\n\t * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n\t * urls during a[href] sanitization.\n\t *\n\t * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n\t *\n\t * Any url about to be assigned to a[href] via data-binding is first normalized and turned into\n\t * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`\n\t * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n\t * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n\t *\n\t * @param {RegExp=} regexp New regexp to whitelist urls with.\n\t * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n\t * chaining otherwise.\n\t */\n\t this.aHrefSanitizationWhitelist = function(regexp) {\n\t if (isDefined(regexp)) {\n\t aHrefSanitizationWhitelist = regexp;\n\t return this;\n\t }\n\t return aHrefSanitizationWhitelist;\n\t };\n\t\n\t\n\t /**\n\t * @description\n\t * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n\t * urls during img[src] sanitization.\n\t *\n\t * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n\t *\n\t * Any url about to be assigned to img[src] via data-binding is first normalized and turned into\n\t * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`\n\t * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n\t * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n\t *\n\t * @param {RegExp=} regexp New regexp to whitelist urls with.\n\t * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n\t * chaining otherwise.\n\t */\n\t this.imgSrcSanitizationWhitelist = function(regexp) {\n\t if (isDefined(regexp)) {\n\t imgSrcSanitizationWhitelist = regexp;\n\t return this;\n\t }\n\t return imgSrcSanitizationWhitelist;\n\t };\n\t\n\t this.$get = function() {\n\t return function sanitizeUri(uri, isImage) {\n\t var regex = isImage ? imgSrcSanitizationWhitelist : aHrefSanitizationWhitelist;\n\t var normalizedVal;\n\t normalizedVal = urlResolve(uri).href;\n\t if (normalizedVal !== '' && !normalizedVal.match(regex)) {\n\t return 'unsafe:' + normalizedVal;\n\t }\n\t return uri;\n\t };\n\t };\n\t}\n\t\n\t/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\t * Any commits to this file should be reviewed with security in mind. *\n\t * Changes to this file can potentially create security vulnerabilities. *\n\t * An approval from 2 Core members with history of modifying *\n\t * this file is required. *\n\t * *\n\t * Does the change somehow allow for arbitrary javascript to be executed? *\n\t * Or allows for someone to change the prototype of built-in objects? *\n\t * Or gives undesired access to variables likes document or window? *\n\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\t\n\tvar $sceMinErr = minErr('$sce');\n\t\n\tvar SCE_CONTEXTS = {\n\t HTML: 'html',\n\t CSS: 'css',\n\t URL: 'url',\n\t // RESOURCE_URL is a subtype of URL used in contexts where a privileged resource is sourced from a\n\t // url. (e.g. ng-include, script src, templateUrl)\n\t RESOURCE_URL: 'resourceUrl',\n\t JS: 'js'\n\t};\n\t\n\t// Helper functions follow.\n\t\n\tfunction adjustMatcher(matcher) {\n\t if (matcher === 'self') {\n\t return matcher;\n\t } else if (isString(matcher)) {\n\t // Strings match exactly except for 2 wildcards - '*' and '**'.\n\t // '*' matches any character except those from the set ':/.?&'.\n\t // '**' matches any character (like .* in a RegExp).\n\t // More than 2 *'s raises an error as it's ill defined.\n\t if (matcher.indexOf('***') > -1) {\n\t throw $sceMinErr('iwcard',\n\t 'Illegal sequence *** in string matcher. String: {0}', matcher);\n\t }\n\t matcher = escapeForRegexp(matcher).\n\t replace('\\\\*\\\\*', '.*').\n\t replace('\\\\*', '[^:/.?&;]*');\n\t return new RegExp('^' + matcher + '$');\n\t } else if (isRegExp(matcher)) {\n\t // The only other type of matcher allowed is a Regexp.\n\t // Match entire URL / disallow partial matches.\n\t // Flags are reset (i.e. no global, ignoreCase or multiline)\n\t return new RegExp('^' + matcher.source + '$');\n\t } else {\n\t throw $sceMinErr('imatcher',\n\t 'Matchers may only be \"self\", string patterns or RegExp objects');\n\t }\n\t}\n\t\n\t\n\tfunction adjustMatchers(matchers) {\n\t var adjustedMatchers = [];\n\t if (isDefined(matchers)) {\n\t forEach(matchers, function(matcher) {\n\t adjustedMatchers.push(adjustMatcher(matcher));\n\t });\n\t }\n\t return adjustedMatchers;\n\t}\n\t\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $sceDelegate\n\t * @kind function\n\t *\n\t * @description\n\t *\n\t * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict\n\t * Contextual Escaping (SCE)} services to AngularJS.\n\t *\n\t * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of\n\t * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS. This is\n\t * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to\n\t * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things\n\t * work because `$sce` delegates to `$sceDelegate` for these operations.\n\t *\n\t * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service.\n\t *\n\t * The default instance of `$sceDelegate` should work out of the box with little pain. While you\n\t * can override it completely to change the behavior of `$sce`, the common case would\n\t * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting\n\t * your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as\n\t * templates. Refer {@link ng.$sceDelegateProvider#resourceUrlWhitelist\n\t * $sceDelegateProvider.resourceUrlWhitelist} and {@link\n\t * ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n\t */\n\t\n\t/**\n\t * @ngdoc provider\n\t * @name $sceDelegateProvider\n\t * @description\n\t *\n\t * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate\n\t * $sceDelegate} service. This allows one to get/set the whitelists and blacklists used to ensure\n\t * that the URLs used for sourcing Angular templates are safe. Refer {@link\n\t * ng.$sceDelegateProvider#resourceUrlWhitelist $sceDelegateProvider.resourceUrlWhitelist} and\n\t * {@link ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n\t *\n\t * For the general details about this service in Angular, read the main page for {@link ng.$sce\n\t * Strict Contextual Escaping (SCE)}.\n\t *\n\t * **Example**: Consider the following case. <a name=\"example\"></a>\n\t *\n\t * - your app is hosted at url `http://myapp.example.com/`\n\t * - but some of your templates are hosted on other domains you control such as\n\t * `http://srv01.assets.example.com/`,  `http://srv02.assets.example.com/`, etc.\n\t * - and you have an open redirect at `http://myapp.example.com/clickThru?...`.\n\t *\n\t * Here is what a secure configuration for this scenario might look like:\n\t *\n\t * ```\n\t * angular.module('myApp', []).config(function($sceDelegateProvider) {\n\t * $sceDelegateProvider.resourceUrlWhitelist([\n\t * // Allow same origin resource loads.\n\t * 'self',\n\t * // Allow loading from our assets domain. Notice the difference between * and **.\n\t * 'http://srv*.assets.example.com/**'\n\t * ]);\n\t *\n\t * // The blacklist overrides the whitelist so the open redirect here is blocked.\n\t * $sceDelegateProvider.resourceUrlBlacklist([\n\t * 'http://myapp.example.com/clickThru**'\n\t * ]);\n\t * });\n\t * ```\n\t */\n\t\n\tfunction $SceDelegateProvider() {\n\t this.SCE_CONTEXTS = SCE_CONTEXTS;\n\t\n\t // Resource URLs can also be trusted by policy.\n\t var resourceUrlWhitelist = ['self'],\n\t resourceUrlBlacklist = [];\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sceDelegateProvider#resourceUrlWhitelist\n\t * @kind function\n\t *\n\t * @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value\n\t * provided. This must be an array or null. A snapshot of this array is used so further\n\t * changes to the array are ignored.\n\t *\n\t * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n\t * allowed in this array.\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * **Note:** an empty whitelist array will block all URLs!\n\t * </div>\n\t *\n\t * @return {Array} the currently set whitelist array.\n\t *\n\t * The **default value** when no whitelist has been explicitly set is `['self']` allowing only\n\t * same origin resource requests.\n\t *\n\t * @description\n\t * Sets/Gets the whitelist of trusted resource URLs.\n\t */\n\t this.resourceUrlWhitelist = function(value) {\n\t if (arguments.length) {\n\t resourceUrlWhitelist = adjustMatchers(value);\n\t }\n\t return resourceUrlWhitelist;\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sceDelegateProvider#resourceUrlBlacklist\n\t * @kind function\n\t *\n\t * @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value\n\t * provided. This must be an array or null. A snapshot of this array is used so further\n\t * changes to the array are ignored.\n\t *\n\t * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n\t * allowed in this array.\n\t *\n\t * The typical usage for the blacklist is to **block\n\t * [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as\n\t * these would otherwise be trusted but actually return content from the redirected domain.\n\t *\n\t * Finally, **the blacklist overrides the whitelist** and has the final say.\n\t *\n\t * @return {Array} the currently set blacklist array.\n\t *\n\t * The **default value** when no whitelist has been explicitly set is the empty array (i.e. there\n\t * is no blacklist.)\n\t *\n\t * @description\n\t * Sets/Gets the blacklist of trusted resource URLs.\n\t */\n\t\n\t this.resourceUrlBlacklist = function(value) {\n\t if (arguments.length) {\n\t resourceUrlBlacklist = adjustMatchers(value);\n\t }\n\t return resourceUrlBlacklist;\n\t };\n\t\n\t this.$get = ['$injector', function($injector) {\n\t\n\t var htmlSanitizer = function htmlSanitizer(html) {\n\t throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n\t };\n\t\n\t if ($injector.has('$sanitize')) {\n\t htmlSanitizer = $injector.get('$sanitize');\n\t }\n\t\n\t\n\t function matchUrl(matcher, parsedUrl) {\n\t if (matcher === 'self') {\n\t return urlIsSameOrigin(parsedUrl);\n\t } else {\n\t // definitely a regex. See adjustMatchers()\n\t return !!matcher.exec(parsedUrl.href);\n\t }\n\t }\n\t\n\t function isResourceUrlAllowedByPolicy(url) {\n\t var parsedUrl = urlResolve(url.toString());\n\t var i, n, allowed = false;\n\t // Ensure that at least one item from the whitelist allows this url.\n\t for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) {\n\t if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) {\n\t allowed = true;\n\t break;\n\t }\n\t }\n\t if (allowed) {\n\t // Ensure that no item from the blacklist blocked this url.\n\t for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) {\n\t if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) {\n\t allowed = false;\n\t break;\n\t }\n\t }\n\t }\n\t return allowed;\n\t }\n\t\n\t function generateHolderType(Base) {\n\t var holderType = function TrustedValueHolderType(trustedValue) {\n\t this.$$unwrapTrustedValue = function() {\n\t return trustedValue;\n\t };\n\t };\n\t if (Base) {\n\t holderType.prototype = new Base();\n\t }\n\t holderType.prototype.valueOf = function sceValueOf() {\n\t return this.$$unwrapTrustedValue();\n\t };\n\t holderType.prototype.toString = function sceToString() {\n\t return this.$$unwrapTrustedValue().toString();\n\t };\n\t return holderType;\n\t }\n\t\n\t var trustedValueHolderBase = generateHolderType(),\n\t byType = {};\n\t\n\t byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase);\n\t byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase);\n\t byType[SCE_CONTEXTS.URL] = generateHolderType(trustedValueHolderBase);\n\t byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase);\n\t byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]);\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sceDelegate#trustAs\n\t *\n\t * @description\n\t * Returns an object that is trusted by angular for use in specified strict\n\t * contextual escaping contexts (such as ng-bind-html, ng-include, any src\n\t * attribute interpolation, any dom event binding attribute interpolation\n\t * such as for onclick, etc.) that uses the provided value.\n\t * See {@link ng.$sce $sce} for enabling strict contextual escaping.\n\t *\n\t * @param {string} type The kind of context in which this value is safe for use. e.g. url,\n\t * resourceUrl, html, js and css.\n\t * @param {*} value The value that that should be considered trusted/safe.\n\t * @returns {*} A value that can be used to stand in for the provided `value` in places\n\t * where Angular expects a $sce.trustAs() return value.\n\t */\n\t function trustAs(type, trustedValue) {\n\t var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n\t if (!Constructor) {\n\t throw $sceMinErr('icontext',\n\t 'Attempted to trust a value in invalid context. Context: {0}; Value: {1}',\n\t type, trustedValue);\n\t }\n\t if (trustedValue === null || isUndefined(trustedValue) || trustedValue === '') {\n\t return trustedValue;\n\t }\n\t // All the current contexts in SCE_CONTEXTS happen to be strings. In order to avoid trusting\n\t // mutable objects, we ensure here that the value passed in is actually a string.\n\t if (typeof trustedValue !== 'string') {\n\t throw $sceMinErr('itype',\n\t 'Attempted to trust a non-string value in a content requiring a string: Context: {0}',\n\t type);\n\t }\n\t return new Constructor(trustedValue);\n\t }\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sceDelegate#valueOf\n\t *\n\t * @description\n\t * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#trustAs\n\t * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link\n\t * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}.\n\t *\n\t * If the passed parameter is not a value that had been returned by {@link\n\t * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}, returns it as-is.\n\t *\n\t * @param {*} value The result of a prior {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}\n\t * call or anything else.\n\t * @returns {*} The `value` that was originally provided to {@link ng.$sceDelegate#trustAs\n\t * `$sceDelegate.trustAs`} if `value` is the result of such a call. Otherwise, returns\n\t * `value` unchanged.\n\t */\n\t function valueOf(maybeTrusted) {\n\t if (maybeTrusted instanceof trustedValueHolderBase) {\n\t return maybeTrusted.$$unwrapTrustedValue();\n\t } else {\n\t return maybeTrusted;\n\t }\n\t }\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sceDelegate#getTrusted\n\t *\n\t * @description\n\t * Takes the result of a {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`} call and\n\t * returns the originally supplied value if the queried context type is a supertype of the\n\t * created type. If this condition isn't satisfied, throws an exception.\n\t *\n\t * @param {string} type The kind of context in which this value is to be used.\n\t * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs\n\t * `$sceDelegate.trustAs`} call.\n\t * @returns {*} The value the was originally provided to {@link ng.$sceDelegate#trustAs\n\t * `$sceDelegate.trustAs`} if valid in this context. Otherwise, throws an exception.\n\t */\n\t function getTrusted(type, maybeTrusted) {\n\t if (maybeTrusted === null || isUndefined(maybeTrusted) || maybeTrusted === '') {\n\t return maybeTrusted;\n\t }\n\t var constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n\t if (constructor && maybeTrusted instanceof constructor) {\n\t return maybeTrusted.$$unwrapTrustedValue();\n\t }\n\t // If we get here, then we may only take one of two actions.\n\t // 1. sanitize the value for the requested type, or\n\t // 2. throw an exception.\n\t if (type === SCE_CONTEXTS.RESOURCE_URL) {\n\t if (isResourceUrlAllowedByPolicy(maybeTrusted)) {\n\t return maybeTrusted;\n\t } else {\n\t throw $sceMinErr('insecurl',\n\t 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}',\n\t maybeTrusted.toString());\n\t }\n\t } else if (type === SCE_CONTEXTS.HTML) {\n\t return htmlSanitizer(maybeTrusted);\n\t }\n\t throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n\t }\n\t\n\t return { trustAs: trustAs,\n\t getTrusted: getTrusted,\n\t valueOf: valueOf };\n\t }];\n\t}\n\t\n\t\n\t/**\n\t * @ngdoc provider\n\t * @name $sceProvider\n\t * @description\n\t *\n\t * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service.\n\t * - enable/disable Strict Contextual Escaping (SCE) in a module\n\t * - override the default implementation with a custom delegate\n\t *\n\t * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}.\n\t */\n\t\n\t/* jshint maxlen: false*/\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $sce\n\t * @kind function\n\t *\n\t * @description\n\t *\n\t * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS.\n\t *\n\t * # Strict Contextual Escaping\n\t *\n\t * Strict Contextual Escaping (SCE) is a mode in which AngularJS requires bindings in certain\n\t * contexts to result in a value that is marked as safe to use for that context. One example of\n\t * such a context is binding arbitrary html controlled by the user via `ng-bind-html`. We refer\n\t * to these contexts as privileged or SCE contexts.\n\t *\n\t * As of version 1.2, Angular ships with SCE enabled by default.\n\t *\n\t * Note: When enabled (the default), IE<11 in quirks mode is not supported. In this mode, IE<11 allow\n\t * one to execute arbitrary javascript by the use of the expression() syntax. Refer\n\t * <http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx> to learn more about them.\n\t * You can ensure your document is in standards mode and not quirks mode by adding `<!doctype html>`\n\t * to the top of your HTML document.\n\t *\n\t * SCE assists in writing code in way that (a) is secure by default and (b) makes auditing for\n\t * security vulnerabilities such as XSS, clickjacking, etc. a lot easier.\n\t *\n\t * Here's an example of a binding in a privileged context:\n\t *\n\t * ```\n\t * <input ng-model=\"userHtml\" aria-label=\"User input\">\n\t * <div ng-bind-html=\"userHtml\"></div>\n\t * ```\n\t *\n\t * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user. With SCE\n\t * disabled, this application allows the user to render arbitrary HTML into the DIV.\n\t * In a more realistic example, one may be rendering user comments, blog articles, etc. via\n\t * bindings. (HTML is just one example of a context where rendering user controlled input creates\n\t * security vulnerabilities.)\n\t *\n\t * For the case of HTML, you might use a library, either on the client side, or on the server side,\n\t * to sanitize unsafe HTML before binding to the value and rendering it in the document.\n\t *\n\t * How would you ensure that every place that used these types of bindings was bound to a value that\n\t * was sanitized by your library (or returned as safe for rendering by your server?) How can you\n\t * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some\n\t * properties/fields and forgot to update the binding to the sanitized value?\n\t *\n\t * To be secure by default, you want to ensure that any such bindings are disallowed unless you can\n\t * determine that something explicitly says it's safe to use a value for binding in that\n\t * context. You can then audit your code (a simple grep would do) to ensure that this is only done\n\t * for those values that you can easily tell are safe - because they were received from your server,\n\t * sanitized by your library, etc. You can organize your codebase to help with this - perhaps\n\t * allowing only the files in a specific directory to do this. Ensuring that the internal API\n\t * exposed by that code doesn't markup arbitrary values as safe then becomes a more manageable task.\n\t *\n\t * In the case of AngularJS' SCE service, one uses {@link ng.$sce#trustAs $sce.trustAs}\n\t * (and shorthand methods such as {@link ng.$sce#trustAsHtml $sce.trustAsHtml}, etc.) to\n\t * obtain values that will be accepted by SCE / privileged contexts.\n\t *\n\t *\n\t * ## How does it work?\n\t *\n\t * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#getTrusted\n\t * $sce.getTrusted(context, value)} rather than to the value directly. Directives use {@link\n\t * ng.$sce#parseAs $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs the\n\t * {@link ng.$sce#getTrusted $sce.getTrusted} behind the scenes on non-constant literals.\n\t *\n\t * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link\n\t * ng.$sce#parseAsHtml $sce.parseAsHtml(binding expression)}. Here's the actual code (slightly\n\t * simplified):\n\t *\n\t * ```\n\t * var ngBindHtmlDirective = ['$sce', function($sce) {\n\t * return function(scope, element, attr) {\n\t * scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) {\n\t * element.html(value || '');\n\t * });\n\t * };\n\t * }];\n\t * ```\n\t *\n\t * ## Impact on loading templates\n\t *\n\t * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as\n\t * `templateUrl`'s specified by {@link guide/directive directives}.\n\t *\n\t * By default, Angular only loads templates from the same domain and protocol as the application\n\t * document. This is done by calling {@link ng.$sce#getTrustedResourceUrl\n\t * $sce.getTrustedResourceUrl} on the template URL. To load templates from other domains and/or\n\t * protocols, you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist\n\t * them} or {@link ng.$sce#trustAsResourceUrl wrap it} into a trusted value.\n\t *\n\t * *Please note*:\n\t * The browser's\n\t * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n\t * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n\t * policy apply in addition to this and may further restrict whether the template is successfully\n\t * loaded. This means that without the right CORS policy, loading templates from a different domain\n\t * won't work on all browsers. Also, loading templates from `file://` URL does not work on some\n\t * browsers.\n\t *\n\t * ## This feels like too much overhead\n\t *\n\t * It's important to remember that SCE only applies to interpolation expressions.\n\t *\n\t * If your expressions are constant literals, they're automatically trusted and you don't need to\n\t * call `$sce.trustAs` on them (remember to include the `ngSanitize` module) (e.g.\n\t * `<div ng-bind-html=\"'<b>implicitly trusted</b>'\"></div>`) just works.\n\t *\n\t * Additionally, `a[href]` and `img[src]` automatically sanitize their URLs and do not pass them\n\t * through {@link ng.$sce#getTrusted $sce.getTrusted}. SCE doesn't play a role here.\n\t *\n\t * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load\n\t * templates in `ng-include` from your application's domain without having to even know about SCE.\n\t * It blocks loading templates from other domains or loading templates over http from an https\n\t * served document. You can change these by setting your own custom {@link\n\t * ng.$sceDelegateProvider#resourceUrlWhitelist whitelists} and {@link\n\t * ng.$sceDelegateProvider#resourceUrlBlacklist blacklists} for matching such URLs.\n\t *\n\t * This significantly reduces the overhead. It is far easier to pay the small overhead and have an\n\t * application that's secure and can be audited to verify that with much more ease than bolting\n\t * security onto an application later.\n\t *\n\t * <a name=\"contexts\"></a>\n\t * ## What trusted context types are supported?\n\t *\n\t * | Context | Notes |\n\t * |---------------------|----------------|\n\t * | `$sce.HTML` | For HTML that's safe to source into the application. The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. If an unsafe value is encountered and the {@link ngSanitize $sanitize} module is present this will sanitize the value instead of throwing an error. |\n\t * | `$sce.CSS` | For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives. |\n\t * | `$sce.URL` | For URLs that are safe to follow as links. Currently unused (`<a href=` and `<img src=` sanitize their urls and don't constitute an SCE context. |\n\t * | `$sce.RESOURCE_URL` | For URLs that are not only safe to follow as links, but whose contents are also safe to include in your application. Examples include `ng-include`, `src` / `ngSrc` bindings for tags other than `IMG` (e.g. `IFRAME`, `OBJECT`, etc.) <br><br>Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. |\n\t * | `$sce.JS` | For JavaScript that is safe to execute in your application's context. Currently unused. Feel free to use it in your own directives. |\n\t *\n\t * ## Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist} <a name=\"resourceUrlPatternItem\"></a>\n\t *\n\t * Each element in these arrays must be one of the following:\n\t *\n\t * - **'self'**\n\t * - The special **string**, `'self'`, can be used to match against all URLs of the **same\n\t * domain** as the application document using the **same protocol**.\n\t * - **String** (except the special value `'self'`)\n\t * - The string is matched against the full *normalized / absolute URL* of the resource\n\t * being tested (substring matches are not good enough.)\n\t * - There are exactly **two wildcard sequences** - `*` and `**`. All other characters\n\t * match themselves.\n\t * - `*`: matches zero or more occurrences of any character other than one of the following 6\n\t * characters: '`:`', '`/`', '`.`', '`?`', '`&`' and '`;`'. It's a useful wildcard for use\n\t * in a whitelist.\n\t * - `**`: matches zero or more occurrences of *any* character. As such, it's not\n\t * appropriate for use in a scheme, domain, etc. as it would match too much. (e.g.\n\t * http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might\n\t * not have been the intention.) Its usage at the very end of the path is ok. (e.g.\n\t * http://foo.example.com/templates/**).\n\t * - **RegExp** (*see caveat below*)\n\t * - *Caveat*: While regular expressions are powerful and offer great flexibility, their syntax\n\t * (and all the inevitable escaping) makes them *harder to maintain*. It's easy to\n\t * accidentally introduce a bug when one updates a complex expression (imho, all regexes should\n\t * have good test coverage). For instance, the use of `.` in the regex is correct only in a\n\t * small number of cases. A `.` character in the regex used when matching the scheme or a\n\t * subdomain could be matched against a `:` or literal `.` that was likely not intended. It\n\t * is highly recommended to use the string patterns and only fall back to regular expressions\n\t * as a last resort.\n\t * - The regular expression must be an instance of RegExp (i.e. not a string.) It is\n\t * matched against the **entire** *normalized / absolute URL* of the resource being tested\n\t * (even when the RegExp did not have the `^` and `$` codes.) In addition, any flags\n\t * present on the RegExp (such as multiline, global, ignoreCase) are ignored.\n\t * - If you are generating your JavaScript from some other templating engine (not\n\t * recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)),\n\t * remember to escape your regular expression (and be aware that you might need more than\n\t * one level of escaping depending on your templating engine and the way you interpolated\n\t * the value.) Do make use of your platform's escaping mechanism as it might be good\n\t * enough before coding your own. E.g. Ruby has\n\t * [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)\n\t * and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).\n\t * Javascript lacks a similar built in function for escaping. Take a look at Google\n\t * Closure library's [goog.string.regExpEscape(s)](\n\t * http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962).\n\t *\n\t * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example.\n\t *\n\t * ## Show me an example using SCE.\n\t *\n\t * <example module=\"mySceApp\" deps=\"angular-sanitize.js\">\n\t * <file name=\"index.html\">\n\t * <div ng-controller=\"AppController as myCtrl\">\n\t * <i ng-bind-html=\"myCtrl.explicitlyTrustedHtml\" id=\"explicitlyTrustedHtml\"></i><br><br>\n\t * <b>User comments</b><br>\n\t * By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when\n\t * $sanitize is available. If $sanitize isn't available, this results in an error instead of an\n\t * exploit.\n\t * <div class=\"well\">\n\t * <div ng-repeat=\"userComment in myCtrl.userComments\">\n\t * <b>{{userComment.name}}</b>:\n\t * <span ng-bind-html=\"userComment.htmlComment\" class=\"htmlComment\"></span>\n\t * <br>\n\t * </div>\n\t * </div>\n\t * </div>\n\t * </file>\n\t *\n\t * <file name=\"script.js\">\n\t * angular.module('mySceApp', ['ngSanitize'])\n\t * .controller('AppController', ['$http', '$templateCache', '$sce',\n\t * function($http, $templateCache, $sce) {\n\t * var self = this;\n\t * $http.get(\"test_data.json\", {cache: $templateCache}).success(function(userComments) {\n\t * self.userComments = userComments;\n\t * });\n\t * self.explicitlyTrustedHtml = $sce.trustAsHtml(\n\t * '<span onmouseover=\"this.textContent=&quot;Explicitly trusted HTML bypasses ' +\n\t * 'sanitization.&quot;\">Hover over this text.</span>');\n\t * }]);\n\t * </file>\n\t *\n\t * <file name=\"test_data.json\">\n\t * [\n\t * { \"name\": \"Alice\",\n\t * \"htmlComment\":\n\t * \"<span onmouseover='this.textContent=\\\"PWN3D!\\\"'>Is <i>anyone</i> reading this?</span>\"\n\t * },\n\t * { \"name\": \"Bob\",\n\t * \"htmlComment\": \"<i>Yes!</i> Am I the only other one?\"\n\t * }\n\t * ]\n\t * </file>\n\t *\n\t * <file name=\"protractor.js\" type=\"protractor\">\n\t * describe('SCE doc demo', function() {\n\t * it('should sanitize untrusted values', function() {\n\t * expect(element.all(by.css('.htmlComment')).first().getInnerHtml())\n\t * .toBe('<span>Is <i>anyone</i> reading this?</span>');\n\t * });\n\t *\n\t * it('should NOT sanitize explicitly trusted values', function() {\n\t * expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe(\n\t * '<span onmouseover=\"this.textContent=&quot;Explicitly trusted HTML bypasses ' +\n\t * 'sanitization.&quot;\">Hover over this text.</span>');\n\t * });\n\t * });\n\t * </file>\n\t * </example>\n\t *\n\t *\n\t *\n\t * ## Can I disable SCE completely?\n\t *\n\t * Yes, you can. However, this is strongly discouraged. SCE gives you a lot of security benefits\n\t * for little coding overhead. It will be much harder to take an SCE disabled application and\n\t * either secure it on your own or enable SCE at a later stage. It might make sense to disable SCE\n\t * for cases where you have a lot of existing code that was written before SCE was introduced and\n\t * you're migrating them a module at a time.\n\t *\n\t * That said, here's how you can completely disable SCE:\n\t *\n\t * ```\n\t * angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) {\n\t * // Completely disable SCE. For demonstration purposes only!\n\t * // Do not use in new projects.\n\t * $sceProvider.enabled(false);\n\t * });\n\t * ```\n\t *\n\t */\n\t/* jshint maxlen: 100 */\n\t\n\tfunction $SceProvider() {\n\t var enabled = true;\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sceProvider#enabled\n\t * @kind function\n\t *\n\t * @param {boolean=} value If provided, then enables/disables SCE.\n\t * @return {boolean} true if SCE is enabled, false otherwise.\n\t *\n\t * @description\n\t * Enables/disables SCE and returns the current value.\n\t */\n\t this.enabled = function(value) {\n\t if (arguments.length) {\n\t enabled = !!value;\n\t }\n\t return enabled;\n\t };\n\t\n\t\n\t /* Design notes on the default implementation for SCE.\n\t *\n\t * The API contract for the SCE delegate\n\t * -------------------------------------\n\t * The SCE delegate object must provide the following 3 methods:\n\t *\n\t * - trustAs(contextEnum, value)\n\t * This method is used to tell the SCE service that the provided value is OK to use in the\n\t * contexts specified by contextEnum. It must return an object that will be accepted by\n\t * getTrusted() for a compatible contextEnum and return this value.\n\t *\n\t * - valueOf(value)\n\t * For values that were not produced by trustAs(), return them as is. For values that were\n\t * produced by trustAs(), return the corresponding input value to trustAs. Basically, if\n\t * trustAs is wrapping the given values into some type, this operation unwraps it when given\n\t * such a value.\n\t *\n\t * - getTrusted(contextEnum, value)\n\t * This function should return the a value that is safe to use in the context specified by\n\t * contextEnum or throw and exception otherwise.\n\t *\n\t * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be\n\t * opaque or wrapped in some holder object. That happens to be an implementation detail. For\n\t * instance, an implementation could maintain a registry of all trusted objects by context. In\n\t * such a case, trustAs() would return the same object that was passed in. getTrusted() would\n\t * return the same object passed in if it was found in the registry under a compatible context or\n\t * throw an exception otherwise. An implementation might only wrap values some of the time based\n\t * on some criteria. getTrusted() might return a value and not throw an exception for special\n\t * constants or objects even if not wrapped. All such implementations fulfill this contract.\n\t *\n\t *\n\t * A note on the inheritance model for SCE contexts\n\t * ------------------------------------------------\n\t * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types. This\n\t * is purely an implementation details.\n\t *\n\t * The contract is simply this:\n\t *\n\t * getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value)\n\t * will also succeed.\n\t *\n\t * Inheritance happens to capture this in a natural way. In some future, we\n\t * may not use inheritance anymore. That is OK because no code outside of\n\t * sce.js and sceSpecs.js would need to be aware of this detail.\n\t */\n\t\n\t this.$get = ['$parse', '$sceDelegate', function(\n\t $parse, $sceDelegate) {\n\t // Prereq: Ensure that we're not running in IE<11 quirks mode. In that mode, IE < 11 allow\n\t // the \"expression(javascript expression)\" syntax which is insecure.\n\t if (enabled && msie < 8) {\n\t throw $sceMinErr('iequirks',\n\t 'Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks ' +\n\t 'mode. You can fix this by adding the text <!doctype html> to the top of your HTML ' +\n\t 'document. See http://docs.angularjs.org/api/ng.$sce for more information.');\n\t }\n\t\n\t var sce = shallowCopy(SCE_CONTEXTS);\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sce#isEnabled\n\t * @kind function\n\t *\n\t * @return {Boolean} true if SCE is enabled, false otherwise. If you want to set the value, you\n\t * have to do it at module config time on {@link ng.$sceProvider $sceProvider}.\n\t *\n\t * @description\n\t * Returns a boolean indicating if SCE is enabled.\n\t */\n\t sce.isEnabled = function() {\n\t return enabled;\n\t };\n\t sce.trustAs = $sceDelegate.trustAs;\n\t sce.getTrusted = $sceDelegate.getTrusted;\n\t sce.valueOf = $sceDelegate.valueOf;\n\t\n\t if (!enabled) {\n\t sce.trustAs = sce.getTrusted = function(type, value) { return value; };\n\t sce.valueOf = identity;\n\t }\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sce#parseAs\n\t *\n\t * @description\n\t * Converts Angular {@link guide/expression expression} into a function. This is like {@link\n\t * ng.$parse $parse} and is identical when the expression is a literal constant. Otherwise, it\n\t * wraps the expression in a call to {@link ng.$sce#getTrusted $sce.getTrusted(*type*,\n\t * *result*)}\n\t *\n\t * @param {string} type The kind of SCE context in which this result will be used.\n\t * @param {string} expression String expression to compile.\n\t * @returns {function(context, locals)} a function which represents the compiled expression:\n\t *\n\t * * `context` `{object}` an object against which any expressions embedded in the strings\n\t * are evaluated against (typically a scope object).\n\t * * `locals` `{object=}` local variables context object, useful for overriding values in\n\t * `context`.\n\t */\n\t sce.parseAs = function sceParseAs(type, expr) {\n\t var parsed = $parse(expr);\n\t if (parsed.literal && parsed.constant) {\n\t return parsed;\n\t } else {\n\t return $parse(expr, function(value) {\n\t return sce.getTrusted(type, value);\n\t });\n\t }\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sce#trustAs\n\t *\n\t * @description\n\t * Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. As such,\n\t * returns an object that is trusted by angular for use in specified strict contextual\n\t * escaping contexts (such as ng-bind-html, ng-include, any src attribute\n\t * interpolation, any dom event binding attribute interpolation such as for onclick, etc.)\n\t * that uses the provided value. See * {@link ng.$sce $sce} for enabling strict contextual\n\t * escaping.\n\t *\n\t * @param {string} type The kind of context in which this value is safe for use. e.g. url,\n\t * resourceUrl, html, js and css.\n\t * @param {*} value The value that that should be considered trusted/safe.\n\t * @returns {*} A value that can be used to stand in for the provided `value` in places\n\t * where Angular expects a $sce.trustAs() return value.\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sce#trustAsHtml\n\t *\n\t * @description\n\t * Shorthand method. `$sce.trustAsHtml(value)` →\n\t * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.HTML, value)`}\n\t *\n\t * @param {*} value The value to trustAs.\n\t * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedHtml\n\t * $sce.getTrustedHtml(value)} to obtain the original value. (privileged directives\n\t * only accept expressions that are either literal constants or are the\n\t * return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sce#trustAsUrl\n\t *\n\t * @description\n\t * Shorthand method. `$sce.trustAsUrl(value)` →\n\t * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.URL, value)`}\n\t *\n\t * @param {*} value The value to trustAs.\n\t * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedUrl\n\t * $sce.getTrustedUrl(value)} to obtain the original value. (privileged directives\n\t * only accept expressions that are either literal constants or are the\n\t * return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sce#trustAsResourceUrl\n\t *\n\t * @description\n\t * Shorthand method. `$sce.trustAsResourceUrl(value)` →\n\t * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`}\n\t *\n\t * @param {*} value The value to trustAs.\n\t * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedResourceUrl\n\t * $sce.getTrustedResourceUrl(value)} to obtain the original value. (privileged directives\n\t * only accept expressions that are either literal constants or are the return\n\t * value of {@link ng.$sce#trustAs $sce.trustAs}.)\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sce#trustAsJs\n\t *\n\t * @description\n\t * Shorthand method. `$sce.trustAsJs(value)` →\n\t * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.JS, value)`}\n\t *\n\t * @param {*} value The value to trustAs.\n\t * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedJs\n\t * $sce.getTrustedJs(value)} to obtain the original value. (privileged directives\n\t * only accept expressions that are either literal constants or are the\n\t * return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sce#getTrusted\n\t *\n\t * @description\n\t * Delegates to {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted`}. As such,\n\t * takes the result of a {@link ng.$sce#trustAs `$sce.trustAs`}() call and returns the\n\t * originally supplied value if the queried context type is a supertype of the created type.\n\t * If this condition isn't satisfied, throws an exception.\n\t *\n\t * @param {string} type The kind of context in which this value is to be used.\n\t * @param {*} maybeTrusted The result of a prior {@link ng.$sce#trustAs `$sce.trustAs`}\n\t * call.\n\t * @returns {*} The value the was originally provided to\n\t * {@link ng.$sce#trustAs `$sce.trustAs`} if valid in this context.\n\t * Otherwise, throws an exception.\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sce#getTrustedHtml\n\t *\n\t * @description\n\t * Shorthand method. `$sce.getTrustedHtml(value)` →\n\t * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`}\n\t *\n\t * @param {*} value The value to pass to `$sce.getTrusted`.\n\t * @returns {*} The return value of `$sce.getTrusted($sce.HTML, value)`\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sce#getTrustedCss\n\t *\n\t * @description\n\t * Shorthand method. `$sce.getTrustedCss(value)` →\n\t * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`}\n\t *\n\t * @param {*} value The value to pass to `$sce.getTrusted`.\n\t * @returns {*} The return value of `$sce.getTrusted($sce.CSS, value)`\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sce#getTrustedUrl\n\t *\n\t * @description\n\t * Shorthand method. `$sce.getTrustedUrl(value)` →\n\t * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.URL, value)`}\n\t *\n\t * @param {*} value The value to pass to `$sce.getTrusted`.\n\t * @returns {*} The return value of `$sce.getTrusted($sce.URL, value)`\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sce#getTrustedResourceUrl\n\t *\n\t * @description\n\t * Shorthand method. `$sce.getTrustedResourceUrl(value)` →\n\t * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`}\n\t *\n\t * @param {*} value The value to pass to `$sceDelegate.getTrusted`.\n\t * @returns {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)`\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sce#getTrustedJs\n\t *\n\t * @description\n\t * Shorthand method. `$sce.getTrustedJs(value)` →\n\t * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.JS, value)`}\n\t *\n\t * @param {*} value The value to pass to `$sce.getTrusted`.\n\t * @returns {*} The return value of `$sce.getTrusted($sce.JS, value)`\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sce#parseAsHtml\n\t *\n\t * @description\n\t * Shorthand method. `$sce.parseAsHtml(expression string)` →\n\t * {@link ng.$sce#parseAs `$sce.parseAs($sce.HTML, value)`}\n\t *\n\t * @param {string} expression String expression to compile.\n\t * @returns {function(context, locals)} a function which represents the compiled expression:\n\t *\n\t * * `context` `{object}` an object against which any expressions embedded in the strings\n\t * are evaluated against (typically a scope object).\n\t * * `locals` `{object=}` local variables context object, useful for overriding values in\n\t * `context`.\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sce#parseAsCss\n\t *\n\t * @description\n\t * Shorthand method. `$sce.parseAsCss(value)` →\n\t * {@link ng.$sce#parseAs `$sce.parseAs($sce.CSS, value)`}\n\t *\n\t * @param {string} expression String expression to compile.\n\t * @returns {function(context, locals)} a function which represents the compiled expression:\n\t *\n\t * * `context` `{object}` an object against which any expressions embedded in the strings\n\t * are evaluated against (typically a scope object).\n\t * * `locals` `{object=}` local variables context object, useful for overriding values in\n\t * `context`.\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sce#parseAsUrl\n\t *\n\t * @description\n\t * Shorthand method. `$sce.parseAsUrl(value)` →\n\t * {@link ng.$sce#parseAs `$sce.parseAs($sce.URL, value)`}\n\t *\n\t * @param {string} expression String expression to compile.\n\t * @returns {function(context, locals)} a function which represents the compiled expression:\n\t *\n\t * * `context` `{object}` an object against which any expressions embedded in the strings\n\t * are evaluated against (typically a scope object).\n\t * * `locals` `{object=}` local variables context object, useful for overriding values in\n\t * `context`.\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sce#parseAsResourceUrl\n\t *\n\t * @description\n\t * Shorthand method. `$sce.parseAsResourceUrl(value)` →\n\t * {@link ng.$sce#parseAs `$sce.parseAs($sce.RESOURCE_URL, value)`}\n\t *\n\t * @param {string} expression String expression to compile.\n\t * @returns {function(context, locals)} a function which represents the compiled expression:\n\t *\n\t * * `context` `{object}` an object against which any expressions embedded in the strings\n\t * are evaluated against (typically a scope object).\n\t * * `locals` `{object=}` local variables context object, useful for overriding values in\n\t * `context`.\n\t */\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $sce#parseAsJs\n\t *\n\t * @description\n\t * Shorthand method. `$sce.parseAsJs(value)` →\n\t * {@link ng.$sce#parseAs `$sce.parseAs($sce.JS, value)`}\n\t *\n\t * @param {string} expression String expression to compile.\n\t * @returns {function(context, locals)} a function which represents the compiled expression:\n\t *\n\t * * `context` `{object}` an object against which any expressions embedded in the strings\n\t * are evaluated against (typically a scope object).\n\t * * `locals` `{object=}` local variables context object, useful for overriding values in\n\t * `context`.\n\t */\n\t\n\t // Shorthand delegations.\n\t var parse = sce.parseAs,\n\t getTrusted = sce.getTrusted,\n\t trustAs = sce.trustAs;\n\t\n\t forEach(SCE_CONTEXTS, function(enumValue, name) {\n\t var lName = lowercase(name);\n\t sce[camelCase(\"parse_as_\" + lName)] = function(expr) {\n\t return parse(enumValue, expr);\n\t };\n\t sce[camelCase(\"get_trusted_\" + lName)] = function(value) {\n\t return getTrusted(enumValue, value);\n\t };\n\t sce[camelCase(\"trust_as_\" + lName)] = function(value) {\n\t return trustAs(enumValue, value);\n\t };\n\t });\n\t\n\t return sce;\n\t }];\n\t}\n\t\n\t/**\n\t * !!! This is an undocumented \"private\" service !!!\n\t *\n\t * @name $sniffer\n\t * @requires $window\n\t * @requires $document\n\t *\n\t * @property {boolean} history Does the browser support html5 history api ?\n\t * @property {boolean} transitions Does the browser support CSS transition events ?\n\t * @property {boolean} animations Does the browser support CSS animation events ?\n\t *\n\t * @description\n\t * This is very simple implementation of testing browser's features.\n\t */\n\tfunction $SnifferProvider() {\n\t this.$get = ['$window', '$document', function($window, $document) {\n\t var eventSupport = {},\n\t android =\n\t toInt((/android (\\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),\n\t boxee = /Boxee/i.test(($window.navigator || {}).userAgent),\n\t document = $document[0] || {},\n\t vendorPrefix,\n\t vendorRegex = /^(Moz|webkit|ms)(?=[A-Z])/,\n\t bodyStyle = document.body && document.body.style,\n\t transitions = false,\n\t animations = false,\n\t match;\n\t\n\t if (bodyStyle) {\n\t for (var prop in bodyStyle) {\n\t if (match = vendorRegex.exec(prop)) {\n\t vendorPrefix = match[0];\n\t vendorPrefix = vendorPrefix.substr(0, 1).toUpperCase() + vendorPrefix.substr(1);\n\t break;\n\t }\n\t }\n\t\n\t if (!vendorPrefix) {\n\t vendorPrefix = ('WebkitOpacity' in bodyStyle) && 'webkit';\n\t }\n\t\n\t transitions = !!(('transition' in bodyStyle) || (vendorPrefix + 'Transition' in bodyStyle));\n\t animations = !!(('animation' in bodyStyle) || (vendorPrefix + 'Animation' in bodyStyle));\n\t\n\t if (android && (!transitions || !animations)) {\n\t transitions = isString(bodyStyle.webkitTransition);\n\t animations = isString(bodyStyle.webkitAnimation);\n\t }\n\t }\n\t\n\t\n\t return {\n\t // Android has history.pushState, but it does not update location correctly\n\t // so let's not use the history API at all.\n\t // http://code.google.com/p/android/issues/detail?id=17471\n\t // https://github.com/angular/angular.js/issues/904\n\t\n\t // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has\n\t // so let's not use the history API also\n\t // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined\n\t // jshint -W018\n\t history: !!($window.history && $window.history.pushState && !(android < 4) && !boxee),\n\t // jshint +W018\n\t hasEvent: function(event) {\n\t // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have\n\t // it. In particular the event is not fired when backspace or delete key are pressed or\n\t // when cut operation is performed.\n\t // IE10+ implements 'input' event but it erroneously fires under various situations,\n\t // e.g. when placeholder changes, or a form is focused.\n\t if (event === 'input' && msie <= 11) return false;\n\t\n\t if (isUndefined(eventSupport[event])) {\n\t var divElm = document.createElement('div');\n\t eventSupport[event] = 'on' + event in divElm;\n\t }\n\t\n\t return eventSupport[event];\n\t },\n\t csp: csp(),\n\t vendorPrefix: vendorPrefix,\n\t transitions: transitions,\n\t animations: animations,\n\t android: android\n\t };\n\t }];\n\t}\n\t\n\tvar $compileMinErr = minErr('$compile');\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $templateRequest\n\t *\n\t * @description\n\t * The `$templateRequest` service runs security checks then downloads the provided template using\n\t * `$http` and, upon success, stores the contents inside of `$templateCache`. If the HTTP request\n\t * fails or the response data of the HTTP request is empty, a `$compile` error will be thrown (the\n\t * exception can be thwarted by setting the 2nd parameter of the function to true). Note that the\n\t * contents of `$templateCache` are trusted, so the call to `$sce.getTrustedUrl(tpl)` is omitted\n\t * when `tpl` is of type string and `$templateCache` has the matching entry.\n\t *\n\t * @param {string|TrustedResourceUrl} tpl The HTTP request template URL\n\t * @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty\n\t *\n\t * @return {Promise} a promise for the HTTP response data of the given URL.\n\t *\n\t * @property {number} totalPendingRequests total amount of pending template requests being downloaded.\n\t */\n\tfunction $TemplateRequestProvider() {\n\t this.$get = ['$templateCache', '$http', '$q', '$sce', function($templateCache, $http, $q, $sce) {\n\t function handleRequestFn(tpl, ignoreRequestError) {\n\t handleRequestFn.totalPendingRequests++;\n\t\n\t // We consider the template cache holds only trusted templates, so\n\t // there's no need to go through whitelisting again for keys that already\n\t // are included in there. This also makes Angular accept any script\n\t // directive, no matter its name. However, we still need to unwrap trusted\n\t // types.\n\t if (!isString(tpl) || isUndefined($templateCache.get(tpl))) {\n\t tpl = $sce.getTrustedResourceUrl(tpl);\n\t }\n\t\n\t var transformResponse = $http.defaults && $http.defaults.transformResponse;\n\t\n\t if (isArray(transformResponse)) {\n\t transformResponse = transformResponse.filter(function(transformer) {\n\t return transformer !== defaultHttpResponseTransform;\n\t });\n\t } else if (transformResponse === defaultHttpResponseTransform) {\n\t transformResponse = null;\n\t }\n\t\n\t var httpOptions = {\n\t cache: $templateCache,\n\t transformResponse: transformResponse\n\t };\n\t\n\t return $http.get(tpl, httpOptions)\n\t ['finally'](function() {\n\t handleRequestFn.totalPendingRequests--;\n\t })\n\t .then(function(response) {\n\t $templateCache.put(tpl, response.data);\n\t return response.data;\n\t }, handleError);\n\t\n\t function handleError(resp) {\n\t if (!ignoreRequestError) {\n\t throw $compileMinErr('tpload', 'Failed to load template: {0} (HTTP status: {1} {2})',\n\t tpl, resp.status, resp.statusText);\n\t }\n\t return $q.reject(resp);\n\t }\n\t }\n\t\n\t handleRequestFn.totalPendingRequests = 0;\n\t\n\t return handleRequestFn;\n\t }];\n\t}\n\t\n\tfunction $$TestabilityProvider() {\n\t this.$get = ['$rootScope', '$browser', '$location',\n\t function($rootScope, $browser, $location) {\n\t\n\t /**\n\t * @name $testability\n\t *\n\t * @description\n\t * The private $$testability service provides a collection of methods for use when debugging\n\t * or by automated test and debugging tools.\n\t */\n\t var testability = {};\n\t\n\t /**\n\t * @name $$testability#findBindings\n\t *\n\t * @description\n\t * Returns an array of elements that are bound (via ng-bind or {{}})\n\t * to expressions matching the input.\n\t *\n\t * @param {Element} element The element root to search from.\n\t * @param {string} expression The binding expression to match.\n\t * @param {boolean} opt_exactMatch If true, only returns exact matches\n\t * for the expression. Filters and whitespace are ignored.\n\t */\n\t testability.findBindings = function(element, expression, opt_exactMatch) {\n\t var bindings = element.getElementsByClassName('ng-binding');\n\t var matches = [];\n\t forEach(bindings, function(binding) {\n\t var dataBinding = angular.element(binding).data('$binding');\n\t if (dataBinding) {\n\t forEach(dataBinding, function(bindingName) {\n\t if (opt_exactMatch) {\n\t var matcher = new RegExp('(^|\\\\s)' + escapeForRegexp(expression) + '(\\\\s|\\\\||$)');\n\t if (matcher.test(bindingName)) {\n\t matches.push(binding);\n\t }\n\t } else {\n\t if (bindingName.indexOf(expression) != -1) {\n\t matches.push(binding);\n\t }\n\t }\n\t });\n\t }\n\t });\n\t return matches;\n\t };\n\t\n\t /**\n\t * @name $$testability#findModels\n\t *\n\t * @description\n\t * Returns an array of elements that are two-way found via ng-model to\n\t * expressions matching the input.\n\t *\n\t * @param {Element} element The element root to search from.\n\t * @param {string} expression The model expression to match.\n\t * @param {boolean} opt_exactMatch If true, only returns exact matches\n\t * for the expression.\n\t */\n\t testability.findModels = function(element, expression, opt_exactMatch) {\n\t var prefixes = ['ng-', 'data-ng-', 'ng\\\\:'];\n\t for (var p = 0; p < prefixes.length; ++p) {\n\t var attributeEquals = opt_exactMatch ? '=' : '*=';\n\t var selector = '[' + prefixes[p] + 'model' + attributeEquals + '\"' + expression + '\"]';\n\t var elements = element.querySelectorAll(selector);\n\t if (elements.length) {\n\t return elements;\n\t }\n\t }\n\t };\n\t\n\t /**\n\t * @name $$testability#getLocation\n\t *\n\t * @description\n\t * Shortcut for getting the location in a browser agnostic way. Returns\n\t * the path, search, and hash. (e.g. /path?a=b#hash)\n\t */\n\t testability.getLocation = function() {\n\t return $location.url();\n\t };\n\t\n\t /**\n\t * @name $$testability#setLocation\n\t *\n\t * @description\n\t * Shortcut for navigating to a location without doing a full page reload.\n\t *\n\t * @param {string} url The location url (path, search and hash,\n\t * e.g. /path?a=b#hash) to go to.\n\t */\n\t testability.setLocation = function(url) {\n\t if (url !== $location.url()) {\n\t $location.url(url);\n\t $rootScope.$digest();\n\t }\n\t };\n\t\n\t /**\n\t * @name $$testability#whenStable\n\t *\n\t * @description\n\t * Calls the callback when $timeout and $http requests are completed.\n\t *\n\t * @param {function} callback\n\t */\n\t testability.whenStable = function(callback) {\n\t $browser.notifyWhenNoOutstandingRequests(callback);\n\t };\n\t\n\t return testability;\n\t }];\n\t}\n\t\n\tfunction $TimeoutProvider() {\n\t this.$get = ['$rootScope', '$browser', '$q', '$$q', '$exceptionHandler',\n\t function($rootScope, $browser, $q, $$q, $exceptionHandler) {\n\t\n\t var deferreds = {};\n\t\n\t\n\t /**\n\t * @ngdoc service\n\t * @name $timeout\n\t *\n\t * @description\n\t * Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch\n\t * block and delegates any exceptions to\n\t * {@link ng.$exceptionHandler $exceptionHandler} service.\n\t *\n\t * The return value of calling `$timeout` is a promise, which will be resolved when\n\t * the delay has passed and the timeout function, if provided, is executed.\n\t *\n\t * To cancel a timeout request, call `$timeout.cancel(promise)`.\n\t *\n\t * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to\n\t * synchronously flush the queue of deferred functions.\n\t *\n\t * If you only want a promise that will be resolved after some specified delay\n\t * then you can call `$timeout` without the `fn` function.\n\t *\n\t * @param {function()=} fn A function, whose execution should be delayed.\n\t * @param {number=} [delay=0] Delay in milliseconds.\n\t * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n\t * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n\t * @param {...*=} Pass additional parameters to the executed function.\n\t * @returns {Promise} Promise that will be resolved when the timeout is reached. The promise\n\t * will be resolved with the return value of the `fn` function.\n\t *\n\t */\n\t function timeout(fn, delay, invokeApply) {\n\t if (!isFunction(fn)) {\n\t invokeApply = delay;\n\t delay = fn;\n\t fn = noop;\n\t }\n\t\n\t var args = sliceArgs(arguments, 3),\n\t skipApply = (isDefined(invokeApply) && !invokeApply),\n\t deferred = (skipApply ? $$q : $q).defer(),\n\t promise = deferred.promise,\n\t timeoutId;\n\t\n\t timeoutId = $browser.defer(function() {\n\t try {\n\t deferred.resolve(fn.apply(null, args));\n\t } catch (e) {\n\t deferred.reject(e);\n\t $exceptionHandler(e);\n\t }\n\t finally {\n\t delete deferreds[promise.$$timeoutId];\n\t }\n\t\n\t if (!skipApply) $rootScope.$apply();\n\t }, delay);\n\t\n\t promise.$$timeoutId = timeoutId;\n\t deferreds[timeoutId] = deferred;\n\t\n\t return promise;\n\t }\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $timeout#cancel\n\t *\n\t * @description\n\t * Cancels a task associated with the `promise`. As a result of this, the promise will be\n\t * resolved with a rejection.\n\t *\n\t * @param {Promise=} promise Promise returned by the `$timeout` function.\n\t * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n\t * canceled.\n\t */\n\t timeout.cancel = function(promise) {\n\t if (promise && promise.$$timeoutId in deferreds) {\n\t deferreds[promise.$$timeoutId].reject('canceled');\n\t delete deferreds[promise.$$timeoutId];\n\t return $browser.defer.cancel(promise.$$timeoutId);\n\t }\n\t return false;\n\t };\n\t\n\t return timeout;\n\t }];\n\t}\n\t\n\t// NOTE: The usage of window and document instead of $window and $document here is\n\t// deliberate. This service depends on the specific behavior of anchor nodes created by the\n\t// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and\n\t// cause us to break tests. In addition, when the browser resolves a URL for XHR, it\n\t// doesn't know about mocked locations and resolves URLs to the real document - which is\n\t// exactly the behavior needed here. There is little value is mocking these out for this\n\t// service.\n\tvar urlParsingNode = document.createElement(\"a\");\n\tvar originUrl = urlResolve(window.location.href);\n\t\n\t\n\t/**\n\t *\n\t * Implementation Notes for non-IE browsers\n\t * ----------------------------------------\n\t * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM,\n\t * results both in the normalizing and parsing of the URL. Normalizing means that a relative\n\t * URL will be resolved into an absolute URL in the context of the application document.\n\t * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related\n\t * properties are all populated to reflect the normalized URL. This approach has wide\n\t * compatibility - Safari 1+, Mozilla 1+, Opera 7+,e etc. See\n\t * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n\t *\n\t * Implementation Notes for IE\n\t * ---------------------------\n\t * IE <= 10 normalizes the URL when assigned to the anchor node similar to the other\n\t * browsers. However, the parsed components will not be set if the URL assigned did not specify\n\t * them. (e.g. if you assign a.href = \"foo\", then a.protocol, a.host, etc. will be empty.) We\n\t * work around that by performing the parsing in a 2nd step by taking a previously normalized\n\t * URL (e.g. by assigning to a.href) and assigning it a.href again. This correctly populates the\n\t * properties such as protocol, hostname, port, etc.\n\t *\n\t * References:\n\t * http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement\n\t * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n\t * http://url.spec.whatwg.org/#urlutils\n\t * https://github.com/angular/angular.js/pull/2902\n\t * http://james.padolsey.com/javascript/parsing-urls-with-the-dom/\n\t *\n\t * @kind function\n\t * @param {string} url The URL to be parsed.\n\t * @description Normalizes and parses a URL.\n\t * @returns {object} Returns the normalized URL as a dictionary.\n\t *\n\t * | member name | Description |\n\t * |---------------|----------------|\n\t * | href | A normalized version of the provided URL if it was not an absolute URL |\n\t * | protocol | The protocol including the trailing colon |\n\t * | host | The host and port (if the port is non-default) of the normalizedUrl |\n\t * | search | The search params, minus the question mark |\n\t * | hash | The hash string, minus the hash symbol\n\t * | hostname | The hostname\n\t * | port | The port, without \":\"\n\t * | pathname | The pathname, beginning with \"/\"\n\t *\n\t */\n\tfunction urlResolve(url) {\n\t var href = url;\n\t\n\t if (msie) {\n\t // Normalize before parse. Refer Implementation Notes on why this is\n\t // done in two steps on IE.\n\t urlParsingNode.setAttribute(\"href\", href);\n\t href = urlParsingNode.href;\n\t }\n\t\n\t urlParsingNode.setAttribute('href', href);\n\t\n\t // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n\t return {\n\t href: urlParsingNode.href,\n\t protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n\t host: urlParsingNode.host,\n\t search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n\t hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n\t hostname: urlParsingNode.hostname,\n\t port: urlParsingNode.port,\n\t pathname: (urlParsingNode.pathname.charAt(0) === '/')\n\t ? urlParsingNode.pathname\n\t : '/' + urlParsingNode.pathname\n\t };\n\t}\n\t\n\t/**\n\t * Parse a request URL and determine whether this is a same-origin request as the application document.\n\t *\n\t * @param {string|object} requestUrl The url of the request as a string that will be resolved\n\t * or a parsed URL object.\n\t * @returns {boolean} Whether the request is for the same origin as the application document.\n\t */\n\tfunction urlIsSameOrigin(requestUrl) {\n\t var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;\n\t return (parsed.protocol === originUrl.protocol &&\n\t parsed.host === originUrl.host);\n\t}\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $window\n\t *\n\t * @description\n\t * A reference to the browser's `window` object. While `window`\n\t * is globally available in JavaScript, it causes testability problems, because\n\t * it is a global variable. In angular we always refer to it through the\n\t * `$window` service, so it may be overridden, removed or mocked for testing.\n\t *\n\t * Expressions, like the one defined for the `ngClick` directive in the example\n\t * below, are evaluated with respect to the current scope. Therefore, there is\n\t * no risk of inadvertently coding in a dependency on a global value in such an\n\t * expression.\n\t *\n\t * @example\n\t <example module=\"windowExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('windowExample', [])\n\t .controller('ExampleController', ['$scope', '$window', function($scope, $window) {\n\t $scope.greeting = 'Hello, World!';\n\t $scope.doGreeting = function(greeting) {\n\t $window.alert(greeting);\n\t };\n\t }]);\n\t </script>\n\t <div ng-controller=\"ExampleController\">\n\t <input type=\"text\" ng-model=\"greeting\" aria-label=\"greeting\" />\n\t <button ng-click=\"doGreeting(greeting)\">ALERT</button>\n\t </div>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should display the greeting in the input box', function() {\n\t element(by.model('greeting')).sendKeys('Hello, E2E Tests');\n\t // If we click the button it will block the test runner\n\t // element(':button').click();\n\t });\n\t </file>\n\t </example>\n\t */\n\tfunction $WindowProvider() {\n\t this.$get = valueFn(window);\n\t}\n\t\n\t/**\n\t * @name $$cookieReader\n\t * @requires $document\n\t *\n\t * @description\n\t * This is a private service for reading cookies used by $http and ngCookies\n\t *\n\t * @return {Object} a key/value map of the current cookies\n\t */\n\tfunction $$CookieReader($document) {\n\t var rawDocument = $document[0] || {};\n\t var lastCookies = {};\n\t var lastCookieString = '';\n\t\n\t function safeDecodeURIComponent(str) {\n\t try {\n\t return decodeURIComponent(str);\n\t } catch (e) {\n\t return str;\n\t }\n\t }\n\t\n\t return function() {\n\t var cookieArray, cookie, i, index, name;\n\t var currentCookieString = rawDocument.cookie || '';\n\t\n\t if (currentCookieString !== lastCookieString) {\n\t lastCookieString = currentCookieString;\n\t cookieArray = lastCookieString.split('; ');\n\t lastCookies = {};\n\t\n\t for (i = 0; i < cookieArray.length; i++) {\n\t cookie = cookieArray[i];\n\t index = cookie.indexOf('=');\n\t if (index > 0) { //ignore nameless cookies\n\t name = safeDecodeURIComponent(cookie.substring(0, index));\n\t // the first value that is seen for a cookie is the most\n\t // specific one. values for the same cookie name that\n\t // follow are for less specific paths.\n\t if (isUndefined(lastCookies[name])) {\n\t lastCookies[name] = safeDecodeURIComponent(cookie.substring(index + 1));\n\t }\n\t }\n\t }\n\t }\n\t return lastCookies;\n\t };\n\t}\n\t\n\t$$CookieReader.$inject = ['$document'];\n\t\n\tfunction $$CookieReaderProvider() {\n\t this.$get = $$CookieReader;\n\t}\n\t\n\t/* global currencyFilter: true,\n\t dateFilter: true,\n\t filterFilter: true,\n\t jsonFilter: true,\n\t limitToFilter: true,\n\t lowercaseFilter: true,\n\t numberFilter: true,\n\t orderByFilter: true,\n\t uppercaseFilter: true,\n\t */\n\t\n\t/**\n\t * @ngdoc provider\n\t * @name $filterProvider\n\t * @description\n\t *\n\t * Filters are just functions which transform input to an output. However filters need to be\n\t * Dependency Injected. To achieve this a filter definition consists of a factory function which is\n\t * annotated with dependencies and is responsible for creating a filter function.\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.\n\t * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace\n\t * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores\n\t * (`myapp_subsection_filterx`).\n\t * </div>\n\t *\n\t * ```js\n\t * // Filter registration\n\t * function MyModule($provide, $filterProvider) {\n\t * // create a service to demonstrate injection (not always needed)\n\t * $provide.value('greet', function(name){\n\t * return 'Hello ' + name + '!';\n\t * });\n\t *\n\t * // register a filter factory which uses the\n\t * // greet service to demonstrate DI.\n\t * $filterProvider.register('greet', function(greet){\n\t * // return the filter function which uses the greet service\n\t * // to generate salutation\n\t * return function(text) {\n\t * // filters need to be forgiving so check input validity\n\t * return text && greet(text) || text;\n\t * };\n\t * });\n\t * }\n\t * ```\n\t *\n\t * The filter function is registered with the `$injector` under the filter name suffix with\n\t * `Filter`.\n\t *\n\t * ```js\n\t * it('should be the same instance', inject(\n\t * function($filterProvider) {\n\t * $filterProvider.register('reverse', function(){\n\t * return ...;\n\t * });\n\t * },\n\t * function($filter, reverseFilter) {\n\t * expect($filter('reverse')).toBe(reverseFilter);\n\t * });\n\t * ```\n\t *\n\t *\n\t * For more information about how angular filters work, and how to create your own filters, see\n\t * {@link guide/filter Filters} in the Angular Developer Guide.\n\t */\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $filter\n\t * @kind function\n\t * @description\n\t * Filters are used for formatting data displayed to the user.\n\t *\n\t * The general syntax in templates is as follows:\n\t *\n\t * {{ expression [| filter_name[:parameter_value] ... ] }}\n\t *\n\t * @param {String} name Name of the filter function to retrieve\n\t * @return {Function} the filter function\n\t * @example\n\t <example name=\"$filter\" module=\"filterExample\">\n\t <file name=\"index.html\">\n\t <div ng-controller=\"MainCtrl\">\n\t <h3>{{ originalText }}</h3>\n\t <h3>{{ filteredText }}</h3>\n\t </div>\n\t </file>\n\t\n\t <file name=\"script.js\">\n\t angular.module('filterExample', [])\n\t .controller('MainCtrl', function($scope, $filter) {\n\t $scope.originalText = 'hello';\n\t $scope.filteredText = $filter('uppercase')($scope.originalText);\n\t });\n\t </file>\n\t </example>\n\t */\n\t$FilterProvider.$inject = ['$provide'];\n\tfunction $FilterProvider($provide) {\n\t var suffix = 'Filter';\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $filterProvider#register\n\t * @param {string|Object} name Name of the filter function, or an object map of filters where\n\t * the keys are the filter names and the values are the filter factories.\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.\n\t * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace\n\t * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores\n\t * (`myapp_subsection_filterx`).\n\t * </div>\n\t * @param {Function} factory If the first argument was a string, a factory function for the filter to be registered.\n\t * @returns {Object} Registered filter instance, or if a map of filters was provided then a map\n\t * of the registered filter instances.\n\t */\n\t function register(name, factory) {\n\t if (isObject(name)) {\n\t var filters = {};\n\t forEach(name, function(filter, key) {\n\t filters[key] = register(key, filter);\n\t });\n\t return filters;\n\t } else {\n\t return $provide.factory(name + suffix, factory);\n\t }\n\t }\n\t this.register = register;\n\t\n\t this.$get = ['$injector', function($injector) {\n\t return function(name) {\n\t return $injector.get(name + suffix);\n\t };\n\t }];\n\t\n\t ////////////////////////////////////////\n\t\n\t /* global\n\t currencyFilter: false,\n\t dateFilter: false,\n\t filterFilter: false,\n\t jsonFilter: false,\n\t limitToFilter: false,\n\t lowercaseFilter: false,\n\t numberFilter: false,\n\t orderByFilter: false,\n\t uppercaseFilter: false,\n\t */\n\t\n\t register('currency', currencyFilter);\n\t register('date', dateFilter);\n\t register('filter', filterFilter);\n\t register('json', jsonFilter);\n\t register('limitTo', limitToFilter);\n\t register('lowercase', lowercaseFilter);\n\t register('number', numberFilter);\n\t register('orderBy', orderByFilter);\n\t register('uppercase', uppercaseFilter);\n\t}\n\t\n\t/**\n\t * @ngdoc filter\n\t * @name filter\n\t * @kind function\n\t *\n\t * @description\n\t * Selects a subset of items from `array` and returns it as a new array.\n\t *\n\t * @param {Array} array The source array.\n\t * @param {string|Object|function()} expression The predicate to be used for selecting items from\n\t * `array`.\n\t *\n\t * Can be one of:\n\t *\n\t * - `string`: The string is used for matching against the contents of the `array`. All strings or\n\t * objects with string properties in `array` that match this string will be returned. This also\n\t * applies to nested object properties.\n\t * The predicate can be negated by prefixing the string with `!`.\n\t *\n\t * - `Object`: A pattern object can be used to filter specific properties on objects contained\n\t * by `array`. For example `{name:\"M\", phone:\"1\"}` predicate will return an array of items\n\t * which have property `name` containing \"M\" and property `phone` containing \"1\". A special\n\t * property name `$` can be used (as in `{$:\"text\"}`) to accept a match against any\n\t * property of the object or its nested object properties. That's equivalent to the simple\n\t * substring match with a `string` as described above. The predicate can be negated by prefixing\n\t * the string with `!`.\n\t * For example `{name: \"!M\"}` predicate will return an array of items which have property `name`\n\t * not containing \"M\".\n\t *\n\t * Note that a named property will match properties on the same level only, while the special\n\t * `$` property will match properties on the same level or deeper. E.g. an array item like\n\t * `{name: {first: 'John', last: 'Doe'}}` will **not** be matched by `{name: 'John'}`, but\n\t * **will** be matched by `{$: 'John'}`.\n\t *\n\t * - `function(value, index, array)`: A predicate function can be used to write arbitrary filters.\n\t * The function is called for each element of the array, with the element, its index, and\n\t * the entire array itself as arguments.\n\t *\n\t * The final result is an array of those elements that the predicate returned true for.\n\t *\n\t * @param {function(actual, expected)|true|undefined} comparator Comparator which is used in\n\t * determining if the expected value (from the filter expression) and actual value (from\n\t * the object in the array) should be considered a match.\n\t *\n\t * Can be one of:\n\t *\n\t * - `function(actual, expected)`:\n\t * The function will be given the object value and the predicate value to compare and\n\t * should return true if both values should be considered equal.\n\t *\n\t * - `true`: A shorthand for `function(actual, expected) { return angular.equals(actual, expected)}`.\n\t * This is essentially strict comparison of expected and actual.\n\t *\n\t * - `false|undefined`: A short hand for a function which will look for a substring match in case\n\t * insensitive way.\n\t *\n\t * Primitive values are converted to strings. Objects are not compared against primitives,\n\t * unless they have a custom `toString` method (e.g. `Date` objects).\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <div ng-init=\"friends = [{name:'John', phone:'555-1276'},\n\t {name:'Mary', phone:'800-BIG-MARY'},\n\t {name:'Mike', phone:'555-4321'},\n\t {name:'Adam', phone:'555-5678'},\n\t {name:'Julie', phone:'555-8765'},\n\t {name:'Juliette', phone:'555-5678'}]\"></div>\n\t\n\t <label>Search: <input ng-model=\"searchText\"></label>\n\t <table id=\"searchTextResults\">\n\t <tr><th>Name</th><th>Phone</th></tr>\n\t <tr ng-repeat=\"friend in friends | filter:searchText\">\n\t <td>{{friend.name}}</td>\n\t <td>{{friend.phone}}</td>\n\t </tr>\n\t </table>\n\t <hr>\n\t <label>Any: <input ng-model=\"search.$\"></label> <br>\n\t <label>Name only <input ng-model=\"search.name\"></label><br>\n\t <label>Phone only <input ng-model=\"search.phone\"></label><br>\n\t <label>Equality <input type=\"checkbox\" ng-model=\"strict\"></label><br>\n\t <table id=\"searchObjResults\">\n\t <tr><th>Name</th><th>Phone</th></tr>\n\t <tr ng-repeat=\"friendObj in friends | filter:search:strict\">\n\t <td>{{friendObj.name}}</td>\n\t <td>{{friendObj.phone}}</td>\n\t </tr>\n\t </table>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var expectFriendNames = function(expectedNames, key) {\n\t element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) {\n\t arr.forEach(function(wd, i) {\n\t expect(wd.getText()).toMatch(expectedNames[i]);\n\t });\n\t });\n\t };\n\t\n\t it('should search across all fields when filtering with a string', function() {\n\t var searchText = element(by.model('searchText'));\n\t searchText.clear();\n\t searchText.sendKeys('m');\n\t expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend');\n\t\n\t searchText.clear();\n\t searchText.sendKeys('76');\n\t expectFriendNames(['John', 'Julie'], 'friend');\n\t });\n\t\n\t it('should search in specific fields when filtering with a predicate object', function() {\n\t var searchAny = element(by.model('search.$'));\n\t searchAny.clear();\n\t searchAny.sendKeys('i');\n\t expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj');\n\t });\n\t it('should use a equal comparison when comparator is true', function() {\n\t var searchName = element(by.model('search.name'));\n\t var strict = element(by.model('strict'));\n\t searchName.clear();\n\t searchName.sendKeys('Julie');\n\t strict.click();\n\t expectFriendNames(['Julie'], 'friendObj');\n\t });\n\t </file>\n\t </example>\n\t */\n\tfunction filterFilter() {\n\t return function(array, expression, comparator) {\n\t if (!isArrayLike(array)) {\n\t if (array == null) {\n\t return array;\n\t } else {\n\t throw minErr('filter')('notarray', 'Expected array but received: {0}', array);\n\t }\n\t }\n\t\n\t var expressionType = getTypeForFilter(expression);\n\t var predicateFn;\n\t var matchAgainstAnyProp;\n\t\n\t switch (expressionType) {\n\t case 'function':\n\t predicateFn = expression;\n\t break;\n\t case 'boolean':\n\t case 'null':\n\t case 'number':\n\t case 'string':\n\t matchAgainstAnyProp = true;\n\t //jshint -W086\n\t case 'object':\n\t //jshint +W086\n\t predicateFn = createPredicateFn(expression, comparator, matchAgainstAnyProp);\n\t break;\n\t default:\n\t return array;\n\t }\n\t\n\t return Array.prototype.filter.call(array, predicateFn);\n\t };\n\t}\n\t\n\t// Helper functions for `filterFilter`\n\tfunction createPredicateFn(expression, comparator, matchAgainstAnyProp) {\n\t var shouldMatchPrimitives = isObject(expression) && ('$' in expression);\n\t var predicateFn;\n\t\n\t if (comparator === true) {\n\t comparator = equals;\n\t } else if (!isFunction(comparator)) {\n\t comparator = function(actual, expected) {\n\t if (isUndefined(actual)) {\n\t // No substring matching against `undefined`\n\t return false;\n\t }\n\t if ((actual === null) || (expected === null)) {\n\t // No substring matching against `null`; only match against `null`\n\t return actual === expected;\n\t }\n\t if (isObject(expected) || (isObject(actual) && !hasCustomToString(actual))) {\n\t // Should not compare primitives against objects, unless they have custom `toString` method\n\t return false;\n\t }\n\t\n\t actual = lowercase('' + actual);\n\t expected = lowercase('' + expected);\n\t return actual.indexOf(expected) !== -1;\n\t };\n\t }\n\t\n\t predicateFn = function(item) {\n\t if (shouldMatchPrimitives && !isObject(item)) {\n\t return deepCompare(item, expression.$, comparator, false);\n\t }\n\t return deepCompare(item, expression, comparator, matchAgainstAnyProp);\n\t };\n\t\n\t return predicateFn;\n\t}\n\t\n\tfunction deepCompare(actual, expected, comparator, matchAgainstAnyProp, dontMatchWholeObject) {\n\t var actualType = getTypeForFilter(actual);\n\t var expectedType = getTypeForFilter(expected);\n\t\n\t if ((expectedType === 'string') && (expected.charAt(0) === '!')) {\n\t return !deepCompare(actual, expected.substring(1), comparator, matchAgainstAnyProp);\n\t } else if (isArray(actual)) {\n\t // In case `actual` is an array, consider it a match\n\t // if ANY of it's items matches `expected`\n\t return actual.some(function(item) {\n\t return deepCompare(item, expected, comparator, matchAgainstAnyProp);\n\t });\n\t }\n\t\n\t switch (actualType) {\n\t case 'object':\n\t var key;\n\t if (matchAgainstAnyProp) {\n\t for (key in actual) {\n\t if ((key.charAt(0) !== '$') && deepCompare(actual[key], expected, comparator, true)) {\n\t return true;\n\t }\n\t }\n\t return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, false);\n\t } else if (expectedType === 'object') {\n\t for (key in expected) {\n\t var expectedVal = expected[key];\n\t if (isFunction(expectedVal) || isUndefined(expectedVal)) {\n\t continue;\n\t }\n\t\n\t var matchAnyProperty = key === '$';\n\t var actualVal = matchAnyProperty ? actual : actual[key];\n\t if (!deepCompare(actualVal, expectedVal, comparator, matchAnyProperty, matchAnyProperty)) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t } else {\n\t return comparator(actual, expected);\n\t }\n\t break;\n\t case 'function':\n\t return false;\n\t default:\n\t return comparator(actual, expected);\n\t }\n\t}\n\t\n\t// Used for easily differentiating between `null` and actual `object`\n\tfunction getTypeForFilter(val) {\n\t return (val === null) ? 'null' : typeof val;\n\t}\n\t\n\tvar MAX_DIGITS = 22;\n\tvar DECIMAL_SEP = '.';\n\tvar ZERO_CHAR = '0';\n\t\n\t/**\n\t * @ngdoc filter\n\t * @name currency\n\t * @kind function\n\t *\n\t * @description\n\t * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default\n\t * symbol for current locale is used.\n\t *\n\t * @param {number} amount Input to filter.\n\t * @param {string=} symbol Currency symbol or identifier to be displayed.\n\t * @param {number=} fractionSize Number of decimal places to round the amount to, defaults to default max fraction size for current locale\n\t * @returns {string} Formatted number.\n\t *\n\t *\n\t * @example\n\t <example module=\"currencyExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('currencyExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.amount = 1234.56;\n\t }]);\n\t </script>\n\t <div ng-controller=\"ExampleController\">\n\t <input type=\"number\" ng-model=\"amount\" aria-label=\"amount\"> <br>\n\t default currency symbol ($): <span id=\"currency-default\">{{amount | currency}}</span><br>\n\t custom currency identifier (USD$): <span id=\"currency-custom\">{{amount | currency:\"USD$\"}}</span>\n\t no fractions (0): <span id=\"currency-no-fractions\">{{amount | currency:\"USD$\":0}}</span>\n\t </div>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should init with 1234.56', function() {\n\t expect(element(by.id('currency-default')).getText()).toBe('$1,234.56');\n\t expect(element(by.id('currency-custom')).getText()).toBe('USD$1,234.56');\n\t expect(element(by.id('currency-no-fractions')).getText()).toBe('USD$1,235');\n\t });\n\t it('should update', function() {\n\t if (browser.params.browser == 'safari') {\n\t // Safari does not understand the minus key. See\n\t // https://github.com/angular/protractor/issues/481\n\t return;\n\t }\n\t element(by.model('amount')).clear();\n\t element(by.model('amount')).sendKeys('-1234');\n\t expect(element(by.id('currency-default')).getText()).toBe('-$1,234.00');\n\t expect(element(by.id('currency-custom')).getText()).toBe('-USD$1,234.00');\n\t expect(element(by.id('currency-no-fractions')).getText()).toBe('-USD$1,234');\n\t });\n\t </file>\n\t </example>\n\t */\n\tcurrencyFilter.$inject = ['$locale'];\n\tfunction currencyFilter($locale) {\n\t var formats = $locale.NUMBER_FORMATS;\n\t return function(amount, currencySymbol, fractionSize) {\n\t if (isUndefined(currencySymbol)) {\n\t currencySymbol = formats.CURRENCY_SYM;\n\t }\n\t\n\t if (isUndefined(fractionSize)) {\n\t fractionSize = formats.PATTERNS[1].maxFrac;\n\t }\n\t\n\t // if null or undefined pass it through\n\t return (amount == null)\n\t ? amount\n\t : formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, fractionSize).\n\t replace(/\\u00A4/g, currencySymbol);\n\t };\n\t}\n\t\n\t/**\n\t * @ngdoc filter\n\t * @name number\n\t * @kind function\n\t *\n\t * @description\n\t * Formats a number as text.\n\t *\n\t * If the input is null or undefined, it will just be returned.\n\t * If the input is infinite (Infinity or -Infinity), the Infinity symbol '∞' or '-∞' is returned, respectively.\n\t * If the input is not a number an empty string is returned.\n\t *\n\t *\n\t * @param {number|string} number Number to format.\n\t * @param {(number|string)=} fractionSize Number of decimal places to round the number to.\n\t * If this is not provided then the fraction size is computed from the current locale's number\n\t * formatting pattern. In the case of the default locale, it will be 3.\n\t * @returns {string} Number rounded to `fractionSize` appropriately formatted based on the current\n\t * locale (e.g., in the en_US locale it will have \".\" as the decimal separator and\n\t * include \",\" group separators after each third digit).\n\t *\n\t * @example\n\t <example module=\"numberFilterExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('numberFilterExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.val = 1234.56789;\n\t }]);\n\t </script>\n\t <div ng-controller=\"ExampleController\">\n\t <label>Enter number: <input ng-model='val'></label><br>\n\t Default formatting: <span id='number-default'>{{val | number}}</span><br>\n\t No fractions: <span>{{val | number:0}}</span><br>\n\t Negative number: <span>{{-val | number:4}}</span>\n\t </div>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should format numbers', function() {\n\t expect(element(by.id('number-default')).getText()).toBe('1,234.568');\n\t expect(element(by.binding('val | number:0')).getText()).toBe('1,235');\n\t expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679');\n\t });\n\t\n\t it('should update', function() {\n\t element(by.model('val')).clear();\n\t element(by.model('val')).sendKeys('3374.333');\n\t expect(element(by.id('number-default')).getText()).toBe('3,374.333');\n\t expect(element(by.binding('val | number:0')).getText()).toBe('3,374');\n\t expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');\n\t });\n\t </file>\n\t </example>\n\t */\n\tnumberFilter.$inject = ['$locale'];\n\tfunction numberFilter($locale) {\n\t var formats = $locale.NUMBER_FORMATS;\n\t return function(number, fractionSize) {\n\t\n\t // if null or undefined pass it through\n\t return (number == null)\n\t ? number\n\t : formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP,\n\t fractionSize);\n\t };\n\t}\n\t\n\t/**\n\t * Parse a number (as a string) into three components that can be used\n\t * for formatting the number.\n\t *\n\t * (Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/)\n\t *\n\t * @param {string} numStr The number to parse\n\t * @return {object} An object describing this number, containing the following keys:\n\t * - d : an array of digits containing leading zeros as necessary\n\t * - i : the number of the digits in `d` that are to the left of the decimal point\n\t * - e : the exponent for numbers that would need more than `MAX_DIGITS` digits in `d`\n\t *\n\t */\n\tfunction parse(numStr) {\n\t var exponent = 0, digits, numberOfIntegerDigits;\n\t var i, j, zeros;\n\t\n\t // Decimal point?\n\t if ((numberOfIntegerDigits = numStr.indexOf(DECIMAL_SEP)) > -1) {\n\t numStr = numStr.replace(DECIMAL_SEP, '');\n\t }\n\t\n\t // Exponential form?\n\t if ((i = numStr.search(/e/i)) > 0) {\n\t // Work out the exponent.\n\t if (numberOfIntegerDigits < 0) numberOfIntegerDigits = i;\n\t numberOfIntegerDigits += +numStr.slice(i + 1);\n\t numStr = numStr.substring(0, i);\n\t } else if (numberOfIntegerDigits < 0) {\n\t // There was no decimal point or exponent so it is an integer.\n\t numberOfIntegerDigits = numStr.length;\n\t }\n\t\n\t // Count the number of leading zeros.\n\t for (i = 0; numStr.charAt(i) == ZERO_CHAR; i++) {/* jshint noempty: false */}\n\t\n\t if (i == (zeros = numStr.length)) {\n\t // The digits are all zero.\n\t digits = [0];\n\t numberOfIntegerDigits = 1;\n\t } else {\n\t // Count the number of trailing zeros\n\t zeros--;\n\t while (numStr.charAt(zeros) == ZERO_CHAR) zeros--;\n\t\n\t // Trailing zeros are insignificant so ignore them\n\t numberOfIntegerDigits -= i;\n\t digits = [];\n\t // Convert string to array of digits without leading/trailing zeros.\n\t for (j = 0; i <= zeros; i++, j++) {\n\t digits[j] = +numStr.charAt(i);\n\t }\n\t }\n\t\n\t // If the number overflows the maximum allowed digits then use an exponent.\n\t if (numberOfIntegerDigits > MAX_DIGITS) {\n\t digits = digits.splice(0, MAX_DIGITS - 1);\n\t exponent = numberOfIntegerDigits - 1;\n\t numberOfIntegerDigits = 1;\n\t }\n\t\n\t return { d: digits, e: exponent, i: numberOfIntegerDigits };\n\t}\n\t\n\t/**\n\t * Round the parsed number to the specified number of decimal places\n\t * This function changed the parsedNumber in-place\n\t */\n\tfunction roundNumber(parsedNumber, fractionSize, minFrac, maxFrac) {\n\t var digits = parsedNumber.d;\n\t var fractionLen = digits.length - parsedNumber.i;\n\t\n\t // determine fractionSize if it is not specified; `+fractionSize` converts it to a number\n\t fractionSize = (isUndefined(fractionSize)) ? Math.min(Math.max(minFrac, fractionLen), maxFrac) : +fractionSize;\n\t\n\t // The index of the digit to where rounding is to occur\n\t var roundAt = fractionSize + parsedNumber.i;\n\t var digit = digits[roundAt];\n\t\n\t if (roundAt > 0) {\n\t digits.splice(roundAt);\n\t } else {\n\t // We rounded to zero so reset the parsedNumber\n\t parsedNumber.i = 1;\n\t digits.length = roundAt = fractionSize + 1;\n\t for (var i=0; i < roundAt; i++) digits[i] = 0;\n\t }\n\t\n\t if (digit >= 5) digits[roundAt - 1]++;\n\t\n\t // Pad out with zeros to get the required fraction length\n\t for (; fractionLen < fractionSize; fractionLen++) digits.push(0);\n\t\n\t\n\t // Do any carrying, e.g. a digit was rounded up to 10\n\t var carry = digits.reduceRight(function(carry, d, i, digits) {\n\t d = d + carry;\n\t digits[i] = d % 10;\n\t return Math.floor(d / 10);\n\t }, 0);\n\t if (carry) {\n\t digits.unshift(carry);\n\t parsedNumber.i++;\n\t }\n\t}\n\t\n\t/**\n\t * Format a number into a string\n\t * @param {number} number The number to format\n\t * @param {{\n\t * minFrac, // the minimum number of digits required in the fraction part of the number\n\t * maxFrac, // the maximum number of digits required in the fraction part of the number\n\t * gSize, // number of digits in each group of separated digits\n\t * lgSize, // number of digits in the last group of digits before the decimal separator\n\t * negPre, // the string to go in front of a negative number (e.g. `-` or `(`))\n\t * posPre, // the string to go in front of a positive number\n\t * negSuf, // the string to go after a negative number (e.g. `)`)\n\t * posSuf // the string to go after a positive number\n\t * }} pattern\n\t * @param {string} groupSep The string to separate groups of number (e.g. `,`)\n\t * @param {string} decimalSep The string to act as the decimal separator (e.g. `.`)\n\t * @param {[type]} fractionSize The size of the fractional part of the number\n\t * @return {string} The number formatted as a string\n\t */\n\tfunction formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {\n\t\n\t if (!(isString(number) || isNumber(number)) || isNaN(number)) return '';\n\t\n\t var isInfinity = !isFinite(number);\n\t var isZero = false;\n\t var numStr = Math.abs(number) + '',\n\t formattedText = '',\n\t parsedNumber;\n\t\n\t if (isInfinity) {\n\t formattedText = '\\u221e';\n\t } else {\n\t parsedNumber = parse(numStr);\n\t\n\t roundNumber(parsedNumber, fractionSize, pattern.minFrac, pattern.maxFrac);\n\t\n\t var digits = parsedNumber.d;\n\t var integerLen = parsedNumber.i;\n\t var exponent = parsedNumber.e;\n\t var decimals = [];\n\t isZero = digits.reduce(function(isZero, d) { return isZero && !d; }, true);\n\t\n\t // pad zeros for small numbers\n\t while (integerLen < 0) {\n\t digits.unshift(0);\n\t integerLen++;\n\t }\n\t\n\t // extract decimals digits\n\t if (integerLen > 0) {\n\t decimals = digits.splice(integerLen, digits.length);\n\t } else {\n\t decimals = digits;\n\t digits = [0];\n\t }\n\t\n\t // format the integer digits with grouping separators\n\t var groups = [];\n\t if (digits.length >= pattern.lgSize) {\n\t groups.unshift(digits.splice(-pattern.lgSize, digits.length).join(''));\n\t }\n\t while (digits.length > pattern.gSize) {\n\t groups.unshift(digits.splice(-pattern.gSize, digits.length).join(''));\n\t }\n\t if (digits.length) {\n\t groups.unshift(digits.join(''));\n\t }\n\t formattedText = groups.join(groupSep);\n\t\n\t // append the decimal digits\n\t if (decimals.length) {\n\t formattedText += decimalSep + decimals.join('');\n\t }\n\t\n\t if (exponent) {\n\t formattedText += 'e+' + exponent;\n\t }\n\t }\n\t if (number < 0 && !isZero) {\n\t return pattern.negPre + formattedText + pattern.negSuf;\n\t } else {\n\t return pattern.posPre + formattedText + pattern.posSuf;\n\t }\n\t}\n\t\n\tfunction padNumber(num, digits, trim) {\n\t var neg = '';\n\t if (num < 0) {\n\t neg = '-';\n\t num = -num;\n\t }\n\t num = '' + num;\n\t while (num.length < digits) num = ZERO_CHAR + num;\n\t if (trim) {\n\t num = num.substr(num.length - digits);\n\t }\n\t return neg + num;\n\t}\n\t\n\t\n\tfunction dateGetter(name, size, offset, trim) {\n\t offset = offset || 0;\n\t return function(date) {\n\t var value = date['get' + name]();\n\t if (offset > 0 || value > -offset) {\n\t value += offset;\n\t }\n\t if (value === 0 && offset == -12) value = 12;\n\t return padNumber(value, size, trim);\n\t };\n\t}\n\t\n\tfunction dateStrGetter(name, shortForm) {\n\t return function(date, formats) {\n\t var value = date['get' + name]();\n\t var get = uppercase(shortForm ? ('SHORT' + name) : name);\n\t\n\t return formats[get][value];\n\t };\n\t}\n\t\n\tfunction timeZoneGetter(date, formats, offset) {\n\t var zone = -1 * offset;\n\t var paddedZone = (zone >= 0) ? \"+\" : \"\";\n\t\n\t paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) +\n\t padNumber(Math.abs(zone % 60), 2);\n\t\n\t return paddedZone;\n\t}\n\t\n\tfunction getFirstThursdayOfYear(year) {\n\t // 0 = index of January\n\t var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay();\n\t // 4 = index of Thursday (+1 to account for 1st = 5)\n\t // 11 = index of *next* Thursday (+1 account for 1st = 12)\n\t return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst);\n\t}\n\t\n\tfunction getThursdayThisWeek(datetime) {\n\t return new Date(datetime.getFullYear(), datetime.getMonth(),\n\t // 4 = index of Thursday\n\t datetime.getDate() + (4 - datetime.getDay()));\n\t}\n\t\n\tfunction weekGetter(size) {\n\t return function(date) {\n\t var firstThurs = getFirstThursdayOfYear(date.getFullYear()),\n\t thisThurs = getThursdayThisWeek(date);\n\t\n\t var diff = +thisThurs - +firstThurs,\n\t result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week\n\t\n\t return padNumber(result, size);\n\t };\n\t}\n\t\n\tfunction ampmGetter(date, formats) {\n\t return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];\n\t}\n\t\n\tfunction eraGetter(date, formats) {\n\t return date.getFullYear() <= 0 ? formats.ERAS[0] : formats.ERAS[1];\n\t}\n\t\n\tfunction longEraGetter(date, formats) {\n\t return date.getFullYear() <= 0 ? formats.ERANAMES[0] : formats.ERANAMES[1];\n\t}\n\t\n\tvar DATE_FORMATS = {\n\t yyyy: dateGetter('FullYear', 4),\n\t yy: dateGetter('FullYear', 2, 0, true),\n\t y: dateGetter('FullYear', 1),\n\t MMMM: dateStrGetter('Month'),\n\t MMM: dateStrGetter('Month', true),\n\t MM: dateGetter('Month', 2, 1),\n\t M: dateGetter('Month', 1, 1),\n\t dd: dateGetter('Date', 2),\n\t d: dateGetter('Date', 1),\n\t HH: dateGetter('Hours', 2),\n\t H: dateGetter('Hours', 1),\n\t hh: dateGetter('Hours', 2, -12),\n\t h: dateGetter('Hours', 1, -12),\n\t mm: dateGetter('Minutes', 2),\n\t m: dateGetter('Minutes', 1),\n\t ss: dateGetter('Seconds', 2),\n\t s: dateGetter('Seconds', 1),\n\t // while ISO 8601 requires fractions to be prefixed with `.` or `,`\n\t // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions\n\t sss: dateGetter('Milliseconds', 3),\n\t EEEE: dateStrGetter('Day'),\n\t EEE: dateStrGetter('Day', true),\n\t a: ampmGetter,\n\t Z: timeZoneGetter,\n\t ww: weekGetter(2),\n\t w: weekGetter(1),\n\t G: eraGetter,\n\t GG: eraGetter,\n\t GGG: eraGetter,\n\t GGGG: longEraGetter\n\t};\n\t\n\tvar DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,\n\t NUMBER_STRING = /^\\-?\\d+$/;\n\t\n\t/**\n\t * @ngdoc filter\n\t * @name date\n\t * @kind function\n\t *\n\t * @description\n\t * Formats `date` to a string based on the requested `format`.\n\t *\n\t * `format` string can be composed of the following elements:\n\t *\n\t * * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)\n\t * * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n\t * * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)\n\t * * `'MMMM'`: Month in year (January-December)\n\t * * `'MMM'`: Month in year (Jan-Dec)\n\t * * `'MM'`: Month in year, padded (01-12)\n\t * * `'M'`: Month in year (1-12)\n\t * * `'dd'`: Day in month, padded (01-31)\n\t * * `'d'`: Day in month (1-31)\n\t * * `'EEEE'`: Day in Week,(Sunday-Saturday)\n\t * * `'EEE'`: Day in Week, (Sun-Sat)\n\t * * `'HH'`: Hour in day, padded (00-23)\n\t * * `'H'`: Hour in day (0-23)\n\t * * `'hh'`: Hour in AM/PM, padded (01-12)\n\t * * `'h'`: Hour in AM/PM, (1-12)\n\t * * `'mm'`: Minute in hour, padded (00-59)\n\t * * `'m'`: Minute in hour (0-59)\n\t * * `'ss'`: Second in minute, padded (00-59)\n\t * * `'s'`: Second in minute (0-59)\n\t * * `'sss'`: Millisecond in second, padded (000-999)\n\t * * `'a'`: AM/PM marker\n\t * * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)\n\t * * `'ww'`: Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year\n\t * * `'w'`: Week of year (0-53). Week 1 is the week with the first Thursday of the year\n\t * * `'G'`, `'GG'`, `'GGG'`: The abbreviated form of the era string (e.g. 'AD')\n\t * * `'GGGG'`: The long form of the era string (e.g. 'Anno Domini')\n\t *\n\t * `format` string can also be one of the following predefined\n\t * {@link guide/i18n localizable formats}:\n\t *\n\t * * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale\n\t * (e.g. Sep 3, 2010 12:05:08 PM)\n\t * * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US locale (e.g. 9/3/10 12:05 PM)\n\t * * `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` for en_US locale\n\t * (e.g. Friday, September 3, 2010)\n\t * * `'longDate'`: equivalent to `'MMMM d, y'` for en_US locale (e.g. September 3, 2010)\n\t * * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US locale (e.g. Sep 3, 2010)\n\t * * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10)\n\t * * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 PM)\n\t * * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 PM)\n\t *\n\t * `format` string can contain literal values. These need to be escaped by surrounding with single quotes (e.g.\n\t * `\"h 'in the morning'\"`). In order to output a single quote, escape it - i.e., two single quotes in a sequence\n\t * (e.g. `\"h 'o''clock'\"`).\n\t *\n\t * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or\n\t * number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its\n\t * shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is\n\t * specified in the string input, the time is considered to be in the local timezone.\n\t * @param {string=} format Formatting rules (see Description). If not specified,\n\t * `mediumDate` is used.\n\t * @param {string=} timezone Timezone to be used for formatting. It understands UTC/GMT and the\n\t * continental US time zone abbreviations, but for general use, use a time zone offset, for\n\t * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian)\n\t * If not specified, the timezone of the browser will be used.\n\t * @returns {string} Formatted string or the input if input is not recognized as date/millis.\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <span ng-non-bindable>{{1288323623006 | date:'medium'}}</span>:\n\t <span>{{1288323623006 | date:'medium'}}</span><br>\n\t <span ng-non-bindable>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span>:\n\t <span>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span><br>\n\t <span ng-non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>:\n\t <span>{{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}</span><br>\n\t <span ng-non-bindable>{{1288323623006 | date:\"MM/dd/yyyy 'at' h:mma\"}}</span>:\n\t <span>{{'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"}}</span><br>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should format date', function() {\n\t expect(element(by.binding(\"1288323623006 | date:'medium'\")).getText()).\n\t toMatch(/Oct 2\\d, 2010 \\d{1,2}:\\d{2}:\\d{2} (AM|PM)/);\n\t expect(element(by.binding(\"1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'\")).getText()).\n\t toMatch(/2010\\-10\\-2\\d \\d{2}:\\d{2}:\\d{2} (\\-|\\+)?\\d{4}/);\n\t expect(element(by.binding(\"'1288323623006' | date:'MM/dd/yyyy @ h:mma'\")).getText()).\n\t toMatch(/10\\/2\\d\\/2010 @ \\d{1,2}:\\d{2}(AM|PM)/);\n\t expect(element(by.binding(\"'1288323623006' | date:\\\"MM/dd/yyyy 'at' h:mma\\\"\")).getText()).\n\t toMatch(/10\\/2\\d\\/2010 at \\d{1,2}:\\d{2}(AM|PM)/);\n\t });\n\t </file>\n\t </example>\n\t */\n\tdateFilter.$inject = ['$locale'];\n\tfunction dateFilter($locale) {\n\t\n\t\n\t var R_ISO8601_STR = /^(\\d{4})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n\t // 1 2 3 4 5 6 7 8 9 10 11\n\t function jsonStringToDate(string) {\n\t var match;\n\t if (match = string.match(R_ISO8601_STR)) {\n\t var date = new Date(0),\n\t tzHour = 0,\n\t tzMin = 0,\n\t dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n\t timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\t\n\t if (match[9]) {\n\t tzHour = toInt(match[9] + match[10]);\n\t tzMin = toInt(match[9] + match[11]);\n\t }\n\t dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\n\t var h = toInt(match[4] || 0) - tzHour;\n\t var m = toInt(match[5] || 0) - tzMin;\n\t var s = toInt(match[6] || 0);\n\t var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n\t timeSetter.call(date, h, m, s, ms);\n\t return date;\n\t }\n\t return string;\n\t }\n\t\n\t\n\t return function(date, format, timezone) {\n\t var text = '',\n\t parts = [],\n\t fn, match;\n\t\n\t format = format || 'mediumDate';\n\t format = $locale.DATETIME_FORMATS[format] || format;\n\t if (isString(date)) {\n\t date = NUMBER_STRING.test(date) ? toInt(date) : jsonStringToDate(date);\n\t }\n\t\n\t if (isNumber(date)) {\n\t date = new Date(date);\n\t }\n\t\n\t if (!isDate(date) || !isFinite(date.getTime())) {\n\t return date;\n\t }\n\t\n\t while (format) {\n\t match = DATE_FORMATS_SPLIT.exec(format);\n\t if (match) {\n\t parts = concat(parts, match, 1);\n\t format = parts.pop();\n\t } else {\n\t parts.push(format);\n\t format = null;\n\t }\n\t }\n\t\n\t var dateTimezoneOffset = date.getTimezoneOffset();\n\t if (timezone) {\n\t dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n\t date = convertTimezoneToLocal(date, timezone, true);\n\t }\n\t forEach(parts, function(value) {\n\t fn = DATE_FORMATS[value];\n\t text += fn ? fn(date, $locale.DATETIME_FORMATS, dateTimezoneOffset)\n\t : value === \"''\" ? \"'\" : value.replace(/(^'|'$)/g, '').replace(/''/g, \"'\");\n\t });\n\t\n\t return text;\n\t };\n\t}\n\t\n\t\n\t/**\n\t * @ngdoc filter\n\t * @name json\n\t * @kind function\n\t *\n\t * @description\n\t * Allows you to convert a JavaScript object into JSON string.\n\t *\n\t * This filter is mostly useful for debugging. When using the double curly {{value}} notation\n\t * the binding is automatically converted to JSON.\n\t *\n\t * @param {*} object Any JavaScript object (including arrays and primitive types) to filter.\n\t * @param {number=} spacing The number of spaces to use per indentation, defaults to 2.\n\t * @returns {string} JSON string.\n\t *\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <pre id=\"default-spacing\">{{ {'name':'value'} | json }}</pre>\n\t <pre id=\"custom-spacing\">{{ {'name':'value'} | json:4 }}</pre>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should jsonify filtered objects', function() {\n\t expect(element(by.id('default-spacing')).getText()).toMatch(/\\{\\n \"name\": ?\"value\"\\n}/);\n\t expect(element(by.id('custom-spacing')).getText()).toMatch(/\\{\\n \"name\": ?\"value\"\\n}/);\n\t });\n\t </file>\n\t </example>\n\t *\n\t */\n\tfunction jsonFilter() {\n\t return function(object, spacing) {\n\t if (isUndefined(spacing)) {\n\t spacing = 2;\n\t }\n\t return toJson(object, spacing);\n\t };\n\t}\n\t\n\t\n\t/**\n\t * @ngdoc filter\n\t * @name lowercase\n\t * @kind function\n\t * @description\n\t * Converts string to lowercase.\n\t * @see angular.lowercase\n\t */\n\tvar lowercaseFilter = valueFn(lowercase);\n\t\n\t\n\t/**\n\t * @ngdoc filter\n\t * @name uppercase\n\t * @kind function\n\t * @description\n\t * Converts string to uppercase.\n\t * @see angular.uppercase\n\t */\n\tvar uppercaseFilter = valueFn(uppercase);\n\t\n\t/**\n\t * @ngdoc filter\n\t * @name limitTo\n\t * @kind function\n\t *\n\t * @description\n\t * Creates a new array or string containing only a specified number of elements. The elements\n\t * are taken from either the beginning or the end of the source array, string or number, as specified by\n\t * the value and sign (positive or negative) of `limit`. If a number is used as input, it is\n\t * converted to a string.\n\t *\n\t * @param {Array|string|number} input Source array, string or number to be limited.\n\t * @param {string|number} limit The length of the returned array or string. If the `limit` number\n\t * is positive, `limit` number of items from the beginning of the source array/string are copied.\n\t * If the number is negative, `limit` number of items from the end of the source array/string\n\t * are copied. The `limit` will be trimmed if it exceeds `array.length`. If `limit` is undefined,\n\t * the input will be returned unchanged.\n\t * @param {(string|number)=} begin Index at which to begin limitation. As a negative index, `begin`\n\t * indicates an offset from the end of `input`. Defaults to `0`.\n\t * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array\n\t * had less than `limit` elements.\n\t *\n\t * @example\n\t <example module=\"limitToExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('limitToExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.numbers = [1,2,3,4,5,6,7,8,9];\n\t $scope.letters = \"abcdefghi\";\n\t $scope.longNumber = 2345432342;\n\t $scope.numLimit = 3;\n\t $scope.letterLimit = 3;\n\t $scope.longNumberLimit = 3;\n\t }]);\n\t </script>\n\t <div ng-controller=\"ExampleController\">\n\t <label>\n\t Limit {{numbers}} to:\n\t <input type=\"number\" step=\"1\" ng-model=\"numLimit\">\n\t </label>\n\t <p>Output numbers: {{ numbers | limitTo:numLimit }}</p>\n\t <label>\n\t Limit {{letters}} to:\n\t <input type=\"number\" step=\"1\" ng-model=\"letterLimit\">\n\t </label>\n\t <p>Output letters: {{ letters | limitTo:letterLimit }}</p>\n\t <label>\n\t Limit {{longNumber}} to:\n\t <input type=\"number\" step=\"1\" ng-model=\"longNumberLimit\">\n\t </label>\n\t <p>Output long number: {{ longNumber | limitTo:longNumberLimit }}</p>\n\t </div>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var numLimitInput = element(by.model('numLimit'));\n\t var letterLimitInput = element(by.model('letterLimit'));\n\t var longNumberLimitInput = element(by.model('longNumberLimit'));\n\t var limitedNumbers = element(by.binding('numbers | limitTo:numLimit'));\n\t var limitedLetters = element(by.binding('letters | limitTo:letterLimit'));\n\t var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit'));\n\t\n\t it('should limit the number array to first three items', function() {\n\t expect(numLimitInput.getAttribute('value')).toBe('3');\n\t expect(letterLimitInput.getAttribute('value')).toBe('3');\n\t expect(longNumberLimitInput.getAttribute('value')).toBe('3');\n\t expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]');\n\t expect(limitedLetters.getText()).toEqual('Output letters: abc');\n\t expect(limitedLongNumber.getText()).toEqual('Output long number: 234');\n\t });\n\t\n\t // There is a bug in safari and protractor that doesn't like the minus key\n\t // it('should update the output when -3 is entered', function() {\n\t // numLimitInput.clear();\n\t // numLimitInput.sendKeys('-3');\n\t // letterLimitInput.clear();\n\t // letterLimitInput.sendKeys('-3');\n\t // longNumberLimitInput.clear();\n\t // longNumberLimitInput.sendKeys('-3');\n\t // expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]');\n\t // expect(limitedLetters.getText()).toEqual('Output letters: ghi');\n\t // expect(limitedLongNumber.getText()).toEqual('Output long number: 342');\n\t // });\n\t\n\t it('should not exceed the maximum size of input array', function() {\n\t numLimitInput.clear();\n\t numLimitInput.sendKeys('100');\n\t letterLimitInput.clear();\n\t letterLimitInput.sendKeys('100');\n\t longNumberLimitInput.clear();\n\t longNumberLimitInput.sendKeys('100');\n\t expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]');\n\t expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi');\n\t expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342');\n\t });\n\t </file>\n\t </example>\n\t*/\n\tfunction limitToFilter() {\n\t return function(input, limit, begin) {\n\t if (Math.abs(Number(limit)) === Infinity) {\n\t limit = Number(limit);\n\t } else {\n\t limit = toInt(limit);\n\t }\n\t if (isNaN(limit)) return input;\n\t\n\t if (isNumber(input)) input = input.toString();\n\t if (!isArray(input) && !isString(input)) return input;\n\t\n\t begin = (!begin || isNaN(begin)) ? 0 : toInt(begin);\n\t begin = (begin < 0) ? Math.max(0, input.length + begin) : begin;\n\t\n\t if (limit >= 0) {\n\t return input.slice(begin, begin + limit);\n\t } else {\n\t if (begin === 0) {\n\t return input.slice(limit, input.length);\n\t } else {\n\t return input.slice(Math.max(0, begin + limit), begin);\n\t }\n\t }\n\t };\n\t}\n\t\n\t/**\n\t * @ngdoc filter\n\t * @name orderBy\n\t * @kind function\n\t *\n\t * @description\n\t * Orders a specified `array` by the `expression` predicate. It is ordered alphabetically\n\t * for strings and numerically for numbers. Note: if you notice numbers are not being sorted\n\t * as expected, make sure they are actually being saved as numbers and not strings.\n\t *\n\t * @param {Array} array The array to sort.\n\t * @param {function(*)|string|Array.<(function(*)|string)>=} expression A predicate to be\n\t * used by the comparator to determine the order of elements.\n\t *\n\t * Can be one of:\n\t *\n\t * - `function`: Getter function. The result of this function will be sorted using the\n\t * `<`, `===`, `>` operator.\n\t * - `string`: An Angular expression. The result of this expression is used to compare elements\n\t * (for example `name` to sort by a property called `name` or `name.substr(0, 3)` to sort by\n\t * 3 first characters of a property called `name`). The result of a constant expression\n\t * is interpreted as a property name to be used in comparisons (for example `\"special name\"`\n\t * to sort object by the value of their `special name` property). An expression can be\n\t * optionally prefixed with `+` or `-` to control ascending or descending sort order\n\t * (for example, `+name` or `-name`). If no property is provided, (e.g. `'+'`) then the array\n\t * element itself is used to compare where sorting.\n\t * - `Array`: An array of function or string predicates. The first predicate in the array\n\t * is used for sorting, but when two items are equivalent, the next predicate is used.\n\t *\n\t * If the predicate is missing or empty then it defaults to `'+'`.\n\t *\n\t * @param {boolean=} reverse Reverse the order of the array.\n\t * @returns {Array} Sorted copy of the source array.\n\t *\n\t *\n\t * @example\n\t * The example below demonstrates a simple ngRepeat, where the data is sorted\n\t * by age in descending order (predicate is set to `'-age'`).\n\t * `reverse` is not set, which means it defaults to `false`.\n\t <example module=\"orderByExample\">\n\t <file name=\"index.html\">\n\t <div ng-controller=\"ExampleController\">\n\t <table class=\"friend\">\n\t <tr>\n\t <th>Name</th>\n\t <th>Phone Number</th>\n\t <th>Age</th>\n\t </tr>\n\t <tr ng-repeat=\"friend in friends | orderBy:'-age'\">\n\t <td>{{friend.name}}</td>\n\t <td>{{friend.phone}}</td>\n\t <td>{{friend.age}}</td>\n\t </tr>\n\t </table>\n\t </div>\n\t </file>\n\t <file name=\"script.js\">\n\t angular.module('orderByExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.friends =\n\t [{name:'John', phone:'555-1212', age:10},\n\t {name:'Mary', phone:'555-9876', age:19},\n\t {name:'Mike', phone:'555-4321', age:21},\n\t {name:'Adam', phone:'555-5678', age:35},\n\t {name:'Julie', phone:'555-8765', age:29}];\n\t }]);\n\t </file>\n\t </example>\n\t *\n\t * The predicate and reverse parameters can be controlled dynamically through scope properties,\n\t * as shown in the next example.\n\t * @example\n\t <example module=\"orderByExample\">\n\t <file name=\"index.html\">\n\t <div ng-controller=\"ExampleController\">\n\t <pre>Sorting predicate = {{predicate}}; reverse = {{reverse}}</pre>\n\t <hr/>\n\t <button ng-click=\"predicate=''\">Set to unsorted</button>\n\t <table class=\"friend\">\n\t <tr>\n\t <th>\n\t <button ng-click=\"order('name')\">Name</button>\n\t <span class=\"sortorder\" ng-show=\"predicate === 'name'\" ng-class=\"{reverse:reverse}\"></span>\n\t </th>\n\t <th>\n\t <button ng-click=\"order('phone')\">Phone Number</button>\n\t <span class=\"sortorder\" ng-show=\"predicate === 'phone'\" ng-class=\"{reverse:reverse}\"></span>\n\t </th>\n\t <th>\n\t <button ng-click=\"order('age')\">Age</button>\n\t <span class=\"sortorder\" ng-show=\"predicate === 'age'\" ng-class=\"{reverse:reverse}\"></span>\n\t </th>\n\t </tr>\n\t <tr ng-repeat=\"friend in friends | orderBy:predicate:reverse\">\n\t <td>{{friend.name}}</td>\n\t <td>{{friend.phone}}</td>\n\t <td>{{friend.age}}</td>\n\t </tr>\n\t </table>\n\t </div>\n\t </file>\n\t <file name=\"script.js\">\n\t angular.module('orderByExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.friends =\n\t [{name:'John', phone:'555-1212', age:10},\n\t {name:'Mary', phone:'555-9876', age:19},\n\t {name:'Mike', phone:'555-4321', age:21},\n\t {name:'Adam', phone:'555-5678', age:35},\n\t {name:'Julie', phone:'555-8765', age:29}];\n\t $scope.predicate = 'age';\n\t $scope.reverse = true;\n\t $scope.order = function(predicate) {\n\t $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;\n\t $scope.predicate = predicate;\n\t };\n\t }]);\n\t </file>\n\t <file name=\"style.css\">\n\t .sortorder:after {\n\t content: '\\25b2';\n\t }\n\t .sortorder.reverse:after {\n\t content: '\\25bc';\n\t }\n\t </file>\n\t </example>\n\t *\n\t * It's also possible to call the orderBy filter manually, by injecting `$filter`, retrieving the\n\t * filter routine with `$filter('orderBy')`, and calling the returned filter routine with the\n\t * desired parameters.\n\t *\n\t * Example:\n\t *\n\t * @example\n\t <example module=\"orderByExample\">\n\t <file name=\"index.html\">\n\t <div ng-controller=\"ExampleController\">\n\t <pre>Sorting predicate = {{predicate}}; reverse = {{reverse}}</pre>\n\t <table class=\"friend\">\n\t <tr>\n\t <th>\n\t <button ng-click=\"order('name')\">Name</button>\n\t <span class=\"sortorder\" ng-show=\"predicate === 'name'\" ng-class=\"{reverse:reverse}\"></span>\n\t </th>\n\t <th>\n\t <button ng-click=\"order('phone')\">Phone Number</button>\n\t <span class=\"sortorder\" ng-show=\"predicate === 'phone'\" ng-class=\"{reverse:reverse}\"></span>\n\t </th>\n\t <th>\n\t <button ng-click=\"order('age')\">Age</button>\n\t <span class=\"sortorder\" ng-show=\"predicate === 'age'\" ng-class=\"{reverse:reverse}\"></span>\n\t </th>\n\t </tr>\n\t <tr ng-repeat=\"friend in friends\">\n\t <td>{{friend.name}}</td>\n\t <td>{{friend.phone}}</td>\n\t <td>{{friend.age}}</td>\n\t </tr>\n\t </table>\n\t </div>\n\t </file>\n\t\n\t <file name=\"script.js\">\n\t angular.module('orderByExample', [])\n\t .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) {\n\t var orderBy = $filter('orderBy');\n\t $scope.friends = [\n\t { name: 'John', phone: '555-1212', age: 10 },\n\t { name: 'Mary', phone: '555-9876', age: 19 },\n\t { name: 'Mike', phone: '555-4321', age: 21 },\n\t { name: 'Adam', phone: '555-5678', age: 35 },\n\t { name: 'Julie', phone: '555-8765', age: 29 }\n\t ];\n\t $scope.order = function(predicate) {\n\t $scope.predicate = predicate;\n\t $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;\n\t $scope.friends = orderBy($scope.friends, predicate, $scope.reverse);\n\t };\n\t $scope.order('age', true);\n\t }]);\n\t </file>\n\t\n\t <file name=\"style.css\">\n\t .sortorder:after {\n\t content: '\\25b2';\n\t }\n\t .sortorder.reverse:after {\n\t content: '\\25bc';\n\t }\n\t </file>\n\t</example>\n\t */\n\torderByFilter.$inject = ['$parse'];\n\tfunction orderByFilter($parse) {\n\t return function(array, sortPredicate, reverseOrder) {\n\t\n\t if (!(isArrayLike(array))) return array;\n\t\n\t if (!isArray(sortPredicate)) { sortPredicate = [sortPredicate]; }\n\t if (sortPredicate.length === 0) { sortPredicate = ['+']; }\n\t\n\t var predicates = processPredicates(sortPredicate, reverseOrder);\n\t // Add a predicate at the end that evaluates to the element index. This makes the\n\t // sort stable as it works as a tie-breaker when all the input predicates cannot\n\t // distinguish between two elements.\n\t predicates.push({ get: function() { return {}; }, descending: reverseOrder ? -1 : 1});\n\t\n\t // The next three lines are a version of a Swartzian Transform idiom from Perl\n\t // (sometimes called the Decorate-Sort-Undecorate idiom)\n\t // See https://en.wikipedia.org/wiki/Schwartzian_transform\n\t var compareValues = Array.prototype.map.call(array, getComparisonObject);\n\t compareValues.sort(doComparison);\n\t array = compareValues.map(function(item) { return item.value; });\n\t\n\t return array;\n\t\n\t function getComparisonObject(value, index) {\n\t return {\n\t value: value,\n\t predicateValues: predicates.map(function(predicate) {\n\t return getPredicateValue(predicate.get(value), index);\n\t })\n\t };\n\t }\n\t\n\t function doComparison(v1, v2) {\n\t var result = 0;\n\t for (var index=0, length = predicates.length; index < length; ++index) {\n\t result = compare(v1.predicateValues[index], v2.predicateValues[index]) * predicates[index].descending;\n\t if (result) break;\n\t }\n\t return result;\n\t }\n\t };\n\t\n\t function processPredicates(sortPredicate, reverseOrder) {\n\t reverseOrder = reverseOrder ? -1 : 1;\n\t return sortPredicate.map(function(predicate) {\n\t var descending = 1, get = identity;\n\t\n\t if (isFunction(predicate)) {\n\t get = predicate;\n\t } else if (isString(predicate)) {\n\t if ((predicate.charAt(0) == '+' || predicate.charAt(0) == '-')) {\n\t descending = predicate.charAt(0) == '-' ? -1 : 1;\n\t predicate = predicate.substring(1);\n\t }\n\t if (predicate !== '') {\n\t get = $parse(predicate);\n\t if (get.constant) {\n\t var key = get();\n\t get = function(value) { return value[key]; };\n\t }\n\t }\n\t }\n\t return { get: get, descending: descending * reverseOrder };\n\t });\n\t }\n\t\n\t function isPrimitive(value) {\n\t switch (typeof value) {\n\t case 'number': /* falls through */\n\t case 'boolean': /* falls through */\n\t case 'string':\n\t return true;\n\t default:\n\t return false;\n\t }\n\t }\n\t\n\t function objectValue(value, index) {\n\t // If `valueOf` is a valid function use that\n\t if (typeof value.valueOf === 'function') {\n\t value = value.valueOf();\n\t if (isPrimitive(value)) return value;\n\t }\n\t // If `toString` is a valid function and not the one from `Object.prototype` use that\n\t if (hasCustomToString(value)) {\n\t value = value.toString();\n\t if (isPrimitive(value)) return value;\n\t }\n\t // We have a basic object so we use the position of the object in the collection\n\t return index;\n\t }\n\t\n\t function getPredicateValue(value, index) {\n\t var type = typeof value;\n\t if (value === null) {\n\t type = 'string';\n\t value = 'null';\n\t } else if (type === 'string') {\n\t value = value.toLowerCase();\n\t } else if (type === 'object') {\n\t value = objectValue(value, index);\n\t }\n\t return { value: value, type: type };\n\t }\n\t\n\t function compare(v1, v2) {\n\t var result = 0;\n\t if (v1.type === v2.type) {\n\t if (v1.value !== v2.value) {\n\t result = v1.value < v2.value ? -1 : 1;\n\t }\n\t } else {\n\t result = v1.type < v2.type ? -1 : 1;\n\t }\n\t return result;\n\t }\n\t}\n\t\n\tfunction ngDirective(directive) {\n\t if (isFunction(directive)) {\n\t directive = {\n\t link: directive\n\t };\n\t }\n\t directive.restrict = directive.restrict || 'AC';\n\t return valueFn(directive);\n\t}\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name a\n\t * @restrict E\n\t *\n\t * @description\n\t * Modifies the default behavior of the html A tag so that the default action is prevented when\n\t * the href attribute is empty.\n\t *\n\t * This change permits the easy creation of action links with the `ngClick` directive\n\t * without changing the location or causing page reloads, e.g.:\n\t * `<a href=\"\" ng-click=\"list.addItem()\">Add Item</a>`\n\t */\n\tvar htmlAnchorDirective = valueFn({\n\t restrict: 'E',\n\t compile: function(element, attr) {\n\t if (!attr.href && !attr.xlinkHref) {\n\t return function(scope, element) {\n\t // If the linked element is not an anchor tag anymore, do nothing\n\t if (element[0].nodeName.toLowerCase() !== 'a') return;\n\t\n\t // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n\t var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?\n\t 'xlink:href' : 'href';\n\t element.on('click', function(event) {\n\t // if we have no href url, then don't navigate anywhere.\n\t if (!element.attr(href)) {\n\t event.preventDefault();\n\t }\n\t });\n\t };\n\t }\n\t }\n\t});\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngHref\n\t * @restrict A\n\t * @priority 99\n\t *\n\t * @description\n\t * Using Angular markup like `{{hash}}` in an href attribute will\n\t * make the link go to the wrong URL if the user clicks it before\n\t * Angular has a chance to replace the `{{hash}}` markup with its\n\t * value. Until Angular replaces the markup the link will be broken\n\t * and will most likely return a 404 error. The `ngHref` directive\n\t * solves this problem.\n\t *\n\t * The wrong way to write it:\n\t * ```html\n\t * <a href=\"http://www.gravatar.com/avatar/{{hash}}\">link1</a>\n\t * ```\n\t *\n\t * The correct way to write it:\n\t * ```html\n\t * <a ng-href=\"http://www.gravatar.com/avatar/{{hash}}\">link1</a>\n\t * ```\n\t *\n\t * @element A\n\t * @param {template} ngHref any string which can contain `{{}}` markup.\n\t *\n\t * @example\n\t * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes\n\t * in links and their different behaviors:\n\t <example>\n\t <file name=\"index.html\">\n\t <input ng-model=\"value\" /><br />\n\t <a id=\"link-1\" href ng-click=\"value = 1\">link 1</a> (link, don't reload)<br />\n\t <a id=\"link-2\" href=\"\" ng-click=\"value = 2\">link 2</a> (link, don't reload)<br />\n\t <a id=\"link-3\" ng-href=\"/{{'123'}}\">link 3</a> (link, reload!)<br />\n\t <a id=\"link-4\" href=\"\" name=\"xx\" ng-click=\"value = 4\">anchor</a> (link, don't reload)<br />\n\t <a id=\"link-5\" name=\"xxx\" ng-click=\"value = 5\">anchor</a> (no link)<br />\n\t <a id=\"link-6\" ng-href=\"{{value}}\">link</a> (link, change location)\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should execute ng-click but not reload when href without value', function() {\n\t element(by.id('link-1')).click();\n\t expect(element(by.model('value')).getAttribute('value')).toEqual('1');\n\t expect(element(by.id('link-1')).getAttribute('href')).toBe('');\n\t });\n\t\n\t it('should execute ng-click but not reload when href empty string', function() {\n\t element(by.id('link-2')).click();\n\t expect(element(by.model('value')).getAttribute('value')).toEqual('2');\n\t expect(element(by.id('link-2')).getAttribute('href')).toBe('');\n\t });\n\t\n\t it('should execute ng-click and change url when ng-href specified', function() {\n\t expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\\/123$/);\n\t\n\t element(by.id('link-3')).click();\n\t\n\t // At this point, we navigate away from an Angular page, so we need\n\t // to use browser.driver to get the base webdriver.\n\t\n\t browser.wait(function() {\n\t return browser.driver.getCurrentUrl().then(function(url) {\n\t return url.match(/\\/123$/);\n\t });\n\t }, 5000, 'page should navigate to /123');\n\t });\n\t\n\t it('should execute ng-click but not reload when href empty string and name specified', function() {\n\t element(by.id('link-4')).click();\n\t expect(element(by.model('value')).getAttribute('value')).toEqual('4');\n\t expect(element(by.id('link-4')).getAttribute('href')).toBe('');\n\t });\n\t\n\t it('should execute ng-click but not reload when no href but name specified', function() {\n\t element(by.id('link-5')).click();\n\t expect(element(by.model('value')).getAttribute('value')).toEqual('5');\n\t expect(element(by.id('link-5')).getAttribute('href')).toBe(null);\n\t });\n\t\n\t it('should only change url when only ng-href', function() {\n\t element(by.model('value')).clear();\n\t element(by.model('value')).sendKeys('6');\n\t expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\\/6$/);\n\t\n\t element(by.id('link-6')).click();\n\t\n\t // At this point, we navigate away from an Angular page, so we need\n\t // to use browser.driver to get the base webdriver.\n\t browser.wait(function() {\n\t return browser.driver.getCurrentUrl().then(function(url) {\n\t return url.match(/\\/6$/);\n\t });\n\t }, 5000, 'page should navigate to /6');\n\t });\n\t </file>\n\t </example>\n\t */\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngSrc\n\t * @restrict A\n\t * @priority 99\n\t *\n\t * @description\n\t * Using Angular markup like `{{hash}}` in a `src` attribute doesn't\n\t * work right: The browser will fetch from the URL with the literal\n\t * text `{{hash}}` until Angular replaces the expression inside\n\t * `{{hash}}`. The `ngSrc` directive solves this problem.\n\t *\n\t * The buggy way to write it:\n\t * ```html\n\t * <img src=\"http://www.gravatar.com/avatar/{{hash}}\" alt=\"Description\"/>\n\t * ```\n\t *\n\t * The correct way to write it:\n\t * ```html\n\t * <img ng-src=\"http://www.gravatar.com/avatar/{{hash}}\" alt=\"Description\" />\n\t * ```\n\t *\n\t * @element IMG\n\t * @param {template} ngSrc any string which can contain `{{}}` markup.\n\t */\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngSrcset\n\t * @restrict A\n\t * @priority 99\n\t *\n\t * @description\n\t * Using Angular markup like `{{hash}}` in a `srcset` attribute doesn't\n\t * work right: The browser will fetch from the URL with the literal\n\t * text `{{hash}}` until Angular replaces the expression inside\n\t * `{{hash}}`. The `ngSrcset` directive solves this problem.\n\t *\n\t * The buggy way to write it:\n\t * ```html\n\t * <img srcset=\"http://www.gravatar.com/avatar/{{hash}} 2x\" alt=\"Description\"/>\n\t * ```\n\t *\n\t * The correct way to write it:\n\t * ```html\n\t * <img ng-srcset=\"http://www.gravatar.com/avatar/{{hash}} 2x\" alt=\"Description\" />\n\t * ```\n\t *\n\t * @element IMG\n\t * @param {template} ngSrcset any string which can contain `{{}}` markup.\n\t */\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngDisabled\n\t * @restrict A\n\t * @priority 100\n\t *\n\t * @description\n\t *\n\t * This directive sets the `disabled` attribute on the element if the\n\t * {@link guide/expression expression} inside `ngDisabled` evaluates to truthy.\n\t *\n\t * A special directive is necessary because we cannot use interpolation inside the `disabled`\n\t * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <label>Click me to toggle: <input type=\"checkbox\" ng-model=\"checked\"></label><br/>\n\t <button ng-model=\"button\" ng-disabled=\"checked\">Button</button>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should toggle button', function() {\n\t expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy();\n\t element(by.model('checked')).click();\n\t expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy();\n\t });\n\t </file>\n\t </example>\n\t *\n\t * @element INPUT\n\t * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,\n\t * then the `disabled` attribute will be set on the element\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngChecked\n\t * @restrict A\n\t * @priority 100\n\t *\n\t * @description\n\t * Sets the `checked` attribute on the element, if the expression inside `ngChecked` is truthy.\n\t *\n\t * Note that this directive should not be used together with {@link ngModel `ngModel`},\n\t * as this can lead to unexpected behavior.\n\t *\n\t * A special directive is necessary because we cannot use interpolation inside the `checked`\n\t * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <label>Check me to check both: <input type=\"checkbox\" ng-model=\"master\"></label><br/>\n\t <input id=\"checkSlave\" type=\"checkbox\" ng-checked=\"master\" aria-label=\"Slave input\">\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should check both checkBoxes', function() {\n\t expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy();\n\t element(by.model('master')).click();\n\t expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy();\n\t });\n\t </file>\n\t </example>\n\t *\n\t * @element INPUT\n\t * @param {expression} ngChecked If the {@link guide/expression expression} is truthy,\n\t * then the `checked` attribute will be set on the element\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngReadonly\n\t * @restrict A\n\t * @priority 100\n\t *\n\t * @description\n\t *\n\t * Sets the `readOnly` attribute on the element, if the expression inside `ngReadonly` is truthy.\n\t *\n\t * A special directive is necessary because we cannot use interpolation inside the `readOnly`\n\t * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <label>Check me to make text readonly: <input type=\"checkbox\" ng-model=\"checked\"></label><br/>\n\t <input type=\"text\" ng-readonly=\"checked\" value=\"I'm Angular\" aria-label=\"Readonly field\" />\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should toggle readonly attr', function() {\n\t expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeFalsy();\n\t element(by.model('checked')).click();\n\t expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeTruthy();\n\t });\n\t </file>\n\t </example>\n\t *\n\t * @element INPUT\n\t * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,\n\t * then special attribute \"readonly\" will be set on the element\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngSelected\n\t * @restrict A\n\t * @priority 100\n\t *\n\t * @description\n\t *\n\t * Sets the `selected` attribute on the element, if the expression inside `ngSelected` is truthy.\n\t *\n\t * A special directive is necessary because we cannot use interpolation inside the `selected`\n\t * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <label>Check me to select: <input type=\"checkbox\" ng-model=\"selected\"></label><br/>\n\t <select aria-label=\"ngSelected demo\">\n\t <option>Hello!</option>\n\t <option id=\"greet\" ng-selected=\"selected\">Greetings!</option>\n\t </select>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should select Greetings!', function() {\n\t expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy();\n\t element(by.model('selected')).click();\n\t expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy();\n\t });\n\t </file>\n\t </example>\n\t *\n\t * @element OPTION\n\t * @param {expression} ngSelected If the {@link guide/expression expression} is truthy,\n\t * then special attribute \"selected\" will be set on the element\n\t */\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngOpen\n\t * @restrict A\n\t * @priority 100\n\t *\n\t * @description\n\t *\n\t * Sets the `open` attribute on the element, if the expression inside `ngOpen` is truthy.\n\t *\n\t * A special directive is necessary because we cannot use interpolation inside the `open`\n\t * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <label>Check me check multiple: <input type=\"checkbox\" ng-model=\"open\"></label><br/>\n\t <details id=\"details\" ng-open=\"open\">\n\t <summary>Show/Hide me</summary>\n\t </details>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should toggle open', function() {\n\t expect(element(by.id('details')).getAttribute('open')).toBeFalsy();\n\t element(by.model('open')).click();\n\t expect(element(by.id('details')).getAttribute('open')).toBeTruthy();\n\t });\n\t </file>\n\t </example>\n\t *\n\t * @element DETAILS\n\t * @param {expression} ngOpen If the {@link guide/expression expression} is truthy,\n\t * then special attribute \"open\" will be set on the element\n\t */\n\t\n\tvar ngAttributeAliasDirectives = {};\n\t\n\t// boolean attrs are evaluated\n\tforEach(BOOLEAN_ATTR, function(propName, attrName) {\n\t // binding to multiple is not supported\n\t if (propName == \"multiple\") return;\n\t\n\t function defaultLinkFn(scope, element, attr) {\n\t scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) {\n\t attr.$set(attrName, !!value);\n\t });\n\t }\n\t\n\t var normalized = directiveNormalize('ng-' + attrName);\n\t var linkFn = defaultLinkFn;\n\t\n\t if (propName === 'checked') {\n\t linkFn = function(scope, element, attr) {\n\t // ensuring ngChecked doesn't interfere with ngModel when both are set on the same input\n\t if (attr.ngModel !== attr[normalized]) {\n\t defaultLinkFn(scope, element, attr);\n\t }\n\t };\n\t }\n\t\n\t ngAttributeAliasDirectives[normalized] = function() {\n\t return {\n\t restrict: 'A',\n\t priority: 100,\n\t link: linkFn\n\t };\n\t };\n\t});\n\t\n\t// aliased input attrs are evaluated\n\tforEach(ALIASED_ATTR, function(htmlAttr, ngAttr) {\n\t ngAttributeAliasDirectives[ngAttr] = function() {\n\t return {\n\t priority: 100,\n\t link: function(scope, element, attr) {\n\t //special case ngPattern when a literal regular expression value\n\t //is used as the expression (this way we don't have to watch anything).\n\t if (ngAttr === \"ngPattern\" && attr.ngPattern.charAt(0) == \"/\") {\n\t var match = attr.ngPattern.match(REGEX_STRING_REGEXP);\n\t if (match) {\n\t attr.$set(\"ngPattern\", new RegExp(match[1], match[2]));\n\t return;\n\t }\n\t }\n\t\n\t scope.$watch(attr[ngAttr], function ngAttrAliasWatchAction(value) {\n\t attr.$set(ngAttr, value);\n\t });\n\t }\n\t };\n\t };\n\t});\n\t\n\t// ng-src, ng-srcset, ng-href are interpolated\n\tforEach(['src', 'srcset', 'href'], function(attrName) {\n\t var normalized = directiveNormalize('ng-' + attrName);\n\t ngAttributeAliasDirectives[normalized] = function() {\n\t return {\n\t priority: 99, // it needs to run after the attributes are interpolated\n\t link: function(scope, element, attr) {\n\t var propName = attrName,\n\t name = attrName;\n\t\n\t if (attrName === 'href' &&\n\t toString.call(element.prop('href')) === '[object SVGAnimatedString]') {\n\t name = 'xlinkHref';\n\t attr.$attr[name] = 'xlink:href';\n\t propName = null;\n\t }\n\t\n\t attr.$observe(normalized, function(value) {\n\t if (!value) {\n\t if (attrName === 'href') {\n\t attr.$set(name, null);\n\t }\n\t return;\n\t }\n\t\n\t attr.$set(name, value);\n\t\n\t // on IE, if \"ng:src\" directive declaration is used and \"src\" attribute doesn't exist\n\t // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need\n\t // to set the property as well to achieve the desired effect.\n\t // we use attr[attrName] value since $set can sanitize the url.\n\t if (msie && propName) element.prop(propName, attr[name]);\n\t });\n\t }\n\t };\n\t };\n\t});\n\t\n\t/* global -nullFormCtrl, -SUBMITTED_CLASS, addSetValidityMethod: true\n\t */\n\tvar nullFormCtrl = {\n\t $addControl: noop,\n\t $$renameControl: nullFormRenameControl,\n\t $removeControl: noop,\n\t $setValidity: noop,\n\t $setDirty: noop,\n\t $setPristine: noop,\n\t $setSubmitted: noop\n\t},\n\tSUBMITTED_CLASS = 'ng-submitted';\n\t\n\tfunction nullFormRenameControl(control, name) {\n\t control.$name = name;\n\t}\n\t\n\t/**\n\t * @ngdoc type\n\t * @name form.FormController\n\t *\n\t * @property {boolean} $pristine True if user has not interacted with the form yet.\n\t * @property {boolean} $dirty True if user has already interacted with the form.\n\t * @property {boolean} $valid True if all of the containing forms and controls are valid.\n\t * @property {boolean} $invalid True if at least one containing control or form is invalid.\n\t * @property {boolean} $pending True if at least one containing control or form is pending.\n\t * @property {boolean} $submitted True if user has submitted the form even if its invalid.\n\t *\n\t * @property {Object} $error Is an object hash, containing references to controls or\n\t * forms with failing validators, where:\n\t *\n\t * - keys are validation tokens (error names),\n\t * - values are arrays of controls or forms that have a failing validator for given error name.\n\t *\n\t * Built-in validation tokens:\n\t *\n\t * - `email`\n\t * - `max`\n\t * - `maxlength`\n\t * - `min`\n\t * - `minlength`\n\t * - `number`\n\t * - `pattern`\n\t * - `required`\n\t * - `url`\n\t * - `date`\n\t * - `datetimelocal`\n\t * - `time`\n\t * - `week`\n\t * - `month`\n\t *\n\t * @description\n\t * `FormController` keeps track of all its controls and nested forms as well as the state of them,\n\t * such as being valid/invalid or dirty/pristine.\n\t *\n\t * Each {@link ng.directive:form form} directive creates an instance\n\t * of `FormController`.\n\t *\n\t */\n\t//asks for $scope to fool the BC controller module\n\tFormController.$inject = ['$element', '$attrs', '$scope', '$animate', '$interpolate'];\n\tfunction FormController(element, attrs, $scope, $animate, $interpolate) {\n\t var form = this,\n\t controls = [];\n\t\n\t // init state\n\t form.$error = {};\n\t form.$$success = {};\n\t form.$pending = undefined;\n\t form.$name = $interpolate(attrs.name || attrs.ngForm || '')($scope);\n\t form.$dirty = false;\n\t form.$pristine = true;\n\t form.$valid = true;\n\t form.$invalid = false;\n\t form.$submitted = false;\n\t form.$$parentForm = nullFormCtrl;\n\t\n\t /**\n\t * @ngdoc method\n\t * @name form.FormController#$rollbackViewValue\n\t *\n\t * @description\n\t * Rollback all form controls pending updates to the `$modelValue`.\n\t *\n\t * Updates may be pending by a debounced event or because the input is waiting for a some future\n\t * event defined in `ng-model-options`. This method is typically needed by the reset button of\n\t * a form that uses `ng-model-options` to pend updates.\n\t */\n\t form.$rollbackViewValue = function() {\n\t forEach(controls, function(control) {\n\t control.$rollbackViewValue();\n\t });\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name form.FormController#$commitViewValue\n\t *\n\t * @description\n\t * Commit all form controls pending updates to the `$modelValue`.\n\t *\n\t * Updates may be pending by a debounced event or because the input is waiting for a some future\n\t * event defined in `ng-model-options`. This method is rarely needed as `NgModelController`\n\t * usually handles calling this in response to input events.\n\t */\n\t form.$commitViewValue = function() {\n\t forEach(controls, function(control) {\n\t control.$commitViewValue();\n\t });\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name form.FormController#$addControl\n\t * @param {object} control control object, either a {@link form.FormController} or an\n\t * {@link ngModel.NgModelController}\n\t *\n\t * @description\n\t * Register a control with the form. Input elements using ngModelController do this automatically\n\t * when they are linked.\n\t *\n\t * Note that the current state of the control will not be reflected on the new parent form. This\n\t * is not an issue with normal use, as freshly compiled and linked controls are in a `$pristine`\n\t * state.\n\t *\n\t * However, if the method is used programmatically, for example by adding dynamically created controls,\n\t * or controls that have been previously removed without destroying their corresponding DOM element,\n\t * it's the developers responsiblity to make sure the current state propagates to the parent form.\n\t *\n\t * For example, if an input control is added that is already `$dirty` and has `$error` properties,\n\t * calling `$setDirty()` and `$validate()` afterwards will propagate the state to the parent form.\n\t */\n\t form.$addControl = function(control) {\n\t // Breaking change - before, inputs whose name was \"hasOwnProperty\" were quietly ignored\n\t // and not added to the scope. Now we throw an error.\n\t assertNotHasOwnProperty(control.$name, 'input');\n\t controls.push(control);\n\t\n\t if (control.$name) {\n\t form[control.$name] = control;\n\t }\n\t\n\t control.$$parentForm = form;\n\t };\n\t\n\t // Private API: rename a form control\n\t form.$$renameControl = function(control, newName) {\n\t var oldName = control.$name;\n\t\n\t if (form[oldName] === control) {\n\t delete form[oldName];\n\t }\n\t form[newName] = control;\n\t control.$name = newName;\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name form.FormController#$removeControl\n\t * @param {object} control control object, either a {@link form.FormController} or an\n\t * {@link ngModel.NgModelController}\n\t *\n\t * @description\n\t * Deregister a control from the form.\n\t *\n\t * Input elements using ngModelController do this automatically when they are destroyed.\n\t *\n\t * Note that only the removed control's validation state (`$errors`etc.) will be removed from the\n\t * form. `$dirty`, `$submitted` states will not be changed, because the expected behavior can be\n\t * different from case to case. For example, removing the only `$dirty` control from a form may or\n\t * may not mean that the form is still `$dirty`.\n\t */\n\t form.$removeControl = function(control) {\n\t if (control.$name && form[control.$name] === control) {\n\t delete form[control.$name];\n\t }\n\t forEach(form.$pending, function(value, name) {\n\t form.$setValidity(name, null, control);\n\t });\n\t forEach(form.$error, function(value, name) {\n\t form.$setValidity(name, null, control);\n\t });\n\t forEach(form.$$success, function(value, name) {\n\t form.$setValidity(name, null, control);\n\t });\n\t\n\t arrayRemove(controls, control);\n\t control.$$parentForm = nullFormCtrl;\n\t };\n\t\n\t\n\t /**\n\t * @ngdoc method\n\t * @name form.FormController#$setValidity\n\t *\n\t * @description\n\t * Sets the validity of a form control.\n\t *\n\t * This method will also propagate to parent forms.\n\t */\n\t addSetValidityMethod({\n\t ctrl: this,\n\t $element: element,\n\t set: function(object, property, controller) {\n\t var list = object[property];\n\t if (!list) {\n\t object[property] = [controller];\n\t } else {\n\t var index = list.indexOf(controller);\n\t if (index === -1) {\n\t list.push(controller);\n\t }\n\t }\n\t },\n\t unset: function(object, property, controller) {\n\t var list = object[property];\n\t if (!list) {\n\t return;\n\t }\n\t arrayRemove(list, controller);\n\t if (list.length === 0) {\n\t delete object[property];\n\t }\n\t },\n\t $animate: $animate\n\t });\n\t\n\t /**\n\t * @ngdoc method\n\t * @name form.FormController#$setDirty\n\t *\n\t * @description\n\t * Sets the form to a dirty state.\n\t *\n\t * This method can be called to add the 'ng-dirty' class and set the form to a dirty\n\t * state (ng-dirty class). This method will also propagate to parent forms.\n\t */\n\t form.$setDirty = function() {\n\t $animate.removeClass(element, PRISTINE_CLASS);\n\t $animate.addClass(element, DIRTY_CLASS);\n\t form.$dirty = true;\n\t form.$pristine = false;\n\t form.$$parentForm.$setDirty();\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name form.FormController#$setPristine\n\t *\n\t * @description\n\t * Sets the form to its pristine state.\n\t *\n\t * This method can be called to remove the 'ng-dirty' class and set the form to its pristine\n\t * state (ng-pristine class). This method will also propagate to all the controls contained\n\t * in this form.\n\t *\n\t * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after\n\t * saving or resetting it.\n\t */\n\t form.$setPristine = function() {\n\t $animate.setClass(element, PRISTINE_CLASS, DIRTY_CLASS + ' ' + SUBMITTED_CLASS);\n\t form.$dirty = false;\n\t form.$pristine = true;\n\t form.$submitted = false;\n\t forEach(controls, function(control) {\n\t control.$setPristine();\n\t });\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name form.FormController#$setUntouched\n\t *\n\t * @description\n\t * Sets the form to its untouched state.\n\t *\n\t * This method can be called to remove the 'ng-touched' class and set the form controls to their\n\t * untouched state (ng-untouched class).\n\t *\n\t * Setting a form controls back to their untouched state is often useful when setting the form\n\t * back to its pristine state.\n\t */\n\t form.$setUntouched = function() {\n\t forEach(controls, function(control) {\n\t control.$setUntouched();\n\t });\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name form.FormController#$setSubmitted\n\t *\n\t * @description\n\t * Sets the form to its submitted state.\n\t */\n\t form.$setSubmitted = function() {\n\t $animate.addClass(element, SUBMITTED_CLASS);\n\t form.$submitted = true;\n\t form.$$parentForm.$setSubmitted();\n\t };\n\t}\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngForm\n\t * @restrict EAC\n\t *\n\t * @description\n\t * Nestable alias of {@link ng.directive:form `form`} directive. HTML\n\t * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a\n\t * sub-group of controls needs to be determined.\n\t *\n\t * Note: the purpose of `ngForm` is to group controls,\n\t * but not to be a replacement for the `<form>` tag with all of its capabilities\n\t * (e.g. posting to the server, ...).\n\t *\n\t * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into\n\t * related scope, under this name.\n\t *\n\t */\n\t\n\t /**\n\t * @ngdoc directive\n\t * @name form\n\t * @restrict E\n\t *\n\t * @description\n\t * Directive that instantiates\n\t * {@link form.FormController FormController}.\n\t *\n\t * If the `name` attribute is specified, the form controller is published onto the current scope under\n\t * this name.\n\t *\n\t * # Alias: {@link ng.directive:ngForm `ngForm`}\n\t *\n\t * In Angular, forms can be nested. This means that the outer form is valid when all of the child\n\t * forms are valid as well. However, browsers do not allow nesting of `<form>` elements, so\n\t * Angular provides the {@link ng.directive:ngForm `ngForm`} directive, which behaves identically to\n\t * `form` but can be nested. Nested forms can be useful, for example, if the validity of a sub-group\n\t * of controls needs to be determined.\n\t *\n\t * # CSS classes\n\t * - `ng-valid` is set if the form is valid.\n\t * - `ng-invalid` is set if the form is invalid.\n\t * - `ng-pending` is set if the form is pending.\n\t * - `ng-pristine` is set if the form is pristine.\n\t * - `ng-dirty` is set if the form is dirty.\n\t * - `ng-submitted` is set if the form was submitted.\n\t *\n\t * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n\t *\n\t *\n\t * # Submitting a form and preventing the default action\n\t *\n\t * Since the role of forms in client-side Angular applications is different than in classical\n\t * roundtrip apps, it is desirable for the browser not to translate the form submission into a full\n\t * page reload that sends the data to the server. Instead some javascript logic should be triggered\n\t * to handle the form submission in an application-specific way.\n\t *\n\t * For this reason, Angular prevents the default action (form submission to the server) unless the\n\t * `<form>` element has an `action` attribute specified.\n\t *\n\t * You can use one of the following two ways to specify what javascript method should be called when\n\t * a form is submitted:\n\t *\n\t * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element\n\t * - {@link ng.directive:ngClick ngClick} directive on the first\n\t * button or input field of type submit (input[type=submit])\n\t *\n\t * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit}\n\t * or {@link ng.directive:ngClick ngClick} directives.\n\t * This is because of the following form submission rules in the HTML specification:\n\t *\n\t * - If a form has only one input field then hitting enter in this field triggers form submit\n\t * (`ngSubmit`)\n\t * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter\n\t * doesn't trigger submit\n\t * - if a form has one or more input fields and one or more buttons or input[type=submit] then\n\t * hitting enter in any of the input fields will trigger the click handler on the *first* button or\n\t * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)\n\t *\n\t * Any pending `ngModelOptions` changes will take place immediately when an enclosing form is\n\t * submitted. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`\n\t * to have access to the updated model.\n\t *\n\t * ## Animation Hooks\n\t *\n\t * Animations in ngForm are triggered when any of the associated CSS classes are added and removed.\n\t * These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any\n\t * other validations that are performed within the form. Animations in ngForm are similar to how\n\t * they work in ngClass and animations can be hooked into using CSS transitions, keyframes as well\n\t * as JS animations.\n\t *\n\t * The following example shows a simple way to utilize CSS transitions to style a form element\n\t * that has been rendered as invalid after it has been validated:\n\t *\n\t * <pre>\n\t * //be sure to include ngAnimate as a module to hook into more\n\t * //advanced animations\n\t * .my-form {\n\t * transition:0.5s linear all;\n\t * background: white;\n\t * }\n\t * .my-form.ng-invalid {\n\t * background: red;\n\t * color:white;\n\t * }\n\t * </pre>\n\t *\n\t * @example\n\t <example deps=\"angular-animate.js\" animations=\"true\" fixBase=\"true\" module=\"formExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('formExample', [])\n\t .controller('FormController', ['$scope', function($scope) {\n\t $scope.userType = 'guest';\n\t }]);\n\t </script>\n\t <style>\n\t .my-form {\n\t transition:all linear 0.5s;\n\t background: transparent;\n\t }\n\t .my-form.ng-invalid {\n\t background: red;\n\t }\n\t </style>\n\t <form name=\"myForm\" ng-controller=\"FormController\" class=\"my-form\">\n\t userType: <input name=\"input\" ng-model=\"userType\" required>\n\t <span class=\"error\" ng-show=\"myForm.input.$error.required\">Required!</span><br>\n\t <code>userType = {{userType}}</code><br>\n\t <code>myForm.input.$valid = {{myForm.input.$valid}}</code><br>\n\t <code>myForm.input.$error = {{myForm.input.$error}}</code><br>\n\t <code>myForm.$valid = {{myForm.$valid}}</code><br>\n\t <code>myForm.$error.required = {{!!myForm.$error.required}}</code><br>\n\t </form>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should initialize to model', function() {\n\t var userType = element(by.binding('userType'));\n\t var valid = element(by.binding('myForm.input.$valid'));\n\t\n\t expect(userType.getText()).toContain('guest');\n\t expect(valid.getText()).toContain('true');\n\t });\n\t\n\t it('should be invalid if empty', function() {\n\t var userType = element(by.binding('userType'));\n\t var valid = element(by.binding('myForm.input.$valid'));\n\t var userInput = element(by.model('userType'));\n\t\n\t userInput.clear();\n\t userInput.sendKeys('');\n\t\n\t expect(userType.getText()).toEqual('userType =');\n\t expect(valid.getText()).toContain('false');\n\t });\n\t </file>\n\t </example>\n\t *\n\t * @param {string=} name Name of the form. If specified, the form controller will be published into\n\t * related scope, under this name.\n\t */\n\tvar formDirectiveFactory = function(isNgForm) {\n\t return ['$timeout', '$parse', function($timeout, $parse) {\n\t var formDirective = {\n\t name: 'form',\n\t restrict: isNgForm ? 'EAC' : 'E',\n\t require: ['form', '^^?form'], //first is the form's own ctrl, second is an optional parent form\n\t controller: FormController,\n\t compile: function ngFormCompile(formElement, attr) {\n\t // Setup initial state of the control\n\t formElement.addClass(PRISTINE_CLASS).addClass(VALID_CLASS);\n\t\n\t var nameAttr = attr.name ? 'name' : (isNgForm && attr.ngForm ? 'ngForm' : false);\n\t\n\t return {\n\t pre: function ngFormPreLink(scope, formElement, attr, ctrls) {\n\t var controller = ctrls[0];\n\t\n\t // if `action` attr is not present on the form, prevent the default action (submission)\n\t if (!('action' in attr)) {\n\t // we can't use jq events because if a form is destroyed during submission the default\n\t // action is not prevented. see #1238\n\t //\n\t // IE 9 is not affected because it doesn't fire a submit event and try to do a full\n\t // page reload if the form was destroyed by submission of the form via a click handler\n\t // on a button in the form. Looks like an IE9 specific bug.\n\t var handleFormSubmission = function(event) {\n\t scope.$apply(function() {\n\t controller.$commitViewValue();\n\t controller.$setSubmitted();\n\t });\n\t\n\t event.preventDefault();\n\t };\n\t\n\t addEventListenerFn(formElement[0], 'submit', handleFormSubmission);\n\t\n\t // unregister the preventDefault listener so that we don't not leak memory but in a\n\t // way that will achieve the prevention of the default action.\n\t formElement.on('$destroy', function() {\n\t $timeout(function() {\n\t removeEventListenerFn(formElement[0], 'submit', handleFormSubmission);\n\t }, 0, false);\n\t });\n\t }\n\t\n\t var parentFormCtrl = ctrls[1] || controller.$$parentForm;\n\t parentFormCtrl.$addControl(controller);\n\t\n\t var setter = nameAttr ? getSetter(controller.$name) : noop;\n\t\n\t if (nameAttr) {\n\t setter(scope, controller);\n\t attr.$observe(nameAttr, function(newValue) {\n\t if (controller.$name === newValue) return;\n\t setter(scope, undefined);\n\t controller.$$parentForm.$$renameControl(controller, newValue);\n\t setter = getSetter(controller.$name);\n\t setter(scope, controller);\n\t });\n\t }\n\t formElement.on('$destroy', function() {\n\t controller.$$parentForm.$removeControl(controller);\n\t setter(scope, undefined);\n\t extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards\n\t });\n\t }\n\t };\n\t }\n\t };\n\t\n\t return formDirective;\n\t\n\t function getSetter(expression) {\n\t if (expression === '') {\n\t //create an assignable expression, so forms with an empty name can be renamed later\n\t return $parse('this[\"\"]').assign;\n\t }\n\t return $parse(expression).assign || noop;\n\t }\n\t }];\n\t};\n\t\n\tvar formDirective = formDirectiveFactory();\n\tvar ngFormDirective = formDirectiveFactory(true);\n\t\n\t/* global VALID_CLASS: false,\n\t INVALID_CLASS: false,\n\t PRISTINE_CLASS: false,\n\t DIRTY_CLASS: false,\n\t UNTOUCHED_CLASS: false,\n\t TOUCHED_CLASS: false,\n\t ngModelMinErr: false,\n\t*/\n\t\n\t// Regex code is obtained from SO: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231\n\tvar ISO_DATE_REGEXP = /\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z)/;\n\t// See valid URLs in RFC3987 (http://tools.ietf.org/html/rfc3987)\n\t// Note: We are being more lenient, because browsers are too.\n\t// 1. Scheme\n\t// 2. Slashes\n\t// 3. Username\n\t// 4. Password\n\t// 5. Hostname\n\t// 6. Port\n\t// 7. Path\n\t// 8. Query\n\t// 9. Fragment\n\t// 1111111111111111 222 333333 44444 555555555555555555555555 666 77777777 8888888 999\n\tvar URL_REGEXP = /^[a-z][a-z\\d.+-]*:\\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\\s:/?#]+|\\[[a-f\\d:]+\\])(?::\\d+)?(?:\\/[^?#]*)?(?:\\?[^#]*)?(?:#.*)?$/i;\n\tvar EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;\n\tvar NUMBER_REGEXP = /^\\s*(\\-|\\+)?(\\d+|(\\d*(\\.\\d*)))([eE][+-]?\\d+)?\\s*$/;\n\tvar DATE_REGEXP = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\n\tvar DATETIMELOCAL_REGEXP = /^(\\d{4})-(\\d\\d)-(\\d\\d)T(\\d\\d):(\\d\\d)(?::(\\d\\d)(\\.\\d{1,3})?)?$/;\n\tvar WEEK_REGEXP = /^(\\d{4})-W(\\d\\d)$/;\n\tvar MONTH_REGEXP = /^(\\d{4})-(\\d\\d)$/;\n\tvar TIME_REGEXP = /^(\\d\\d):(\\d\\d)(?::(\\d\\d)(\\.\\d{1,3})?)?$/;\n\t\n\tvar PARTIAL_VALIDATION_EVENTS = 'keydown wheel mousedown';\n\tvar PARTIAL_VALIDATION_TYPES = createMap();\n\tforEach('date,datetime-local,month,time,week'.split(','), function(type) {\n\t PARTIAL_VALIDATION_TYPES[type] = true;\n\t});\n\t\n\tvar inputType = {\n\t\n\t /**\n\t * @ngdoc input\n\t * @name input[text]\n\t *\n\t * @description\n\t * Standard HTML text input with angular data binding, inherited by most of the `input` elements.\n\t *\n\t *\n\t * @param {string} ngModel Assignable angular expression to data-bind to.\n\t * @param {string=} name Property name of the form under which the control is published.\n\t * @param {string=} required Adds `required` validation error key if the value is not entered.\n\t * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n\t * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n\t * `required` when you want to data-bind to the `required` attribute.\n\t * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n\t * minlength.\n\t * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n\t * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n\t * any length.\n\t * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n\t * that contains the regular expression body that will be converted to a regular expression\n\t * as in the ngPattern directive.\n\t * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match\n\t * a RegExp found by evaluating the Angular expression given in the attribute value.\n\t * If the expression evaluates to a RegExp object, then this is used directly.\n\t * If the expression evaluates to a string, then it will be converted to a RegExp\n\t * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n\t * `new RegExp('^abc$')`.<br />\n\t * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n\t * start at the index of the last search's match, thus not taking the whole input value into\n\t * account.\n\t * @param {string=} ngChange Angular expression to be executed when input changes due to user\n\t * interaction with the input element.\n\t * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n\t * This parameter is ignored for input[type=password] controls, which will never trim the\n\t * input.\n\t *\n\t * @example\n\t <example name=\"text-input-directive\" module=\"textInputExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('textInputExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.example = {\n\t text: 'guest',\n\t word: /^\\s*\\w*\\s*$/\n\t };\n\t }]);\n\t </script>\n\t <form name=\"myForm\" ng-controller=\"ExampleController\">\n\t <label>Single word:\n\t <input type=\"text\" name=\"input\" ng-model=\"example.text\"\n\t ng-pattern=\"example.word\" required ng-trim=\"false\">\n\t </label>\n\t <div role=\"alert\">\n\t <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n\t Required!</span>\n\t <span class=\"error\" ng-show=\"myForm.input.$error.pattern\">\n\t Single word only!</span>\n\t </div>\n\t <tt>text = {{example.text}}</tt><br/>\n\t <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n\t <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n\t <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n\t <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n\t </form>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var text = element(by.binding('example.text'));\n\t var valid = element(by.binding('myForm.input.$valid'));\n\t var input = element(by.model('example.text'));\n\t\n\t it('should initialize to model', function() {\n\t expect(text.getText()).toContain('guest');\n\t expect(valid.getText()).toContain('true');\n\t });\n\t\n\t it('should be invalid if empty', function() {\n\t input.clear();\n\t input.sendKeys('');\n\t\n\t expect(text.getText()).toEqual('text =');\n\t expect(valid.getText()).toContain('false');\n\t });\n\t\n\t it('should be invalid if multi word', function() {\n\t input.clear();\n\t input.sendKeys('hello world');\n\t\n\t expect(valid.getText()).toContain('false');\n\t });\n\t </file>\n\t </example>\n\t */\n\t 'text': textInputType,\n\t\n\t /**\n\t * @ngdoc input\n\t * @name input[date]\n\t *\n\t * @description\n\t * Input with date validation and transformation. In browsers that do not yet support\n\t * the HTML5 date input, a text element will be used. In that case, text must be entered in a valid ISO-8601\n\t * date format (yyyy-MM-dd), for example: `2009-01-06`. Since many\n\t * modern browsers do not yet support this input type, it is important to provide cues to users on the\n\t * expected input format via a placeholder or label.\n\t *\n\t * The model must always be a Date object, otherwise Angular will throw an error.\n\t * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n\t *\n\t * The timezone to be used to read/write the `Date` instance in the model can be defined using\n\t * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n\t *\n\t * @param {string} ngModel Assignable angular expression to data-bind to.\n\t * @param {string=} name Property name of the form under which the control is published.\n\t * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n\t * valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute\n\t * (e.g. `min=\"{{minDate | date:'yyyy-MM-dd'}}\"`). Note that `min` will also add native HTML5\n\t * constraint validation.\n\t * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be\n\t * a valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute\n\t * (e.g. `max=\"{{maxDate | date:'yyyy-MM-dd'}}\"`). Note that `max` will also add native HTML5\n\t * constraint validation.\n\t * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO date string\n\t * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n\t * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO date string\n\t * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n\t * @param {string=} required Sets `required` validation error key if the value is not entered.\n\t * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n\t * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n\t * `required` when you want to data-bind to the `required` attribute.\n\t * @param {string=} ngChange Angular expression to be executed when input changes due to user\n\t * interaction with the input element.\n\t *\n\t * @example\n\t <example name=\"date-input-directive\" module=\"dateInputExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('dateInputExample', [])\n\t .controller('DateController', ['$scope', function($scope) {\n\t $scope.example = {\n\t value: new Date(2013, 9, 22)\n\t };\n\t }]);\n\t </script>\n\t <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n\t <label for=\"exampleInput\">Pick a date in 2013:</label>\n\t <input type=\"date\" id=\"exampleInput\" name=\"input\" ng-model=\"example.value\"\n\t placeholder=\"yyyy-MM-dd\" min=\"2013-01-01\" max=\"2013-12-31\" required />\n\t <div role=\"alert\">\n\t <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n\t Required!</span>\n\t <span class=\"error\" ng-show=\"myForm.input.$error.date\">\n\t Not a valid date!</span>\n\t </div>\n\t <tt>value = {{example.value | date: \"yyyy-MM-dd\"}}</tt><br/>\n\t <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n\t <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n\t <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n\t <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n\t </form>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var value = element(by.binding('example.value | date: \"yyyy-MM-dd\"'));\n\t var valid = element(by.binding('myForm.input.$valid'));\n\t var input = element(by.model('example.value'));\n\t\n\t // currently protractor/webdriver does not support\n\t // sending keys to all known HTML5 input controls\n\t // for various browsers (see https://github.com/angular/protractor/issues/562).\n\t function setInput(val) {\n\t // set the value of the element and force validation.\n\t var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n\t \"ipt.value = '\" + val + \"';\" +\n\t \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n\t browser.executeScript(scr);\n\t }\n\t\n\t it('should initialize to model', function() {\n\t expect(value.getText()).toContain('2013-10-22');\n\t expect(valid.getText()).toContain('myForm.input.$valid = true');\n\t });\n\t\n\t it('should be invalid if empty', function() {\n\t setInput('');\n\t expect(value.getText()).toEqual('value =');\n\t expect(valid.getText()).toContain('myForm.input.$valid = false');\n\t });\n\t\n\t it('should be invalid if over max', function() {\n\t setInput('2015-01-01');\n\t expect(value.getText()).toContain('');\n\t expect(valid.getText()).toContain('myForm.input.$valid = false');\n\t });\n\t </file>\n\t </example>\n\t */\n\t 'date': createDateInputType('date', DATE_REGEXP,\n\t createDateParser(DATE_REGEXP, ['yyyy', 'MM', 'dd']),\n\t 'yyyy-MM-dd'),\n\t\n\t /**\n\t * @ngdoc input\n\t * @name input[datetime-local]\n\t *\n\t * @description\n\t * Input with datetime validation and transformation. In browsers that do not yet support\n\t * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n\t * local datetime format (yyyy-MM-ddTHH:mm:ss), for example: `2010-12-28T14:57:00`.\n\t *\n\t * The model must always be a Date object, otherwise Angular will throw an error.\n\t * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n\t *\n\t * The timezone to be used to read/write the `Date` instance in the model can be defined using\n\t * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n\t *\n\t * @param {string} ngModel Assignable angular expression to data-bind to.\n\t * @param {string=} name Property name of the form under which the control is published.\n\t * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n\t * This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation\n\t * inside this attribute (e.g. `min=\"{{minDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}\"`).\n\t * Note that `min` will also add native HTML5 constraint validation.\n\t * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n\t * This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation\n\t * inside this attribute (e.g. `max=\"{{maxDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}\"`).\n\t * Note that `max` will also add native HTML5 constraint validation.\n\t * @param {(date|string)=} ngMin Sets the `min` validation error key to the Date / ISO datetime string\n\t * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n\t * @param {(date|string)=} ngMax Sets the `max` validation error key to the Date / ISO datetime string\n\t * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n\t * @param {string=} required Sets `required` validation error key if the value is not entered.\n\t * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n\t * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n\t * `required` when you want to data-bind to the `required` attribute.\n\t * @param {string=} ngChange Angular expression to be executed when input changes due to user\n\t * interaction with the input element.\n\t *\n\t * @example\n\t <example name=\"datetimelocal-input-directive\" module=\"dateExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('dateExample', [])\n\t .controller('DateController', ['$scope', function($scope) {\n\t $scope.example = {\n\t value: new Date(2010, 11, 28, 14, 57)\n\t };\n\t }]);\n\t </script>\n\t <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n\t <label for=\"exampleInput\">Pick a date between in 2013:</label>\n\t <input type=\"datetime-local\" id=\"exampleInput\" name=\"input\" ng-model=\"example.value\"\n\t placeholder=\"yyyy-MM-ddTHH:mm:ss\" min=\"2001-01-01T00:00:00\" max=\"2013-12-31T00:00:00\" required />\n\t <div role=\"alert\">\n\t <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n\t Required!</span>\n\t <span class=\"error\" ng-show=\"myForm.input.$error.datetimelocal\">\n\t Not a valid date!</span>\n\t </div>\n\t <tt>value = {{example.value | date: \"yyyy-MM-ddTHH:mm:ss\"}}</tt><br/>\n\t <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n\t <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n\t <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n\t <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n\t </form>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var value = element(by.binding('example.value | date: \"yyyy-MM-ddTHH:mm:ss\"'));\n\t var valid = element(by.binding('myForm.input.$valid'));\n\t var input = element(by.model('example.value'));\n\t\n\t // currently protractor/webdriver does not support\n\t // sending keys to all known HTML5 input controls\n\t // for various browsers (https://github.com/angular/protractor/issues/562).\n\t function setInput(val) {\n\t // set the value of the element and force validation.\n\t var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n\t \"ipt.value = '\" + val + \"';\" +\n\t \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n\t browser.executeScript(scr);\n\t }\n\t\n\t it('should initialize to model', function() {\n\t expect(value.getText()).toContain('2010-12-28T14:57:00');\n\t expect(valid.getText()).toContain('myForm.input.$valid = true');\n\t });\n\t\n\t it('should be invalid if empty', function() {\n\t setInput('');\n\t expect(value.getText()).toEqual('value =');\n\t expect(valid.getText()).toContain('myForm.input.$valid = false');\n\t });\n\t\n\t it('should be invalid if over max', function() {\n\t setInput('2015-01-01T23:59:00');\n\t expect(value.getText()).toContain('');\n\t expect(valid.getText()).toContain('myForm.input.$valid = false');\n\t });\n\t </file>\n\t </example>\n\t */\n\t 'datetime-local': createDateInputType('datetimelocal', DATETIMELOCAL_REGEXP,\n\t createDateParser(DATETIMELOCAL_REGEXP, ['yyyy', 'MM', 'dd', 'HH', 'mm', 'ss', 'sss']),\n\t 'yyyy-MM-ddTHH:mm:ss.sss'),\n\t\n\t /**\n\t * @ngdoc input\n\t * @name input[time]\n\t *\n\t * @description\n\t * Input with time validation and transformation. In browsers that do not yet support\n\t * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n\t * local time format (HH:mm:ss), for example: `14:57:00`. Model must be a Date object. This binding will always output a\n\t * Date object to the model of January 1, 1970, or local date `new Date(1970, 0, 1, HH, mm, ss)`.\n\t *\n\t * The model must always be a Date object, otherwise Angular will throw an error.\n\t * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n\t *\n\t * The timezone to be used to read/write the `Date` instance in the model can be defined using\n\t * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n\t *\n\t * @param {string} ngModel Assignable angular expression to data-bind to.\n\t * @param {string=} name Property name of the form under which the control is published.\n\t * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n\t * This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this\n\t * attribute (e.g. `min=\"{{minTime | date:'HH:mm:ss'}}\"`). Note that `min` will also add\n\t * native HTML5 constraint validation.\n\t * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n\t * This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this\n\t * attribute (e.g. `max=\"{{maxTime | date:'HH:mm:ss'}}\"`). Note that `max` will also add\n\t * native HTML5 constraint validation.\n\t * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO time string the\n\t * `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n\t * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO time string the\n\t * `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n\t * @param {string=} required Sets `required` validation error key if the value is not entered.\n\t * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n\t * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n\t * `required` when you want to data-bind to the `required` attribute.\n\t * @param {string=} ngChange Angular expression to be executed when input changes due to user\n\t * interaction with the input element.\n\t *\n\t * @example\n\t <example name=\"time-input-directive\" module=\"timeExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('timeExample', [])\n\t .controller('DateController', ['$scope', function($scope) {\n\t $scope.example = {\n\t value: new Date(1970, 0, 1, 14, 57, 0)\n\t };\n\t }]);\n\t </script>\n\t <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n\t <label for=\"exampleInput\">Pick a time between 8am and 5pm:</label>\n\t <input type=\"time\" id=\"exampleInput\" name=\"input\" ng-model=\"example.value\"\n\t placeholder=\"HH:mm:ss\" min=\"08:00:00\" max=\"17:00:00\" required />\n\t <div role=\"alert\">\n\t <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n\t Required!</span>\n\t <span class=\"error\" ng-show=\"myForm.input.$error.time\">\n\t Not a valid date!</span>\n\t </div>\n\t <tt>value = {{example.value | date: \"HH:mm:ss\"}}</tt><br/>\n\t <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n\t <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n\t <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n\t <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n\t </form>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var value = element(by.binding('example.value | date: \"HH:mm:ss\"'));\n\t var valid = element(by.binding('myForm.input.$valid'));\n\t var input = element(by.model('example.value'));\n\t\n\t // currently protractor/webdriver does not support\n\t // sending keys to all known HTML5 input controls\n\t // for various browsers (https://github.com/angular/protractor/issues/562).\n\t function setInput(val) {\n\t // set the value of the element and force validation.\n\t var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n\t \"ipt.value = '\" + val + \"';\" +\n\t \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n\t browser.executeScript(scr);\n\t }\n\t\n\t it('should initialize to model', function() {\n\t expect(value.getText()).toContain('14:57:00');\n\t expect(valid.getText()).toContain('myForm.input.$valid = true');\n\t });\n\t\n\t it('should be invalid if empty', function() {\n\t setInput('');\n\t expect(value.getText()).toEqual('value =');\n\t expect(valid.getText()).toContain('myForm.input.$valid = false');\n\t });\n\t\n\t it('should be invalid if over max', function() {\n\t setInput('23:59:00');\n\t expect(value.getText()).toContain('');\n\t expect(valid.getText()).toContain('myForm.input.$valid = false');\n\t });\n\t </file>\n\t </example>\n\t */\n\t 'time': createDateInputType('time', TIME_REGEXP,\n\t createDateParser(TIME_REGEXP, ['HH', 'mm', 'ss', 'sss']),\n\t 'HH:mm:ss.sss'),\n\t\n\t /**\n\t * @ngdoc input\n\t * @name input[week]\n\t *\n\t * @description\n\t * Input with week-of-the-year validation and transformation to Date. In browsers that do not yet support\n\t * the HTML5 week input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n\t * week format (yyyy-W##), for example: `2013-W02`.\n\t *\n\t * The model must always be a Date object, otherwise Angular will throw an error.\n\t * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n\t *\n\t * The timezone to be used to read/write the `Date` instance in the model can be defined using\n\t * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n\t *\n\t * @param {string} ngModel Assignable angular expression to data-bind to.\n\t * @param {string=} name Property name of the form under which the control is published.\n\t * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n\t * This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this\n\t * attribute (e.g. `min=\"{{minWeek | date:'yyyy-Www'}}\"`). Note that `min` will also add\n\t * native HTML5 constraint validation.\n\t * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n\t * This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this\n\t * attribute (e.g. `max=\"{{maxWeek | date:'yyyy-Www'}}\"`). Note that `max` will also add\n\t * native HTML5 constraint validation.\n\t * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string\n\t * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n\t * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string\n\t * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n\t * @param {string=} required Sets `required` validation error key if the value is not entered.\n\t * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n\t * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n\t * `required` when you want to data-bind to the `required` attribute.\n\t * @param {string=} ngChange Angular expression to be executed when input changes due to user\n\t * interaction with the input element.\n\t *\n\t * @example\n\t <example name=\"week-input-directive\" module=\"weekExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('weekExample', [])\n\t .controller('DateController', ['$scope', function($scope) {\n\t $scope.example = {\n\t value: new Date(2013, 0, 3)\n\t };\n\t }]);\n\t </script>\n\t <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n\t <label>Pick a date between in 2013:\n\t <input id=\"exampleInput\" type=\"week\" name=\"input\" ng-model=\"example.value\"\n\t placeholder=\"YYYY-W##\" min=\"2012-W32\"\n\t max=\"2013-W52\" required />\n\t </label>\n\t <div role=\"alert\">\n\t <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n\t Required!</span>\n\t <span class=\"error\" ng-show=\"myForm.input.$error.week\">\n\t Not a valid date!</span>\n\t </div>\n\t <tt>value = {{example.value | date: \"yyyy-Www\"}}</tt><br/>\n\t <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n\t <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n\t <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n\t <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n\t </form>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var value = element(by.binding('example.value | date: \"yyyy-Www\"'));\n\t var valid = element(by.binding('myForm.input.$valid'));\n\t var input = element(by.model('example.value'));\n\t\n\t // currently protractor/webdriver does not support\n\t // sending keys to all known HTML5 input controls\n\t // for various browsers (https://github.com/angular/protractor/issues/562).\n\t function setInput(val) {\n\t // set the value of the element and force validation.\n\t var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n\t \"ipt.value = '\" + val + \"';\" +\n\t \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n\t browser.executeScript(scr);\n\t }\n\t\n\t it('should initialize to model', function() {\n\t expect(value.getText()).toContain('2013-W01');\n\t expect(valid.getText()).toContain('myForm.input.$valid = true');\n\t });\n\t\n\t it('should be invalid if empty', function() {\n\t setInput('');\n\t expect(value.getText()).toEqual('value =');\n\t expect(valid.getText()).toContain('myForm.input.$valid = false');\n\t });\n\t\n\t it('should be invalid if over max', function() {\n\t setInput('2015-W01');\n\t expect(value.getText()).toContain('');\n\t expect(valid.getText()).toContain('myForm.input.$valid = false');\n\t });\n\t </file>\n\t </example>\n\t */\n\t 'week': createDateInputType('week', WEEK_REGEXP, weekParser, 'yyyy-Www'),\n\t\n\t /**\n\t * @ngdoc input\n\t * @name input[month]\n\t *\n\t * @description\n\t * Input with month validation and transformation. In browsers that do not yet support\n\t * the HTML5 month input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n\t * month format (yyyy-MM), for example: `2009-01`.\n\t *\n\t * The model must always be a Date object, otherwise Angular will throw an error.\n\t * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n\t * If the model is not set to the first of the month, the next view to model update will set it\n\t * to the first of the month.\n\t *\n\t * The timezone to be used to read/write the `Date` instance in the model can be defined using\n\t * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n\t *\n\t * @param {string} ngModel Assignable angular expression to data-bind to.\n\t * @param {string=} name Property name of the form under which the control is published.\n\t * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n\t * This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this\n\t * attribute (e.g. `min=\"{{minMonth | date:'yyyy-MM'}}\"`). Note that `min` will also add\n\t * native HTML5 constraint validation.\n\t * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n\t * This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this\n\t * attribute (e.g. `max=\"{{maxMonth | date:'yyyy-MM'}}\"`). Note that `max` will also add\n\t * native HTML5 constraint validation.\n\t * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string\n\t * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n\t * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string\n\t * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n\t\n\t * @param {string=} required Sets `required` validation error key if the value is not entered.\n\t * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n\t * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n\t * `required` when you want to data-bind to the `required` attribute.\n\t * @param {string=} ngChange Angular expression to be executed when input changes due to user\n\t * interaction with the input element.\n\t *\n\t * @example\n\t <example name=\"month-input-directive\" module=\"monthExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('monthExample', [])\n\t .controller('DateController', ['$scope', function($scope) {\n\t $scope.example = {\n\t value: new Date(2013, 9, 1)\n\t };\n\t }]);\n\t </script>\n\t <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n\t <label for=\"exampleInput\">Pick a month in 2013:</label>\n\t <input id=\"exampleInput\" type=\"month\" name=\"input\" ng-model=\"example.value\"\n\t placeholder=\"yyyy-MM\" min=\"2013-01\" max=\"2013-12\" required />\n\t <div role=\"alert\">\n\t <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n\t Required!</span>\n\t <span class=\"error\" ng-show=\"myForm.input.$error.month\">\n\t Not a valid month!</span>\n\t </div>\n\t <tt>value = {{example.value | date: \"yyyy-MM\"}}</tt><br/>\n\t <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n\t <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n\t <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n\t <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n\t </form>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var value = element(by.binding('example.value | date: \"yyyy-MM\"'));\n\t var valid = element(by.binding('myForm.input.$valid'));\n\t var input = element(by.model('example.value'));\n\t\n\t // currently protractor/webdriver does not support\n\t // sending keys to all known HTML5 input controls\n\t // for various browsers (https://github.com/angular/protractor/issues/562).\n\t function setInput(val) {\n\t // set the value of the element and force validation.\n\t var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n\t \"ipt.value = '\" + val + \"';\" +\n\t \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n\t browser.executeScript(scr);\n\t }\n\t\n\t it('should initialize to model', function() {\n\t expect(value.getText()).toContain('2013-10');\n\t expect(valid.getText()).toContain('myForm.input.$valid = true');\n\t });\n\t\n\t it('should be invalid if empty', function() {\n\t setInput('');\n\t expect(value.getText()).toEqual('value =');\n\t expect(valid.getText()).toContain('myForm.input.$valid = false');\n\t });\n\t\n\t it('should be invalid if over max', function() {\n\t setInput('2015-01');\n\t expect(value.getText()).toContain('');\n\t expect(valid.getText()).toContain('myForm.input.$valid = false');\n\t });\n\t </file>\n\t </example>\n\t */\n\t 'month': createDateInputType('month', MONTH_REGEXP,\n\t createDateParser(MONTH_REGEXP, ['yyyy', 'MM']),\n\t 'yyyy-MM'),\n\t\n\t /**\n\t * @ngdoc input\n\t * @name input[number]\n\t *\n\t * @description\n\t * Text input with number validation and transformation. Sets the `number` validation\n\t * error if not a valid number.\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * The model must always be of type `number` otherwise Angular will throw an error.\n\t * Be aware that a string containing a number is not enough. See the {@link ngModel:numfmt}\n\t * error docs for more information and an example of how to convert your model if necessary.\n\t * </div>\n\t *\n\t * ## Issues with HTML5 constraint validation\n\t *\n\t * In browsers that follow the\n\t * [HTML5 specification](https://html.spec.whatwg.org/multipage/forms.html#number-state-%28type=number%29),\n\t * `input[number]` does not work as expected with {@link ngModelOptions `ngModelOptions.allowInvalid`}.\n\t * If a non-number is entered in the input, the browser will report the value as an empty string,\n\t * which means the view / model values in `ngModel` and subsequently the scope value\n\t * will also be an empty string.\n\t *\n\t *\n\t * @param {string} ngModel Assignable angular expression to data-bind to.\n\t * @param {string=} name Property name of the form under which the control is published.\n\t * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n\t * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n\t * @param {string=} required Sets `required` validation error key if the value is not entered.\n\t * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n\t * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n\t * `required` when you want to data-bind to the `required` attribute.\n\t * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n\t * minlength.\n\t * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n\t * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n\t * any length.\n\t * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n\t * that contains the regular expression body that will be converted to a regular expression\n\t * as in the ngPattern directive.\n\t * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match\n\t * a RegExp found by evaluating the Angular expression given in the attribute value.\n\t * If the expression evaluates to a RegExp object, then this is used directly.\n\t * If the expression evaluates to a string, then it will be converted to a RegExp\n\t * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n\t * `new RegExp('^abc$')`.<br />\n\t * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n\t * start at the index of the last search's match, thus not taking the whole input value into\n\t * account.\n\t * @param {string=} ngChange Angular expression to be executed when input changes due to user\n\t * interaction with the input element.\n\t *\n\t * @example\n\t <example name=\"number-input-directive\" module=\"numberExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('numberExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.example = {\n\t value: 12\n\t };\n\t }]);\n\t </script>\n\t <form name=\"myForm\" ng-controller=\"ExampleController\">\n\t <label>Number:\n\t <input type=\"number\" name=\"input\" ng-model=\"example.value\"\n\t min=\"0\" max=\"99\" required>\n\t </label>\n\t <div role=\"alert\">\n\t <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n\t Required!</span>\n\t <span class=\"error\" ng-show=\"myForm.input.$error.number\">\n\t Not valid number!</span>\n\t </div>\n\t <tt>value = {{example.value}}</tt><br/>\n\t <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n\t <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n\t <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n\t <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n\t </form>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var value = element(by.binding('example.value'));\n\t var valid = element(by.binding('myForm.input.$valid'));\n\t var input = element(by.model('example.value'));\n\t\n\t it('should initialize to model', function() {\n\t expect(value.getText()).toContain('12');\n\t expect(valid.getText()).toContain('true');\n\t });\n\t\n\t it('should be invalid if empty', function() {\n\t input.clear();\n\t input.sendKeys('');\n\t expect(value.getText()).toEqual('value =');\n\t expect(valid.getText()).toContain('false');\n\t });\n\t\n\t it('should be invalid if over max', function() {\n\t input.clear();\n\t input.sendKeys('123');\n\t expect(value.getText()).toEqual('value =');\n\t expect(valid.getText()).toContain('false');\n\t });\n\t </file>\n\t </example>\n\t */\n\t 'number': numberInputType,\n\t\n\t\n\t /**\n\t * @ngdoc input\n\t * @name input[url]\n\t *\n\t * @description\n\t * Text input with URL validation. Sets the `url` validation error key if the content is not a\n\t * valid URL.\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * **Note:** `input[url]` uses a regex to validate urls that is derived from the regex\n\t * used in Chromium. If you need stricter validation, you can use `ng-pattern` or modify\n\t * the built-in validators (see the {@link guide/forms Forms guide})\n\t * </div>\n\t *\n\t * @param {string} ngModel Assignable angular expression to data-bind to.\n\t * @param {string=} name Property name of the form under which the control is published.\n\t * @param {string=} required Sets `required` validation error key if the value is not entered.\n\t * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n\t * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n\t * `required` when you want to data-bind to the `required` attribute.\n\t * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n\t * minlength.\n\t * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n\t * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n\t * any length.\n\t * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n\t * that contains the regular expression body that will be converted to a regular expression\n\t * as in the ngPattern directive.\n\t * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match\n\t * a RegExp found by evaluating the Angular expression given in the attribute value.\n\t * If the expression evaluates to a RegExp object, then this is used directly.\n\t * If the expression evaluates to a string, then it will be converted to a RegExp\n\t * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n\t * `new RegExp('^abc$')`.<br />\n\t * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n\t * start at the index of the last search's match, thus not taking the whole input value into\n\t * account.\n\t * @param {string=} ngChange Angular expression to be executed when input changes due to user\n\t * interaction with the input element.\n\t *\n\t * @example\n\t <example name=\"url-input-directive\" module=\"urlExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('urlExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.url = {\n\t text: 'http://google.com'\n\t };\n\t }]);\n\t </script>\n\t <form name=\"myForm\" ng-controller=\"ExampleController\">\n\t <label>URL:\n\t <input type=\"url\" name=\"input\" ng-model=\"url.text\" required>\n\t <label>\n\t <div role=\"alert\">\n\t <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n\t Required!</span>\n\t <span class=\"error\" ng-show=\"myForm.input.$error.url\">\n\t Not valid url!</span>\n\t </div>\n\t <tt>text = {{url.text}}</tt><br/>\n\t <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n\t <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n\t <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n\t <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n\t <tt>myForm.$error.url = {{!!myForm.$error.url}}</tt><br/>\n\t </form>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var text = element(by.binding('url.text'));\n\t var valid = element(by.binding('myForm.input.$valid'));\n\t var input = element(by.model('url.text'));\n\t\n\t it('should initialize to model', function() {\n\t expect(text.getText()).toContain('http://google.com');\n\t expect(valid.getText()).toContain('true');\n\t });\n\t\n\t it('should be invalid if empty', function() {\n\t input.clear();\n\t input.sendKeys('');\n\t\n\t expect(text.getText()).toEqual('text =');\n\t expect(valid.getText()).toContain('false');\n\t });\n\t\n\t it('should be invalid if not url', function() {\n\t input.clear();\n\t input.sendKeys('box');\n\t\n\t expect(valid.getText()).toContain('false');\n\t });\n\t </file>\n\t </example>\n\t */\n\t 'url': urlInputType,\n\t\n\t\n\t /**\n\t * @ngdoc input\n\t * @name input[email]\n\t *\n\t * @description\n\t * Text input with email validation. Sets the `email` validation error key if not a valid email\n\t * address.\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * **Note:** `input[email]` uses a regex to validate email addresses that is derived from the regex\n\t * used in Chromium. If you need stricter validation (e.g. requiring a top-level domain), you can\n\t * use `ng-pattern` or modify the built-in validators (see the {@link guide/forms Forms guide})\n\t * </div>\n\t *\n\t * @param {string} ngModel Assignable angular expression to data-bind to.\n\t * @param {string=} name Property name of the form under which the control is published.\n\t * @param {string=} required Sets `required` validation error key if the value is not entered.\n\t * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n\t * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n\t * `required` when you want to data-bind to the `required` attribute.\n\t * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n\t * minlength.\n\t * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n\t * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n\t * any length.\n\t * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n\t * that contains the regular expression body that will be converted to a regular expression\n\t * as in the ngPattern directive.\n\t * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match\n\t * a RegExp found by evaluating the Angular expression given in the attribute value.\n\t * If the expression evaluates to a RegExp object, then this is used directly.\n\t * If the expression evaluates to a string, then it will be converted to a RegExp\n\t * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n\t * `new RegExp('^abc$')`.<br />\n\t * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n\t * start at the index of the last search's match, thus not taking the whole input value into\n\t * account.\n\t * @param {string=} ngChange Angular expression to be executed when input changes due to user\n\t * interaction with the input element.\n\t *\n\t * @example\n\t <example name=\"email-input-directive\" module=\"emailExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('emailExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.email = {\n\t text: 'me@example.com'\n\t };\n\t }]);\n\t </script>\n\t <form name=\"myForm\" ng-controller=\"ExampleController\">\n\t <label>Email:\n\t <input type=\"email\" name=\"input\" ng-model=\"email.text\" required>\n\t </label>\n\t <div role=\"alert\">\n\t <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n\t Required!</span>\n\t <span class=\"error\" ng-show=\"myForm.input.$error.email\">\n\t Not valid email!</span>\n\t </div>\n\t <tt>text = {{email.text}}</tt><br/>\n\t <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n\t <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n\t <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n\t <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n\t <tt>myForm.$error.email = {{!!myForm.$error.email}}</tt><br/>\n\t </form>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var text = element(by.binding('email.text'));\n\t var valid = element(by.binding('myForm.input.$valid'));\n\t var input = element(by.model('email.text'));\n\t\n\t it('should initialize to model', function() {\n\t expect(text.getText()).toContain('me@example.com');\n\t expect(valid.getText()).toContain('true');\n\t });\n\t\n\t it('should be invalid if empty', function() {\n\t input.clear();\n\t input.sendKeys('');\n\t expect(text.getText()).toEqual('text =');\n\t expect(valid.getText()).toContain('false');\n\t });\n\t\n\t it('should be invalid if not email', function() {\n\t input.clear();\n\t input.sendKeys('xxx');\n\t\n\t expect(valid.getText()).toContain('false');\n\t });\n\t </file>\n\t </example>\n\t */\n\t 'email': emailInputType,\n\t\n\t\n\t /**\n\t * @ngdoc input\n\t * @name input[radio]\n\t *\n\t * @description\n\t * HTML radio button.\n\t *\n\t * @param {string} ngModel Assignable angular expression to data-bind to.\n\t * @param {string} value The value to which the `ngModel` expression should be set when selected.\n\t * Note that `value` only supports `string` values, i.e. the scope model needs to be a string,\n\t * too. Use `ngValue` if you need complex models (`number`, `object`, ...).\n\t * @param {string=} name Property name of the form under which the control is published.\n\t * @param {string=} ngChange Angular expression to be executed when input changes due to user\n\t * interaction with the input element.\n\t * @param {string} ngValue Angular expression to which `ngModel` will be be set when the radio\n\t * is selected. Should be used instead of the `value` attribute if you need\n\t * a non-string `ngModel` (`boolean`, `array`, ...).\n\t *\n\t * @example\n\t <example name=\"radio-input-directive\" module=\"radioExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('radioExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.color = {\n\t name: 'blue'\n\t };\n\t $scope.specialValue = {\n\t \"id\": \"12345\",\n\t \"value\": \"green\"\n\t };\n\t }]);\n\t </script>\n\t <form name=\"myForm\" ng-controller=\"ExampleController\">\n\t <label>\n\t <input type=\"radio\" ng-model=\"color.name\" value=\"red\">\n\t Red\n\t </label><br/>\n\t <label>\n\t <input type=\"radio\" ng-model=\"color.name\" ng-value=\"specialValue\">\n\t Green\n\t </label><br/>\n\t <label>\n\t <input type=\"radio\" ng-model=\"color.name\" value=\"blue\">\n\t Blue\n\t </label><br/>\n\t <tt>color = {{color.name | json}}</tt><br/>\n\t </form>\n\t Note that `ng-value=\"specialValue\"` sets radio item's value to be the value of `$scope.specialValue`.\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should change state', function() {\n\t var color = element(by.binding('color.name'));\n\t\n\t expect(color.getText()).toContain('blue');\n\t\n\t element.all(by.model('color.name')).get(0).click();\n\t\n\t expect(color.getText()).toContain('red');\n\t });\n\t </file>\n\t </example>\n\t */\n\t 'radio': radioInputType,\n\t\n\t\n\t /**\n\t * @ngdoc input\n\t * @name input[checkbox]\n\t *\n\t * @description\n\t * HTML checkbox.\n\t *\n\t * @param {string} ngModel Assignable angular expression to data-bind to.\n\t * @param {string=} name Property name of the form under which the control is published.\n\t * @param {expression=} ngTrueValue The value to which the expression should be set when selected.\n\t * @param {expression=} ngFalseValue The value to which the expression should be set when not selected.\n\t * @param {string=} ngChange Angular expression to be executed when input changes due to user\n\t * interaction with the input element.\n\t *\n\t * @example\n\t <example name=\"checkbox-input-directive\" module=\"checkboxExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('checkboxExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.checkboxModel = {\n\t value1 : true,\n\t value2 : 'YES'\n\t };\n\t }]);\n\t </script>\n\t <form name=\"myForm\" ng-controller=\"ExampleController\">\n\t <label>Value1:\n\t <input type=\"checkbox\" ng-model=\"checkboxModel.value1\">\n\t </label><br/>\n\t <label>Value2:\n\t <input type=\"checkbox\" ng-model=\"checkboxModel.value2\"\n\t ng-true-value=\"'YES'\" ng-false-value=\"'NO'\">\n\t </label><br/>\n\t <tt>value1 = {{checkboxModel.value1}}</tt><br/>\n\t <tt>value2 = {{checkboxModel.value2}}</tt><br/>\n\t </form>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should change state', function() {\n\t var value1 = element(by.binding('checkboxModel.value1'));\n\t var value2 = element(by.binding('checkboxModel.value2'));\n\t\n\t expect(value1.getText()).toContain('true');\n\t expect(value2.getText()).toContain('YES');\n\t\n\t element(by.model('checkboxModel.value1')).click();\n\t element(by.model('checkboxModel.value2')).click();\n\t\n\t expect(value1.getText()).toContain('false');\n\t expect(value2.getText()).toContain('NO');\n\t });\n\t </file>\n\t </example>\n\t */\n\t 'checkbox': checkboxInputType,\n\t\n\t 'hidden': noop,\n\t 'button': noop,\n\t 'submit': noop,\n\t 'reset': noop,\n\t 'file': noop\n\t};\n\t\n\tfunction stringBasedInputType(ctrl) {\n\t ctrl.$formatters.push(function(value) {\n\t return ctrl.$isEmpty(value) ? value : value.toString();\n\t });\n\t}\n\t\n\tfunction textInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n\t baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\t stringBasedInputType(ctrl);\n\t}\n\t\n\tfunction baseInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n\t var type = lowercase(element[0].type);\n\t\n\t // In composition mode, users are still inputing intermediate text buffer,\n\t // hold the listener until composition is done.\n\t // More about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent\n\t if (!$sniffer.android) {\n\t var composing = false;\n\t\n\t element.on('compositionstart', function(data) {\n\t composing = true;\n\t });\n\t\n\t element.on('compositionend', function() {\n\t composing = false;\n\t listener();\n\t });\n\t }\n\t\n\t var timeout;\n\t\n\t var listener = function(ev) {\n\t if (timeout) {\n\t $browser.defer.cancel(timeout);\n\t timeout = null;\n\t }\n\t if (composing) return;\n\t var value = element.val(),\n\t event = ev && ev.type;\n\t\n\t // By default we will trim the value\n\t // If the attribute ng-trim exists we will avoid trimming\n\t // If input type is 'password', the value is never trimmed\n\t if (type !== 'password' && (!attr.ngTrim || attr.ngTrim !== 'false')) {\n\t value = trim(value);\n\t }\n\t\n\t // If a control is suffering from bad input (due to native validators), browsers discard its\n\t // value, so it may be necessary to revalidate (by calling $setViewValue again) even if the\n\t // control's value is the same empty value twice in a row.\n\t if (ctrl.$viewValue !== value || (value === '' && ctrl.$$hasNativeValidators)) {\n\t ctrl.$setViewValue(value, event);\n\t }\n\t };\n\t\n\t // if the browser does support \"input\" event, we are fine - except on IE9 which doesn't fire the\n\t // input event on backspace, delete or cut\n\t if ($sniffer.hasEvent('input')) {\n\t element.on('input', listener);\n\t } else {\n\t var deferListener = function(ev, input, origValue) {\n\t if (!timeout) {\n\t timeout = $browser.defer(function() {\n\t timeout = null;\n\t if (!input || input.value !== origValue) {\n\t listener(ev);\n\t }\n\t });\n\t }\n\t };\n\t\n\t element.on('keydown', function(event) {\n\t var key = event.keyCode;\n\t\n\t // ignore\n\t // command modifiers arrows\n\t if (key === 91 || (15 < key && key < 19) || (37 <= key && key <= 40)) return;\n\t\n\t deferListener(event, this, this.value);\n\t });\n\t\n\t // if user modifies input value using context menu in IE, we need \"paste\" and \"cut\" events to catch it\n\t if ($sniffer.hasEvent('paste')) {\n\t element.on('paste cut', deferListener);\n\t }\n\t }\n\t\n\t // if user paste into input using mouse on older browser\n\t // or form autocomplete on newer browser, we need \"change\" event to catch it\n\t element.on('change', listener);\n\t\n\t // Some native input types (date-family) have the ability to change validity without\n\t // firing any input/change events.\n\t // For these event types, when native validators are present and the browser supports the type,\n\t // check for validity changes on various DOM events.\n\t if (PARTIAL_VALIDATION_TYPES[type] && ctrl.$$hasNativeValidators && type === attr.type) {\n\t element.on(PARTIAL_VALIDATION_EVENTS, function(ev) {\n\t if (!timeout) {\n\t var validity = this[VALIDITY_STATE_PROPERTY];\n\t var origBadInput = validity.badInput;\n\t var origTypeMismatch = validity.typeMismatch;\n\t timeout = $browser.defer(function() {\n\t timeout = null;\n\t if (validity.badInput !== origBadInput || validity.typeMismatch !== origTypeMismatch) {\n\t listener(ev);\n\t }\n\t });\n\t }\n\t });\n\t }\n\t\n\t ctrl.$render = function() {\n\t // Workaround for Firefox validation #12102.\n\t var value = ctrl.$isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue;\n\t if (element.val() !== value) {\n\t element.val(value);\n\t }\n\t };\n\t}\n\t\n\tfunction weekParser(isoWeek, existingDate) {\n\t if (isDate(isoWeek)) {\n\t return isoWeek;\n\t }\n\t\n\t if (isString(isoWeek)) {\n\t WEEK_REGEXP.lastIndex = 0;\n\t var parts = WEEK_REGEXP.exec(isoWeek);\n\t if (parts) {\n\t var year = +parts[1],\n\t week = +parts[2],\n\t hours = 0,\n\t minutes = 0,\n\t seconds = 0,\n\t milliseconds = 0,\n\t firstThurs = getFirstThursdayOfYear(year),\n\t addDays = (week - 1) * 7;\n\t\n\t if (existingDate) {\n\t hours = existingDate.getHours();\n\t minutes = existingDate.getMinutes();\n\t seconds = existingDate.getSeconds();\n\t milliseconds = existingDate.getMilliseconds();\n\t }\n\t\n\t return new Date(year, 0, firstThurs.getDate() + addDays, hours, minutes, seconds, milliseconds);\n\t }\n\t }\n\t\n\t return NaN;\n\t}\n\t\n\tfunction createDateParser(regexp, mapping) {\n\t return function(iso, date) {\n\t var parts, map;\n\t\n\t if (isDate(iso)) {\n\t return iso;\n\t }\n\t\n\t if (isString(iso)) {\n\t // When a date is JSON'ified to wraps itself inside of an extra\n\t // set of double quotes. This makes the date parsing code unable\n\t // to match the date string and parse it as a date.\n\t if (iso.charAt(0) == '\"' && iso.charAt(iso.length - 1) == '\"') {\n\t iso = iso.substring(1, iso.length - 1);\n\t }\n\t if (ISO_DATE_REGEXP.test(iso)) {\n\t return new Date(iso);\n\t }\n\t regexp.lastIndex = 0;\n\t parts = regexp.exec(iso);\n\t\n\t if (parts) {\n\t parts.shift();\n\t if (date) {\n\t map = {\n\t yyyy: date.getFullYear(),\n\t MM: date.getMonth() + 1,\n\t dd: date.getDate(),\n\t HH: date.getHours(),\n\t mm: date.getMinutes(),\n\t ss: date.getSeconds(),\n\t sss: date.getMilliseconds() / 1000\n\t };\n\t } else {\n\t map = { yyyy: 1970, MM: 1, dd: 1, HH: 0, mm: 0, ss: 0, sss: 0 };\n\t }\n\t\n\t forEach(parts, function(part, index) {\n\t if (index < mapping.length) {\n\t map[mapping[index]] = +part;\n\t }\n\t });\n\t return new Date(map.yyyy, map.MM - 1, map.dd, map.HH, map.mm, map.ss || 0, map.sss * 1000 || 0);\n\t }\n\t }\n\t\n\t return NaN;\n\t };\n\t}\n\t\n\tfunction createDateInputType(type, regexp, parseDate, format) {\n\t return function dynamicDateInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter) {\n\t badInputChecker(scope, element, attr, ctrl);\n\t baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\t var timezone = ctrl && ctrl.$options && ctrl.$options.timezone;\n\t var previousDate;\n\t\n\t ctrl.$$parserName = type;\n\t ctrl.$parsers.push(function(value) {\n\t if (ctrl.$isEmpty(value)) return null;\n\t if (regexp.test(value)) {\n\t // Note: We cannot read ctrl.$modelValue, as there might be a different\n\t // parser/formatter in the processing chain so that the model\n\t // contains some different data format!\n\t var parsedDate = parseDate(value, previousDate);\n\t if (timezone) {\n\t parsedDate = convertTimezoneToLocal(parsedDate, timezone);\n\t }\n\t return parsedDate;\n\t }\n\t return undefined;\n\t });\n\t\n\t ctrl.$formatters.push(function(value) {\n\t if (value && !isDate(value)) {\n\t throw ngModelMinErr('datefmt', 'Expected `{0}` to be a date', value);\n\t }\n\t if (isValidDate(value)) {\n\t previousDate = value;\n\t if (previousDate && timezone) {\n\t previousDate = convertTimezoneToLocal(previousDate, timezone, true);\n\t }\n\t return $filter('date')(value, format, timezone);\n\t } else {\n\t previousDate = null;\n\t return '';\n\t }\n\t });\n\t\n\t if (isDefined(attr.min) || attr.ngMin) {\n\t var minVal;\n\t ctrl.$validators.min = function(value) {\n\t return !isValidDate(value) || isUndefined(minVal) || parseDate(value) >= minVal;\n\t };\n\t attr.$observe('min', function(val) {\n\t minVal = parseObservedDateValue(val);\n\t ctrl.$validate();\n\t });\n\t }\n\t\n\t if (isDefined(attr.max) || attr.ngMax) {\n\t var maxVal;\n\t ctrl.$validators.max = function(value) {\n\t return !isValidDate(value) || isUndefined(maxVal) || parseDate(value) <= maxVal;\n\t };\n\t attr.$observe('max', function(val) {\n\t maxVal = parseObservedDateValue(val);\n\t ctrl.$validate();\n\t });\n\t }\n\t\n\t function isValidDate(value) {\n\t // Invalid Date: getTime() returns NaN\n\t return value && !(value.getTime && value.getTime() !== value.getTime());\n\t }\n\t\n\t function parseObservedDateValue(val) {\n\t return isDefined(val) && !isDate(val) ? parseDate(val) || undefined : val;\n\t }\n\t };\n\t}\n\t\n\tfunction badInputChecker(scope, element, attr, ctrl) {\n\t var node = element[0];\n\t var nativeValidation = ctrl.$$hasNativeValidators = isObject(node.validity);\n\t if (nativeValidation) {\n\t ctrl.$parsers.push(function(value) {\n\t var validity = element.prop(VALIDITY_STATE_PROPERTY) || {};\n\t // Detect bug in FF35 for input[email] (https://bugzilla.mozilla.org/show_bug.cgi?id=1064430):\n\t // - also sets validity.badInput (should only be validity.typeMismatch).\n\t // - see http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#e-mail-state-(type=email)\n\t // - can ignore this case as we can still read out the erroneous email...\n\t return validity.badInput && !validity.typeMismatch ? undefined : value;\n\t });\n\t }\n\t}\n\t\n\tfunction numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n\t badInputChecker(scope, element, attr, ctrl);\n\t baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\t\n\t ctrl.$$parserName = 'number';\n\t ctrl.$parsers.push(function(value) {\n\t if (ctrl.$isEmpty(value)) return null;\n\t if (NUMBER_REGEXP.test(value)) return parseFloat(value);\n\t return undefined;\n\t });\n\t\n\t ctrl.$formatters.push(function(value) {\n\t if (!ctrl.$isEmpty(value)) {\n\t if (!isNumber(value)) {\n\t throw ngModelMinErr('numfmt', 'Expected `{0}` to be a number', value);\n\t }\n\t value = value.toString();\n\t }\n\t return value;\n\t });\n\t\n\t if (isDefined(attr.min) || attr.ngMin) {\n\t var minVal;\n\t ctrl.$validators.min = function(value) {\n\t return ctrl.$isEmpty(value) || isUndefined(minVal) || value >= minVal;\n\t };\n\t\n\t attr.$observe('min', function(val) {\n\t if (isDefined(val) && !isNumber(val)) {\n\t val = parseFloat(val, 10);\n\t }\n\t minVal = isNumber(val) && !isNaN(val) ? val : undefined;\n\t // TODO(matsko): implement validateLater to reduce number of validations\n\t ctrl.$validate();\n\t });\n\t }\n\t\n\t if (isDefined(attr.max) || attr.ngMax) {\n\t var maxVal;\n\t ctrl.$validators.max = function(value) {\n\t return ctrl.$isEmpty(value) || isUndefined(maxVal) || value <= maxVal;\n\t };\n\t\n\t attr.$observe('max', function(val) {\n\t if (isDefined(val) && !isNumber(val)) {\n\t val = parseFloat(val, 10);\n\t }\n\t maxVal = isNumber(val) && !isNaN(val) ? val : undefined;\n\t // TODO(matsko): implement validateLater to reduce number of validations\n\t ctrl.$validate();\n\t });\n\t }\n\t}\n\t\n\tfunction urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n\t // Note: no badInputChecker here by purpose as `url` is only a validation\n\t // in browsers, i.e. we can always read out input.value even if it is not valid!\n\t baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\t stringBasedInputType(ctrl);\n\t\n\t ctrl.$$parserName = 'url';\n\t ctrl.$validators.url = function(modelValue, viewValue) {\n\t var value = modelValue || viewValue;\n\t return ctrl.$isEmpty(value) || URL_REGEXP.test(value);\n\t };\n\t}\n\t\n\tfunction emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n\t // Note: no badInputChecker here by purpose as `url` is only a validation\n\t // in browsers, i.e. we can always read out input.value even if it is not valid!\n\t baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\t stringBasedInputType(ctrl);\n\t\n\t ctrl.$$parserName = 'email';\n\t ctrl.$validators.email = function(modelValue, viewValue) {\n\t var value = modelValue || viewValue;\n\t return ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value);\n\t };\n\t}\n\t\n\tfunction radioInputType(scope, element, attr, ctrl) {\n\t // make the name unique, if not defined\n\t if (isUndefined(attr.name)) {\n\t element.attr('name', nextUid());\n\t }\n\t\n\t var listener = function(ev) {\n\t if (element[0].checked) {\n\t ctrl.$setViewValue(attr.value, ev && ev.type);\n\t }\n\t };\n\t\n\t element.on('click', listener);\n\t\n\t ctrl.$render = function() {\n\t var value = attr.value;\n\t element[0].checked = (value == ctrl.$viewValue);\n\t };\n\t\n\t attr.$observe('value', ctrl.$render);\n\t}\n\t\n\tfunction parseConstantExpr($parse, context, name, expression, fallback) {\n\t var parseFn;\n\t if (isDefined(expression)) {\n\t parseFn = $parse(expression);\n\t if (!parseFn.constant) {\n\t throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' +\n\t '`{1}`.', name, expression);\n\t }\n\t return parseFn(context);\n\t }\n\t return fallback;\n\t}\n\t\n\tfunction checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {\n\t var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true);\n\t var falseValue = parseConstantExpr($parse, scope, 'ngFalseValue', attr.ngFalseValue, false);\n\t\n\t var listener = function(ev) {\n\t ctrl.$setViewValue(element[0].checked, ev && ev.type);\n\t };\n\t\n\t element.on('click', listener);\n\t\n\t ctrl.$render = function() {\n\t element[0].checked = ctrl.$viewValue;\n\t };\n\t\n\t // Override the standard `$isEmpty` because the $viewValue of an empty checkbox is always set to `false`\n\t // This is because of the parser below, which compares the `$modelValue` with `trueValue` to convert\n\t // it to a boolean.\n\t ctrl.$isEmpty = function(value) {\n\t return value === false;\n\t };\n\t\n\t ctrl.$formatters.push(function(value) {\n\t return equals(value, trueValue);\n\t });\n\t\n\t ctrl.$parsers.push(function(value) {\n\t return value ? trueValue : falseValue;\n\t });\n\t}\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name textarea\n\t * @restrict E\n\t *\n\t * @description\n\t * HTML textarea element control with angular data-binding. The data-binding and validation\n\t * properties of this element are exactly the same as those of the\n\t * {@link ng.directive:input input element}.\n\t *\n\t * @param {string} ngModel Assignable angular expression to data-bind to.\n\t * @param {string=} name Property name of the form under which the control is published.\n\t * @param {string=} required Sets `required` validation error key if the value is not entered.\n\t * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n\t * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n\t * `required` when you want to data-bind to the `required` attribute.\n\t * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n\t * minlength.\n\t * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n\t * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any\n\t * length.\n\t * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match\n\t * a RegExp found by evaluating the Angular expression given in the attribute value.\n\t * If the expression evaluates to a RegExp object, then this is used directly.\n\t * If the expression evaluates to a string, then it will be converted to a RegExp\n\t * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n\t * `new RegExp('^abc$')`.<br />\n\t * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n\t * start at the index of the last search's match, thus not taking the whole input value into\n\t * account.\n\t * @param {string=} ngChange Angular expression to be executed when input changes due to user\n\t * interaction with the input element.\n\t * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name input\n\t * @restrict E\n\t *\n\t * @description\n\t * HTML input element control. When used together with {@link ngModel `ngModel`}, it provides data-binding,\n\t * input state control, and validation.\n\t * Input control follows HTML5 input types and polyfills the HTML5 validation behavior for older browsers.\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * **Note:** Not every feature offered is available for all input types.\n\t * Specifically, data binding and event handling via `ng-model` is unsupported for `input[file]`.\n\t * </div>\n\t *\n\t * @param {string} ngModel Assignable angular expression to data-bind to.\n\t * @param {string=} name Property name of the form under which the control is published.\n\t * @param {string=} required Sets `required` validation error key if the value is not entered.\n\t * @param {boolean=} ngRequired Sets `required` attribute if set to true\n\t * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n\t * minlength.\n\t * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n\t * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any\n\t * length.\n\t * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match\n\t * a RegExp found by evaluating the Angular expression given in the attribute value.\n\t * If the expression evaluates to a RegExp object, then this is used directly.\n\t * If the expression evaluates to a string, then it will be converted to a RegExp\n\t * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n\t * `new RegExp('^abc$')`.<br />\n\t * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n\t * start at the index of the last search's match, thus not taking the whole input value into\n\t * account.\n\t * @param {string=} ngChange Angular expression to be executed when input changes due to user\n\t * interaction with the input element.\n\t * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n\t * This parameter is ignored for input[type=password] controls, which will never trim the\n\t * input.\n\t *\n\t * @example\n\t <example name=\"input-directive\" module=\"inputExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('inputExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.user = {name: 'guest', last: 'visitor'};\n\t }]);\n\t </script>\n\t <div ng-controller=\"ExampleController\">\n\t <form name=\"myForm\">\n\t <label>\n\t User name:\n\t <input type=\"text\" name=\"userName\" ng-model=\"user.name\" required>\n\t </label>\n\t <div role=\"alert\">\n\t <span class=\"error\" ng-show=\"myForm.userName.$error.required\">\n\t Required!</span>\n\t </div>\n\t <label>\n\t Last name:\n\t <input type=\"text\" name=\"lastName\" ng-model=\"user.last\"\n\t ng-minlength=\"3\" ng-maxlength=\"10\">\n\t </label>\n\t <div role=\"alert\">\n\t <span class=\"error\" ng-show=\"myForm.lastName.$error.minlength\">\n\t Too short!</span>\n\t <span class=\"error\" ng-show=\"myForm.lastName.$error.maxlength\">\n\t Too long!</span>\n\t </div>\n\t </form>\n\t <hr>\n\t <tt>user = {{user}}</tt><br/>\n\t <tt>myForm.userName.$valid = {{myForm.userName.$valid}}</tt><br/>\n\t <tt>myForm.userName.$error = {{myForm.userName.$error}}</tt><br/>\n\t <tt>myForm.lastName.$valid = {{myForm.lastName.$valid}}</tt><br/>\n\t <tt>myForm.lastName.$error = {{myForm.lastName.$error}}</tt><br/>\n\t <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n\t <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n\t <tt>myForm.$error.minlength = {{!!myForm.$error.minlength}}</tt><br/>\n\t <tt>myForm.$error.maxlength = {{!!myForm.$error.maxlength}}</tt><br/>\n\t </div>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var user = element(by.exactBinding('user'));\n\t var userNameValid = element(by.binding('myForm.userName.$valid'));\n\t var lastNameValid = element(by.binding('myForm.lastName.$valid'));\n\t var lastNameError = element(by.binding('myForm.lastName.$error'));\n\t var formValid = element(by.binding('myForm.$valid'));\n\t var userNameInput = element(by.model('user.name'));\n\t var userLastInput = element(by.model('user.last'));\n\t\n\t it('should initialize to model', function() {\n\t expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"visitor\"}');\n\t expect(userNameValid.getText()).toContain('true');\n\t expect(formValid.getText()).toContain('true');\n\t });\n\t\n\t it('should be invalid if empty when required', function() {\n\t userNameInput.clear();\n\t userNameInput.sendKeys('');\n\t\n\t expect(user.getText()).toContain('{\"last\":\"visitor\"}');\n\t expect(userNameValid.getText()).toContain('false');\n\t expect(formValid.getText()).toContain('false');\n\t });\n\t\n\t it('should be valid if empty when min length is set', function() {\n\t userLastInput.clear();\n\t userLastInput.sendKeys('');\n\t\n\t expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"\"}');\n\t expect(lastNameValid.getText()).toContain('true');\n\t expect(formValid.getText()).toContain('true');\n\t });\n\t\n\t it('should be invalid if less than required min length', function() {\n\t userLastInput.clear();\n\t userLastInput.sendKeys('xx');\n\t\n\t expect(user.getText()).toContain('{\"name\":\"guest\"}');\n\t expect(lastNameValid.getText()).toContain('false');\n\t expect(lastNameError.getText()).toContain('minlength');\n\t expect(formValid.getText()).toContain('false');\n\t });\n\t\n\t it('should be invalid if longer than max length', function() {\n\t userLastInput.clear();\n\t userLastInput.sendKeys('some ridiculously long name');\n\t\n\t expect(user.getText()).toContain('{\"name\":\"guest\"}');\n\t expect(lastNameValid.getText()).toContain('false');\n\t expect(lastNameError.getText()).toContain('maxlength');\n\t expect(formValid.getText()).toContain('false');\n\t });\n\t </file>\n\t </example>\n\t */\n\tvar inputDirective = ['$browser', '$sniffer', '$filter', '$parse',\n\t function($browser, $sniffer, $filter, $parse) {\n\t return {\n\t restrict: 'E',\n\t require: ['?ngModel'],\n\t link: {\n\t pre: function(scope, element, attr, ctrls) {\n\t if (ctrls[0]) {\n\t (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrls[0], $sniffer,\n\t $browser, $filter, $parse);\n\t }\n\t }\n\t }\n\t };\n\t}];\n\t\n\t\n\t\n\tvar CONSTANT_VALUE_REGEXP = /^(true|false|\\d+)$/;\n\t/**\n\t * @ngdoc directive\n\t * @name ngValue\n\t *\n\t * @description\n\t * Binds the given expression to the value of `<option>` or {@link input[radio] `input[radio]`},\n\t * so that when the element is selected, the {@link ngModel `ngModel`} of that element is set to\n\t * the bound value.\n\t *\n\t * `ngValue` is useful when dynamically generating lists of radio buttons using\n\t * {@link ngRepeat `ngRepeat`}, as shown below.\n\t *\n\t * Likewise, `ngValue` can be used to generate `<option>` elements for\n\t * the {@link select `select`} element. In that case however, only strings are supported\n\t * for the `value `attribute, so the resulting `ngModel` will always be a string.\n\t * Support for `select` models with non-string values is available via `ngOptions`.\n\t *\n\t * @element input\n\t * @param {string=} ngValue angular expression, whose value will be bound to the `value` attribute\n\t * of the `input` element\n\t *\n\t * @example\n\t <example name=\"ngValue-directive\" module=\"valueExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('valueExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.names = ['pizza', 'unicorns', 'robots'];\n\t $scope.my = { favorite: 'unicorns' };\n\t }]);\n\t </script>\n\t <form ng-controller=\"ExampleController\">\n\t <h2>Which is your favorite?</h2>\n\t <label ng-repeat=\"name in names\" for=\"{{name}}\">\n\t {{name}}\n\t <input type=\"radio\"\n\t ng-model=\"my.favorite\"\n\t ng-value=\"name\"\n\t id=\"{{name}}\"\n\t name=\"favorite\">\n\t </label>\n\t <div>You chose {{my.favorite}}</div>\n\t </form>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var favorite = element(by.binding('my.favorite'));\n\t\n\t it('should initialize to model', function() {\n\t expect(favorite.getText()).toContain('unicorns');\n\t });\n\t it('should bind the values to the inputs', function() {\n\t element.all(by.model('my.favorite')).get(0).click();\n\t expect(favorite.getText()).toContain('pizza');\n\t });\n\t </file>\n\t </example>\n\t */\n\tvar ngValueDirective = function() {\n\t return {\n\t restrict: 'A',\n\t priority: 100,\n\t compile: function(tpl, tplAttr) {\n\t if (CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)) {\n\t return function ngValueConstantLink(scope, elm, attr) {\n\t attr.$set('value', scope.$eval(attr.ngValue));\n\t };\n\t } else {\n\t return function ngValueLink(scope, elm, attr) {\n\t scope.$watch(attr.ngValue, function valueWatchAction(value) {\n\t attr.$set('value', value);\n\t });\n\t };\n\t }\n\t }\n\t };\n\t};\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngBind\n\t * @restrict AC\n\t *\n\t * @description\n\t * The `ngBind` attribute tells Angular to replace the text content of the specified HTML element\n\t * with the value of a given expression, and to update the text content when the value of that\n\t * expression changes.\n\t *\n\t * Typically, you don't use `ngBind` directly, but instead you use the double curly markup like\n\t * `{{ expression }}` which is similar but less verbose.\n\t *\n\t * It is preferable to use `ngBind` instead of `{{ expression }}` if a template is momentarily\n\t * displayed by the browser in its raw state before Angular compiles it. Since `ngBind` is an\n\t * element attribute, it makes the bindings invisible to the user while the page is loading.\n\t *\n\t * An alternative solution to this problem would be using the\n\t * {@link ng.directive:ngCloak ngCloak} directive.\n\t *\n\t *\n\t * @element ANY\n\t * @param {expression} ngBind {@link guide/expression Expression} to evaluate.\n\t *\n\t * @example\n\t * Enter a name in the Live Preview text box; the greeting below the text box changes instantly.\n\t <example module=\"bindExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('bindExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.name = 'Whirled';\n\t }]);\n\t </script>\n\t <div ng-controller=\"ExampleController\">\n\t <label>Enter name: <input type=\"text\" ng-model=\"name\"></label><br>\n\t Hello <span ng-bind=\"name\"></span>!\n\t </div>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should check ng-bind', function() {\n\t var nameInput = element(by.model('name'));\n\t\n\t expect(element(by.binding('name')).getText()).toBe('Whirled');\n\t nameInput.clear();\n\t nameInput.sendKeys('world');\n\t expect(element(by.binding('name')).getText()).toBe('world');\n\t });\n\t </file>\n\t </example>\n\t */\n\tvar ngBindDirective = ['$compile', function($compile) {\n\t return {\n\t restrict: 'AC',\n\t compile: function ngBindCompile(templateElement) {\n\t $compile.$$addBindingClass(templateElement);\n\t return function ngBindLink(scope, element, attr) {\n\t $compile.$$addBindingInfo(element, attr.ngBind);\n\t element = element[0];\n\t scope.$watch(attr.ngBind, function ngBindWatchAction(value) {\n\t element.textContent = isUndefined(value) ? '' : value;\n\t });\n\t };\n\t }\n\t };\n\t}];\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngBindTemplate\n\t *\n\t * @description\n\t * The `ngBindTemplate` directive specifies that the element\n\t * text content should be replaced with the interpolation of the template\n\t * in the `ngBindTemplate` attribute.\n\t * Unlike `ngBind`, the `ngBindTemplate` can contain multiple `{{` `}}`\n\t * expressions. This directive is needed since some HTML elements\n\t * (such as TITLE and OPTION) cannot contain SPAN elements.\n\t *\n\t * @element ANY\n\t * @param {string} ngBindTemplate template of form\n\t * <tt>{{</tt> <tt>expression</tt> <tt>}}</tt> to eval.\n\t *\n\t * @example\n\t * Try it here: enter text in text box and watch the greeting change.\n\t <example module=\"bindExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('bindExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.salutation = 'Hello';\n\t $scope.name = 'World';\n\t }]);\n\t </script>\n\t <div ng-controller=\"ExampleController\">\n\t <label>Salutation: <input type=\"text\" ng-model=\"salutation\"></label><br>\n\t <label>Name: <input type=\"text\" ng-model=\"name\"></label><br>\n\t <pre ng-bind-template=\"{{salutation}} {{name}}!\"></pre>\n\t </div>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should check ng-bind', function() {\n\t var salutationElem = element(by.binding('salutation'));\n\t var salutationInput = element(by.model('salutation'));\n\t var nameInput = element(by.model('name'));\n\t\n\t expect(salutationElem.getText()).toBe('Hello World!');\n\t\n\t salutationInput.clear();\n\t salutationInput.sendKeys('Greetings');\n\t nameInput.clear();\n\t nameInput.sendKeys('user');\n\t\n\t expect(salutationElem.getText()).toBe('Greetings user!');\n\t });\n\t </file>\n\t </example>\n\t */\n\tvar ngBindTemplateDirective = ['$interpolate', '$compile', function($interpolate, $compile) {\n\t return {\n\t compile: function ngBindTemplateCompile(templateElement) {\n\t $compile.$$addBindingClass(templateElement);\n\t return function ngBindTemplateLink(scope, element, attr) {\n\t var interpolateFn = $interpolate(element.attr(attr.$attr.ngBindTemplate));\n\t $compile.$$addBindingInfo(element, interpolateFn.expressions);\n\t element = element[0];\n\t attr.$observe('ngBindTemplate', function(value) {\n\t element.textContent = isUndefined(value) ? '' : value;\n\t });\n\t };\n\t }\n\t };\n\t}];\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngBindHtml\n\t *\n\t * @description\n\t * Evaluates the expression and inserts the resulting HTML into the element in a secure way. By default,\n\t * the resulting HTML content will be sanitized using the {@link ngSanitize.$sanitize $sanitize} service.\n\t * To utilize this functionality, ensure that `$sanitize` is available, for example, by including {@link\n\t * ngSanitize} in your module's dependencies (not in core Angular). In order to use {@link ngSanitize}\n\t * in your module's dependencies, you need to include \"angular-sanitize.js\" in your application.\n\t *\n\t * You may also bypass sanitization for values you know are safe. To do so, bind to\n\t * an explicitly trusted value via {@link ng.$sce#trustAsHtml $sce.trustAsHtml}. See the example\n\t * under {@link ng.$sce#show-me-an-example-using-sce- Strict Contextual Escaping (SCE)}.\n\t *\n\t * Note: If a `$sanitize` service is unavailable and the bound value isn't explicitly trusted, you\n\t * will have an exception (instead of an exploit.)\n\t *\n\t * @element ANY\n\t * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.\n\t *\n\t * @example\n\t\n\t <example module=\"bindHtmlExample\" deps=\"angular-sanitize.js\">\n\t <file name=\"index.html\">\n\t <div ng-controller=\"ExampleController\">\n\t <p ng-bind-html=\"myHTML\"></p>\n\t </div>\n\t </file>\n\t\n\t <file name=\"script.js\">\n\t angular.module('bindHtmlExample', ['ngSanitize'])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.myHTML =\n\t 'I am an <code>HTML</code>string with ' +\n\t '<a href=\"#\">links!</a> and other <em>stuff</em>';\n\t }]);\n\t </file>\n\t\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should check ng-bind-html', function() {\n\t expect(element(by.binding('myHTML')).getText()).toBe(\n\t 'I am an HTMLstring with links! and other stuff');\n\t });\n\t </file>\n\t </example>\n\t */\n\tvar ngBindHtmlDirective = ['$sce', '$parse', '$compile', function($sce, $parse, $compile) {\n\t return {\n\t restrict: 'A',\n\t compile: function ngBindHtmlCompile(tElement, tAttrs) {\n\t var ngBindHtmlGetter = $parse(tAttrs.ngBindHtml);\n\t var ngBindHtmlWatch = $parse(tAttrs.ngBindHtml, function sceValueOf(val) {\n\t // Unwrap the value to compare the actual inner safe value, not the wrapper object.\n\t return $sce.valueOf(val);\n\t });\n\t $compile.$$addBindingClass(tElement);\n\t\n\t return function ngBindHtmlLink(scope, element, attr) {\n\t $compile.$$addBindingInfo(element, attr.ngBindHtml);\n\t\n\t scope.$watch(ngBindHtmlWatch, function ngBindHtmlWatchAction() {\n\t // The watched value is the unwrapped value. To avoid re-escaping, use the direct getter.\n\t var value = ngBindHtmlGetter(scope);\n\t element.html($sce.getTrustedHtml(value) || '');\n\t });\n\t };\n\t }\n\t };\n\t}];\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngChange\n\t *\n\t * @description\n\t * Evaluate the given expression when the user changes the input.\n\t * The expression is evaluated immediately, unlike the JavaScript onchange event\n\t * which only triggers at the end of a change (usually, when the user leaves the\n\t * form element or presses the return key).\n\t *\n\t * The `ngChange` expression is only evaluated when a change in the input value causes\n\t * a new value to be committed to the model.\n\t *\n\t * It will not be evaluated:\n\t * * if the value returned from the `$parsers` transformation pipeline has not changed\n\t * * if the input has continued to be invalid since the model will stay `null`\n\t * * if the model is changed programmatically and not by a change to the input value\n\t *\n\t *\n\t * Note, this directive requires `ngModel` to be present.\n\t *\n\t * @element input\n\t * @param {expression} ngChange {@link guide/expression Expression} to evaluate upon change\n\t * in input value.\n\t *\n\t * @example\n\t * <example name=\"ngChange-directive\" module=\"changeExample\">\n\t * <file name=\"index.html\">\n\t * <script>\n\t * angular.module('changeExample', [])\n\t * .controller('ExampleController', ['$scope', function($scope) {\n\t * $scope.counter = 0;\n\t * $scope.change = function() {\n\t * $scope.counter++;\n\t * };\n\t * }]);\n\t * </script>\n\t * <div ng-controller=\"ExampleController\">\n\t * <input type=\"checkbox\" ng-model=\"confirmed\" ng-change=\"change()\" id=\"ng-change-example1\" />\n\t * <input type=\"checkbox\" ng-model=\"confirmed\" id=\"ng-change-example2\" />\n\t * <label for=\"ng-change-example2\">Confirmed</label><br />\n\t * <tt>debug = {{confirmed}}</tt><br/>\n\t * <tt>counter = {{counter}}</tt><br/>\n\t * </div>\n\t * </file>\n\t * <file name=\"protractor.js\" type=\"protractor\">\n\t * var counter = element(by.binding('counter'));\n\t * var debug = element(by.binding('confirmed'));\n\t *\n\t * it('should evaluate the expression if changing from view', function() {\n\t * expect(counter.getText()).toContain('0');\n\t *\n\t * element(by.id('ng-change-example1')).click();\n\t *\n\t * expect(counter.getText()).toContain('1');\n\t * expect(debug.getText()).toContain('true');\n\t * });\n\t *\n\t * it('should not evaluate the expression if changing from model', function() {\n\t * element(by.id('ng-change-example2')).click();\n\t\n\t * expect(counter.getText()).toContain('0');\n\t * expect(debug.getText()).toContain('true');\n\t * });\n\t * </file>\n\t * </example>\n\t */\n\tvar ngChangeDirective = valueFn({\n\t restrict: 'A',\n\t require: 'ngModel',\n\t link: function(scope, element, attr, ctrl) {\n\t ctrl.$viewChangeListeners.push(function() {\n\t scope.$eval(attr.ngChange);\n\t });\n\t }\n\t});\n\t\n\tfunction classDirective(name, selector) {\n\t name = 'ngClass' + name;\n\t return ['$animate', function($animate) {\n\t return {\n\t restrict: 'AC',\n\t link: function(scope, element, attr) {\n\t var oldVal;\n\t\n\t scope.$watch(attr[name], ngClassWatchAction, true);\n\t\n\t attr.$observe('class', function(value) {\n\t ngClassWatchAction(scope.$eval(attr[name]));\n\t });\n\t\n\t\n\t if (name !== 'ngClass') {\n\t scope.$watch('$index', function($index, old$index) {\n\t // jshint bitwise: false\n\t var mod = $index & 1;\n\t if (mod !== (old$index & 1)) {\n\t var classes = arrayClasses(scope.$eval(attr[name]));\n\t mod === selector ?\n\t addClasses(classes) :\n\t removeClasses(classes);\n\t }\n\t });\n\t }\n\t\n\t function addClasses(classes) {\n\t var newClasses = digestClassCounts(classes, 1);\n\t attr.$addClass(newClasses);\n\t }\n\t\n\t function removeClasses(classes) {\n\t var newClasses = digestClassCounts(classes, -1);\n\t attr.$removeClass(newClasses);\n\t }\n\t\n\t function digestClassCounts(classes, count) {\n\t // Use createMap() to prevent class assumptions involving property\n\t // names in Object.prototype\n\t var classCounts = element.data('$classCounts') || createMap();\n\t var classesToUpdate = [];\n\t forEach(classes, function(className) {\n\t if (count > 0 || classCounts[className]) {\n\t classCounts[className] = (classCounts[className] || 0) + count;\n\t if (classCounts[className] === +(count > 0)) {\n\t classesToUpdate.push(className);\n\t }\n\t }\n\t });\n\t element.data('$classCounts', classCounts);\n\t return classesToUpdate.join(' ');\n\t }\n\t\n\t function updateClasses(oldClasses, newClasses) {\n\t var toAdd = arrayDifference(newClasses, oldClasses);\n\t var toRemove = arrayDifference(oldClasses, newClasses);\n\t toAdd = digestClassCounts(toAdd, 1);\n\t toRemove = digestClassCounts(toRemove, -1);\n\t if (toAdd && toAdd.length) {\n\t $animate.addClass(element, toAdd);\n\t }\n\t if (toRemove && toRemove.length) {\n\t $animate.removeClass(element, toRemove);\n\t }\n\t }\n\t\n\t function ngClassWatchAction(newVal) {\n\t if (selector === true || scope.$index % 2 === selector) {\n\t var newClasses = arrayClasses(newVal || []);\n\t if (!oldVal) {\n\t addClasses(newClasses);\n\t } else if (!equals(newVal,oldVal)) {\n\t var oldClasses = arrayClasses(oldVal);\n\t updateClasses(oldClasses, newClasses);\n\t }\n\t }\n\t if (isArray(newVal)) {\n\t oldVal = newVal.map(function(v) { return shallowCopy(v); });\n\t } else {\n\t oldVal = shallowCopy(newVal);\n\t }\n\t }\n\t }\n\t };\n\t\n\t function arrayDifference(tokens1, tokens2) {\n\t var values = [];\n\t\n\t outer:\n\t for (var i = 0; i < tokens1.length; i++) {\n\t var token = tokens1[i];\n\t for (var j = 0; j < tokens2.length; j++) {\n\t if (token == tokens2[j]) continue outer;\n\t }\n\t values.push(token);\n\t }\n\t return values;\n\t }\n\t\n\t function arrayClasses(classVal) {\n\t var classes = [];\n\t if (isArray(classVal)) {\n\t forEach(classVal, function(v) {\n\t classes = classes.concat(arrayClasses(v));\n\t });\n\t return classes;\n\t } else if (isString(classVal)) {\n\t return classVal.split(' ');\n\t } else if (isObject(classVal)) {\n\t forEach(classVal, function(v, k) {\n\t if (v) {\n\t classes = classes.concat(k.split(' '));\n\t }\n\t });\n\t return classes;\n\t }\n\t return classVal;\n\t }\n\t }];\n\t}\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngClass\n\t * @restrict AC\n\t *\n\t * @description\n\t * The `ngClass` directive allows you to dynamically set CSS classes on an HTML element by databinding\n\t * an expression that represents all classes to be added.\n\t *\n\t * The directive operates in three different ways, depending on which of three types the expression\n\t * evaluates to:\n\t *\n\t * 1. If the expression evaluates to a string, the string should be one or more space-delimited class\n\t * names.\n\t *\n\t * 2. If the expression evaluates to an object, then for each key-value pair of the\n\t * object with a truthy value the corresponding key is used as a class name.\n\t *\n\t * 3. If the expression evaluates to an array, each element of the array should either be a string as in\n\t * type 1 or an object as in type 2. This means that you can mix strings and objects together in an array\n\t * to give you more control over what CSS classes appear. See the code below for an example of this.\n\t *\n\t *\n\t * The directive won't add duplicate classes if a particular class was already set.\n\t *\n\t * When the expression changes, the previously added classes are removed and only then are the\n\t * new classes added.\n\t *\n\t * @animations\n\t * **add** - happens just before the class is applied to the elements\n\t *\n\t * **remove** - happens just before the class is removed from the element\n\t *\n\t * @element ANY\n\t * @param {expression} ngClass {@link guide/expression Expression} to eval. The result\n\t * of the evaluation can be a string representing space delimited class\n\t * names, an array, or a map of class names to boolean values. In the case of a map, the\n\t * names of the properties whose values are truthy will be added as css classes to the\n\t * element.\n\t *\n\t * @example Example that demonstrates basic bindings via ngClass directive.\n\t <example>\n\t <file name=\"index.html\">\n\t <p ng-class=\"{strike: deleted, bold: important, 'has-error': error}\">Map Syntax Example</p>\n\t <label>\n\t <input type=\"checkbox\" ng-model=\"deleted\">\n\t deleted (apply \"strike\" class)\n\t </label><br>\n\t <label>\n\t <input type=\"checkbox\" ng-model=\"important\">\n\t important (apply \"bold\" class)\n\t </label><br>\n\t <label>\n\t <input type=\"checkbox\" ng-model=\"error\">\n\t error (apply \"has-error\" class)\n\t </label>\n\t <hr>\n\t <p ng-class=\"style\">Using String Syntax</p>\n\t <input type=\"text\" ng-model=\"style\"\n\t placeholder=\"Type: bold strike red\" aria-label=\"Type: bold strike red\">\n\t <hr>\n\t <p ng-class=\"[style1, style2, style3]\">Using Array Syntax</p>\n\t <input ng-model=\"style1\"\n\t placeholder=\"Type: bold, strike or red\" aria-label=\"Type: bold, strike or red\"><br>\n\t <input ng-model=\"style2\"\n\t placeholder=\"Type: bold, strike or red\" aria-label=\"Type: bold, strike or red 2\"><br>\n\t <input ng-model=\"style3\"\n\t placeholder=\"Type: bold, strike or red\" aria-label=\"Type: bold, strike or red 3\"><br>\n\t <hr>\n\t <p ng-class=\"[style4, {orange: warning}]\">Using Array and Map Syntax</p>\n\t <input ng-model=\"style4\" placeholder=\"Type: bold, strike\" aria-label=\"Type: bold, strike\"><br>\n\t <label><input type=\"checkbox\" ng-model=\"warning\"> warning (apply \"orange\" class)</label>\n\t </file>\n\t <file name=\"style.css\">\n\t .strike {\n\t text-decoration: line-through;\n\t }\n\t .bold {\n\t font-weight: bold;\n\t }\n\t .red {\n\t color: red;\n\t }\n\t .has-error {\n\t color: red;\n\t background-color: yellow;\n\t }\n\t .orange {\n\t color: orange;\n\t }\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var ps = element.all(by.css('p'));\n\t\n\t it('should let you toggle the class', function() {\n\t\n\t expect(ps.first().getAttribute('class')).not.toMatch(/bold/);\n\t expect(ps.first().getAttribute('class')).not.toMatch(/has-error/);\n\t\n\t element(by.model('important')).click();\n\t expect(ps.first().getAttribute('class')).toMatch(/bold/);\n\t\n\t element(by.model('error')).click();\n\t expect(ps.first().getAttribute('class')).toMatch(/has-error/);\n\t });\n\t\n\t it('should let you toggle string example', function() {\n\t expect(ps.get(1).getAttribute('class')).toBe('');\n\t element(by.model('style')).clear();\n\t element(by.model('style')).sendKeys('red');\n\t expect(ps.get(1).getAttribute('class')).toBe('red');\n\t });\n\t\n\t it('array example should have 3 classes', function() {\n\t expect(ps.get(2).getAttribute('class')).toBe('');\n\t element(by.model('style1')).sendKeys('bold');\n\t element(by.model('style2')).sendKeys('strike');\n\t element(by.model('style3')).sendKeys('red');\n\t expect(ps.get(2).getAttribute('class')).toBe('bold strike red');\n\t });\n\t\n\t it('array with map example should have 2 classes', function() {\n\t expect(ps.last().getAttribute('class')).toBe('');\n\t element(by.model('style4')).sendKeys('bold');\n\t element(by.model('warning')).click();\n\t expect(ps.last().getAttribute('class')).toBe('bold orange');\n\t });\n\t </file>\n\t </example>\n\t\n\t ## Animations\n\t\n\t The example below demonstrates how to perform animations using ngClass.\n\t\n\t <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n\t <file name=\"index.html\">\n\t <input id=\"setbtn\" type=\"button\" value=\"set\" ng-click=\"myVar='my-class'\">\n\t <input id=\"clearbtn\" type=\"button\" value=\"clear\" ng-click=\"myVar=''\">\n\t <br>\n\t <span class=\"base-class\" ng-class=\"myVar\">Sample Text</span>\n\t </file>\n\t <file name=\"style.css\">\n\t .base-class {\n\t transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\t }\n\t\n\t .base-class.my-class {\n\t color: red;\n\t font-size:3em;\n\t }\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should check ng-class', function() {\n\t expect(element(by.css('.base-class')).getAttribute('class')).not.\n\t toMatch(/my-class/);\n\t\n\t element(by.id('setbtn')).click();\n\t\n\t expect(element(by.css('.base-class')).getAttribute('class')).\n\t toMatch(/my-class/);\n\t\n\t element(by.id('clearbtn')).click();\n\t\n\t expect(element(by.css('.base-class')).getAttribute('class')).not.\n\t toMatch(/my-class/);\n\t });\n\t </file>\n\t </example>\n\t\n\t\n\t ## ngClass and pre-existing CSS3 Transitions/Animations\n\t The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.\n\t Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder\n\t any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure\n\t to view the step by step details of {@link $animate#addClass $animate.addClass} and\n\t {@link $animate#removeClass $animate.removeClass}.\n\t */\n\tvar ngClassDirective = classDirective('', true);\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngClassOdd\n\t * @restrict AC\n\t *\n\t * @description\n\t * The `ngClassOdd` and `ngClassEven` directives work exactly as\n\t * {@link ng.directive:ngClass ngClass}, except they work in\n\t * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n\t *\n\t * This directive can be applied only within the scope of an\n\t * {@link ng.directive:ngRepeat ngRepeat}.\n\t *\n\t * @element ANY\n\t * @param {expression} ngClassOdd {@link guide/expression Expression} to eval. The result\n\t * of the evaluation can be a string representing space delimited class names or an array.\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <ol ng-init=\"names=['John', 'Mary', 'Cate', 'Suz']\">\n\t <li ng-repeat=\"name in names\">\n\t <span ng-class-odd=\"'odd'\" ng-class-even=\"'even'\">\n\t {{name}}\n\t </span>\n\t </li>\n\t </ol>\n\t </file>\n\t <file name=\"style.css\">\n\t .odd {\n\t color: red;\n\t }\n\t .even {\n\t color: blue;\n\t }\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should check ng-class-odd and ng-class-even', function() {\n\t expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n\t toMatch(/odd/);\n\t expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n\t toMatch(/even/);\n\t });\n\t </file>\n\t </example>\n\t */\n\tvar ngClassOddDirective = classDirective('Odd', 0);\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngClassEven\n\t * @restrict AC\n\t *\n\t * @description\n\t * The `ngClassOdd` and `ngClassEven` directives work exactly as\n\t * {@link ng.directive:ngClass ngClass}, except they work in\n\t * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n\t *\n\t * This directive can be applied only within the scope of an\n\t * {@link ng.directive:ngRepeat ngRepeat}.\n\t *\n\t * @element ANY\n\t * @param {expression} ngClassEven {@link guide/expression Expression} to eval. The\n\t * result of the evaluation can be a string representing space delimited class names or an array.\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <ol ng-init=\"names=['John', 'Mary', 'Cate', 'Suz']\">\n\t <li ng-repeat=\"name in names\">\n\t <span ng-class-odd=\"'odd'\" ng-class-even=\"'even'\">\n\t {{name}} &nbsp; &nbsp; &nbsp;\n\t </span>\n\t </li>\n\t </ol>\n\t </file>\n\t <file name=\"style.css\">\n\t .odd {\n\t color: red;\n\t }\n\t .even {\n\t color: blue;\n\t }\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should check ng-class-odd and ng-class-even', function() {\n\t expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n\t toMatch(/odd/);\n\t expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n\t toMatch(/even/);\n\t });\n\t </file>\n\t </example>\n\t */\n\tvar ngClassEvenDirective = classDirective('Even', 1);\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngCloak\n\t * @restrict AC\n\t *\n\t * @description\n\t * The `ngCloak` directive is used to prevent the Angular html template from being briefly\n\t * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this\n\t * directive to avoid the undesirable flicker effect caused by the html template display.\n\t *\n\t * The directive can be applied to the `<body>` element, but the preferred usage is to apply\n\t * multiple `ngCloak` directives to small portions of the page to permit progressive rendering\n\t * of the browser view.\n\t *\n\t * `ngCloak` works in cooperation with the following css rule embedded within `angular.js` and\n\t * `angular.min.js`.\n\t * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n\t *\n\t * ```css\n\t * [ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {\n\t * display: none !important;\n\t * }\n\t * ```\n\t *\n\t * When this css rule is loaded by the browser, all html elements (including their children) that\n\t * are tagged with the `ngCloak` directive are hidden. When Angular encounters this directive\n\t * during the compilation of the template it deletes the `ngCloak` element attribute, making\n\t * the compiled element visible.\n\t *\n\t * For the best result, the `angular.js` script must be loaded in the head section of the html\n\t * document; alternatively, the css rule above must be included in the external stylesheet of the\n\t * application.\n\t *\n\t * @element ANY\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <div id=\"template1\" ng-cloak>{{ 'hello' }}</div>\n\t <div id=\"template2\" class=\"ng-cloak\">{{ 'world' }}</div>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should remove the template directive and css class', function() {\n\t expect($('#template1').getAttribute('ng-cloak')).\n\t toBeNull();\n\t expect($('#template2').getAttribute('ng-cloak')).\n\t toBeNull();\n\t });\n\t </file>\n\t </example>\n\t *\n\t */\n\tvar ngCloakDirective = ngDirective({\n\t compile: function(element, attr) {\n\t attr.$set('ngCloak', undefined);\n\t element.removeClass('ng-cloak');\n\t }\n\t});\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngController\n\t *\n\t * @description\n\t * The `ngController` directive attaches a controller class to the view. This is a key aspect of how angular\n\t * supports the principles behind the Model-View-Controller design pattern.\n\t *\n\t * MVC components in angular:\n\t *\n\t * * Model — Models are the properties of a scope; scopes are attached to the DOM where scope properties\n\t * are accessed through bindings.\n\t * * View — The template (HTML with data bindings) that is rendered into the View.\n\t * * Controller — The `ngController` directive specifies a Controller class; the class contains business\n\t * logic behind the application to decorate the scope with functions and values\n\t *\n\t * Note that you can also attach controllers to the DOM by declaring it in a route definition\n\t * via the {@link ngRoute.$route $route} service. A common mistake is to declare the controller\n\t * again using `ng-controller` in the template itself. This will cause the controller to be attached\n\t * and executed twice.\n\t *\n\t * @element ANY\n\t * @scope\n\t * @priority 500\n\t * @param {expression} ngController Name of a constructor function registered with the current\n\t * {@link ng.$controllerProvider $controllerProvider} or an {@link guide/expression expression}\n\t * that on the current scope evaluates to a constructor function.\n\t *\n\t * The controller instance can be published into a scope property by specifying\n\t * `ng-controller=\"as propertyName\"`.\n\t *\n\t * If the current `$controllerProvider` is configured to use globals (via\n\t * {@link ng.$controllerProvider#allowGlobals `$controllerProvider.allowGlobals()` }), this may\n\t * also be the name of a globally accessible constructor function (not recommended).\n\t *\n\t * @example\n\t * Here is a simple form for editing user contact information. Adding, removing, clearing, and\n\t * greeting are methods declared on the controller (see source tab). These methods can\n\t * easily be called from the angular markup. Any changes to the data are automatically reflected\n\t * in the View without the need for a manual update.\n\t *\n\t * Two different declaration styles are included below:\n\t *\n\t * * one binds methods and properties directly onto the controller using `this`:\n\t * `ng-controller=\"SettingsController1 as settings\"`\n\t * * one injects `$scope` into the controller:\n\t * `ng-controller=\"SettingsController2\"`\n\t *\n\t * The second option is more common in the Angular community, and is generally used in boilerplates\n\t * and in this guide. However, there are advantages to binding properties directly to the controller\n\t * and avoiding scope.\n\t *\n\t * * Using `controller as` makes it obvious which controller you are accessing in the template when\n\t * multiple controllers apply to an element.\n\t * * If you are writing your controllers as classes you have easier access to the properties and\n\t * methods, which will appear on the scope, from inside the controller code.\n\t * * Since there is always a `.` in the bindings, you don't have to worry about prototypal\n\t * inheritance masking primitives.\n\t *\n\t * This example demonstrates the `controller as` syntax.\n\t *\n\t * <example name=\"ngControllerAs\" module=\"controllerAsExample\">\n\t * <file name=\"index.html\">\n\t * <div id=\"ctrl-as-exmpl\" ng-controller=\"SettingsController1 as settings\">\n\t * <label>Name: <input type=\"text\" ng-model=\"settings.name\"/></label>\n\t * <button ng-click=\"settings.greet()\">greet</button><br/>\n\t * Contact:\n\t * <ul>\n\t * <li ng-repeat=\"contact in settings.contacts\">\n\t * <select ng-model=\"contact.type\" aria-label=\"Contact method\" id=\"select_{{$index}}\">\n\t * <option>phone</option>\n\t * <option>email</option>\n\t * </select>\n\t * <input type=\"text\" ng-model=\"contact.value\" aria-labelledby=\"select_{{$index}}\" />\n\t * <button ng-click=\"settings.clearContact(contact)\">clear</button>\n\t * <button ng-click=\"settings.removeContact(contact)\" aria-label=\"Remove\">X</button>\n\t * </li>\n\t * <li><button ng-click=\"settings.addContact()\">add</button></li>\n\t * </ul>\n\t * </div>\n\t * </file>\n\t * <file name=\"app.js\">\n\t * angular.module('controllerAsExample', [])\n\t * .controller('SettingsController1', SettingsController1);\n\t *\n\t * function SettingsController1() {\n\t * this.name = \"John Smith\";\n\t * this.contacts = [\n\t * {type: 'phone', value: '408 555 1212'},\n\t * {type: 'email', value: 'john.smith@example.org'} ];\n\t * }\n\t *\n\t * SettingsController1.prototype.greet = function() {\n\t * alert(this.name);\n\t * };\n\t *\n\t * SettingsController1.prototype.addContact = function() {\n\t * this.contacts.push({type: 'email', value: 'yourname@example.org'});\n\t * };\n\t *\n\t * SettingsController1.prototype.removeContact = function(contactToRemove) {\n\t * var index = this.contacts.indexOf(contactToRemove);\n\t * this.contacts.splice(index, 1);\n\t * };\n\t *\n\t * SettingsController1.prototype.clearContact = function(contact) {\n\t * contact.type = 'phone';\n\t * contact.value = '';\n\t * };\n\t * </file>\n\t * <file name=\"protractor.js\" type=\"protractor\">\n\t * it('should check controller as', function() {\n\t * var container = element(by.id('ctrl-as-exmpl'));\n\t * expect(container.element(by.model('settings.name'))\n\t * .getAttribute('value')).toBe('John Smith');\n\t *\n\t * var firstRepeat =\n\t * container.element(by.repeater('contact in settings.contacts').row(0));\n\t * var secondRepeat =\n\t * container.element(by.repeater('contact in settings.contacts').row(1));\n\t *\n\t * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n\t * .toBe('408 555 1212');\n\t *\n\t * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))\n\t * .toBe('john.smith@example.org');\n\t *\n\t * firstRepeat.element(by.buttonText('clear')).click();\n\t *\n\t * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n\t * .toBe('');\n\t *\n\t * container.element(by.buttonText('add')).click();\n\t *\n\t * expect(container.element(by.repeater('contact in settings.contacts').row(2))\n\t * .element(by.model('contact.value'))\n\t * .getAttribute('value'))\n\t * .toBe('yourname@example.org');\n\t * });\n\t * </file>\n\t * </example>\n\t *\n\t * This example demonstrates the \"attach to `$scope`\" style of controller.\n\t *\n\t * <example name=\"ngController\" module=\"controllerExample\">\n\t * <file name=\"index.html\">\n\t * <div id=\"ctrl-exmpl\" ng-controller=\"SettingsController2\">\n\t * <label>Name: <input type=\"text\" ng-model=\"name\"/></label>\n\t * <button ng-click=\"greet()\">greet</button><br/>\n\t * Contact:\n\t * <ul>\n\t * <li ng-repeat=\"contact in contacts\">\n\t * <select ng-model=\"contact.type\" id=\"select_{{$index}}\">\n\t * <option>phone</option>\n\t * <option>email</option>\n\t * </select>\n\t * <input type=\"text\" ng-model=\"contact.value\" aria-labelledby=\"select_{{$index}}\" />\n\t * <button ng-click=\"clearContact(contact)\">clear</button>\n\t * <button ng-click=\"removeContact(contact)\">X</button>\n\t * </li>\n\t * <li>[ <button ng-click=\"addContact()\">add</button> ]</li>\n\t * </ul>\n\t * </div>\n\t * </file>\n\t * <file name=\"app.js\">\n\t * angular.module('controllerExample', [])\n\t * .controller('SettingsController2', ['$scope', SettingsController2]);\n\t *\n\t * function SettingsController2($scope) {\n\t * $scope.name = \"John Smith\";\n\t * $scope.contacts = [\n\t * {type:'phone', value:'408 555 1212'},\n\t * {type:'email', value:'john.smith@example.org'} ];\n\t *\n\t * $scope.greet = function() {\n\t * alert($scope.name);\n\t * };\n\t *\n\t * $scope.addContact = function() {\n\t * $scope.contacts.push({type:'email', value:'yourname@example.org'});\n\t * };\n\t *\n\t * $scope.removeContact = function(contactToRemove) {\n\t * var index = $scope.contacts.indexOf(contactToRemove);\n\t * $scope.contacts.splice(index, 1);\n\t * };\n\t *\n\t * $scope.clearContact = function(contact) {\n\t * contact.type = 'phone';\n\t * contact.value = '';\n\t * };\n\t * }\n\t * </file>\n\t * <file name=\"protractor.js\" type=\"protractor\">\n\t * it('should check controller', function() {\n\t * var container = element(by.id('ctrl-exmpl'));\n\t *\n\t * expect(container.element(by.model('name'))\n\t * .getAttribute('value')).toBe('John Smith');\n\t *\n\t * var firstRepeat =\n\t * container.element(by.repeater('contact in contacts').row(0));\n\t * var secondRepeat =\n\t * container.element(by.repeater('contact in contacts').row(1));\n\t *\n\t * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n\t * .toBe('408 555 1212');\n\t * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))\n\t * .toBe('john.smith@example.org');\n\t *\n\t * firstRepeat.element(by.buttonText('clear')).click();\n\t *\n\t * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n\t * .toBe('');\n\t *\n\t * container.element(by.buttonText('add')).click();\n\t *\n\t * expect(container.element(by.repeater('contact in contacts').row(2))\n\t * .element(by.model('contact.value'))\n\t * .getAttribute('value'))\n\t * .toBe('yourname@example.org');\n\t * });\n\t * </file>\n\t *</example>\n\t\n\t */\n\tvar ngControllerDirective = [function() {\n\t return {\n\t restrict: 'A',\n\t scope: true,\n\t controller: '@',\n\t priority: 500\n\t };\n\t}];\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngCsp\n\t *\n\t * @element html\n\t * @description\n\t *\n\t * Angular has some features that can break certain\n\t * [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) rules.\n\t *\n\t * If you intend to implement these rules then you must tell Angular not to use these features.\n\t *\n\t * This is necessary when developing things like Google Chrome Extensions or Universal Windows Apps.\n\t *\n\t *\n\t * The following rules affect Angular:\n\t *\n\t * * `unsafe-eval`: this rule forbids apps to use `eval` or `Function(string)` generated functions\n\t * (among other things). Angular makes use of this in the {@link $parse} service to provide a 30%\n\t * increase in the speed of evaluating Angular expressions.\n\t *\n\t * * `unsafe-inline`: this rule forbids apps from inject custom styles into the document. Angular\n\t * makes use of this to include some CSS rules (e.g. {@link ngCloak} and {@link ngHide}).\n\t * To make these directives work when a CSP rule is blocking inline styles, you must link to the\n\t * `angular-csp.css` in your HTML manually.\n\t *\n\t * If you do not provide `ngCsp` then Angular tries to autodetect if CSP is blocking unsafe-eval\n\t * and automatically deactivates this feature in the {@link $parse} service. This autodetection,\n\t * however, triggers a CSP error to be logged in the console:\n\t *\n\t * ```\n\t * Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of\n\t * script in the following Content Security Policy directive: \"default-src 'self'\". Note that\n\t * 'script-src' was not explicitly set, so 'default-src' is used as a fallback.\n\t * ```\n\t *\n\t * This error is harmless but annoying. To prevent the error from showing up, put the `ngCsp`\n\t * directive on an element of the HTML document that appears before the `<script>` tag that loads\n\t * the `angular.js` file.\n\t *\n\t * *Note: This directive is only available in the `ng-csp` and `data-ng-csp` attribute form.*\n\t *\n\t * You can specify which of the CSP related Angular features should be deactivated by providing\n\t * a value for the `ng-csp` attribute. The options are as follows:\n\t *\n\t * * no-inline-style: this stops Angular from injecting CSS styles into the DOM\n\t *\n\t * * no-unsafe-eval: this stops Angular from optimising $parse with unsafe eval of strings\n\t *\n\t * You can use these values in the following combinations:\n\t *\n\t *\n\t * * No declaration means that Angular will assume that you can do inline styles, but it will do\n\t * a runtime check for unsafe-eval. E.g. `<body>`. This is backwardly compatible with previous versions\n\t * of Angular.\n\t *\n\t * * A simple `ng-csp` (or `data-ng-csp`) attribute will tell Angular to deactivate both inline\n\t * styles and unsafe eval. E.g. `<body ng-csp>`. This is backwardly compatible with previous versions\n\t * of Angular.\n\t *\n\t * * Specifying only `no-unsafe-eval` tells Angular that we must not use eval, but that we can inject\n\t * inline styles. E.g. `<body ng-csp=\"no-unsafe-eval\">`.\n\t *\n\t * * Specifying only `no-inline-style` tells Angular that we must not inject styles, but that we can\n\t * run eval - no automcatic check for unsafe eval will occur. E.g. `<body ng-csp=\"no-inline-style\">`\n\t *\n\t * * Specifying both `no-unsafe-eval` and `no-inline-style` tells Angular that we must not inject\n\t * styles nor use eval, which is the same as an empty: ng-csp.\n\t * E.g.`<body ng-csp=\"no-inline-style;no-unsafe-eval\">`\n\t *\n\t * @example\n\t * This example shows how to apply the `ngCsp` directive to the `html` tag.\n\t ```html\n\t <!doctype html>\n\t <html ng-app ng-csp>\n\t ...\n\t ...\n\t </html>\n\t ```\n\t * @example\n\t // Note: the suffix `.csp` in the example name triggers\n\t // csp mode in our http server!\n\t <example name=\"example.csp\" module=\"cspExample\" ng-csp=\"true\">\n\t <file name=\"index.html\">\n\t <div ng-controller=\"MainController as ctrl\">\n\t <div>\n\t <button ng-click=\"ctrl.inc()\" id=\"inc\">Increment</button>\n\t <span id=\"counter\">\n\t {{ctrl.counter}}\n\t </span>\n\t </div>\n\t\n\t <div>\n\t <button ng-click=\"ctrl.evil()\" id=\"evil\">Evil</button>\n\t <span id=\"evilError\">\n\t {{ctrl.evilError}}\n\t </span>\n\t </div>\n\t </div>\n\t </file>\n\t <file name=\"script.js\">\n\t angular.module('cspExample', [])\n\t .controller('MainController', function() {\n\t this.counter = 0;\n\t this.inc = function() {\n\t this.counter++;\n\t };\n\t this.evil = function() {\n\t // jshint evil:true\n\t try {\n\t eval('1+2');\n\t } catch (e) {\n\t this.evilError = e.message;\n\t }\n\t };\n\t });\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var util, webdriver;\n\t\n\t var incBtn = element(by.id('inc'));\n\t var counter = element(by.id('counter'));\n\t var evilBtn = element(by.id('evil'));\n\t var evilError = element(by.id('evilError'));\n\t\n\t function getAndClearSevereErrors() {\n\t return browser.manage().logs().get('browser').then(function(browserLog) {\n\t return browserLog.filter(function(logEntry) {\n\t return logEntry.level.value > webdriver.logging.Level.WARNING.value;\n\t });\n\t });\n\t }\n\t\n\t function clearErrors() {\n\t getAndClearSevereErrors();\n\t }\n\t\n\t function expectNoErrors() {\n\t getAndClearSevereErrors().then(function(filteredLog) {\n\t expect(filteredLog.length).toEqual(0);\n\t if (filteredLog.length) {\n\t console.log('browser console errors: ' + util.inspect(filteredLog));\n\t }\n\t });\n\t }\n\t\n\t function expectError(regex) {\n\t getAndClearSevereErrors().then(function(filteredLog) {\n\t var found = false;\n\t filteredLog.forEach(function(log) {\n\t if (log.message.match(regex)) {\n\t found = true;\n\t }\n\t });\n\t if (!found) {\n\t throw new Error('expected an error that matches ' + regex);\n\t }\n\t });\n\t }\n\t\n\t beforeEach(function() {\n\t util = require('util');\n\t webdriver = require('protractor/node_modules/selenium-webdriver');\n\t });\n\t\n\t // For now, we only test on Chrome,\n\t // as Safari does not load the page with Protractor's injected scripts,\n\t // and Firefox webdriver always disables content security policy (#6358)\n\t if (browser.params.browser !== 'chrome') {\n\t return;\n\t }\n\t\n\t it('should not report errors when the page is loaded', function() {\n\t // clear errors so we are not dependent on previous tests\n\t clearErrors();\n\t // Need to reload the page as the page is already loaded when\n\t // we come here\n\t browser.driver.getCurrentUrl().then(function(url) {\n\t browser.get(url);\n\t });\n\t expectNoErrors();\n\t });\n\t\n\t it('should evaluate expressions', function() {\n\t expect(counter.getText()).toEqual('0');\n\t incBtn.click();\n\t expect(counter.getText()).toEqual('1');\n\t expectNoErrors();\n\t });\n\t\n\t it('should throw and report an error when using \"eval\"', function() {\n\t evilBtn.click();\n\t expect(evilError.getText()).toMatch(/Content Security Policy/);\n\t expectError(/Content Security Policy/);\n\t });\n\t </file>\n\t </example>\n\t */\n\t\n\t// ngCsp is not implemented as a proper directive any more, because we need it be processed while we\n\t// bootstrap the system (before $parse is instantiated), for this reason we just have\n\t// the csp() fn that looks for the `ng-csp` attribute anywhere in the current doc\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngClick\n\t *\n\t * @description\n\t * The ngClick directive allows you to specify custom behavior when\n\t * an element is clicked.\n\t *\n\t * @element ANY\n\t * @priority 0\n\t * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon\n\t * click. ({@link guide/expression#-event- Event object is available as `$event`})\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <button ng-click=\"count = count + 1\" ng-init=\"count=0\">\n\t Increment\n\t </button>\n\t <span>\n\t count: {{count}}\n\t </span>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should check ng-click', function() {\n\t expect(element(by.binding('count')).getText()).toMatch('0');\n\t element(by.css('button')).click();\n\t expect(element(by.binding('count')).getText()).toMatch('1');\n\t });\n\t </file>\n\t </example>\n\t */\n\t/*\n\t * A collection of directives that allows creation of custom event handlers that are defined as\n\t * angular expressions and are compiled and executed within the current scope.\n\t */\n\tvar ngEventDirectives = {};\n\t\n\t// For events that might fire synchronously during DOM manipulation\n\t// we need to execute their event handlers asynchronously using $evalAsync,\n\t// so that they are not executed in an inconsistent state.\n\tvar forceAsyncEvents = {\n\t 'blur': true,\n\t 'focus': true\n\t};\n\tforEach(\n\t 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),\n\t function(eventName) {\n\t var directiveName = directiveNormalize('ng-' + eventName);\n\t ngEventDirectives[directiveName] = ['$parse', '$rootScope', function($parse, $rootScope) {\n\t return {\n\t restrict: 'A',\n\t compile: function($element, attr) {\n\t // We expose the powerful $event object on the scope that provides access to the Window,\n\t // etc. that isn't protected by the fast paths in $parse. We explicitly request better\n\t // checks at the cost of speed since event handler expressions are not executed as\n\t // frequently as regular change detection.\n\t var fn = $parse(attr[directiveName], /* interceptorFn */ null, /* expensiveChecks */ true);\n\t return function ngEventHandler(scope, element) {\n\t element.on(eventName, function(event) {\n\t var callback = function() {\n\t fn(scope, {$event:event});\n\t };\n\t if (forceAsyncEvents[eventName] && $rootScope.$$phase) {\n\t scope.$evalAsync(callback);\n\t } else {\n\t scope.$apply(callback);\n\t }\n\t });\n\t };\n\t }\n\t };\n\t }];\n\t }\n\t);\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngDblclick\n\t *\n\t * @description\n\t * The `ngDblclick` directive allows you to specify custom behavior on a dblclick event.\n\t *\n\t * @element ANY\n\t * @priority 0\n\t * @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon\n\t * a dblclick. (The Event object is available as `$event`)\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <button ng-dblclick=\"count = count + 1\" ng-init=\"count=0\">\n\t Increment (on double click)\n\t </button>\n\t count: {{count}}\n\t </file>\n\t </example>\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngMousedown\n\t *\n\t * @description\n\t * The ngMousedown directive allows you to specify custom behavior on mousedown event.\n\t *\n\t * @element ANY\n\t * @priority 0\n\t * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon\n\t * mousedown. ({@link guide/expression#-event- Event object is available as `$event`})\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <button ng-mousedown=\"count = count + 1\" ng-init=\"count=0\">\n\t Increment (on mouse down)\n\t </button>\n\t count: {{count}}\n\t </file>\n\t </example>\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngMouseup\n\t *\n\t * @description\n\t * Specify custom behavior on mouseup event.\n\t *\n\t * @element ANY\n\t * @priority 0\n\t * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon\n\t * mouseup. ({@link guide/expression#-event- Event object is available as `$event`})\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <button ng-mouseup=\"count = count + 1\" ng-init=\"count=0\">\n\t Increment (on mouse up)\n\t </button>\n\t count: {{count}}\n\t </file>\n\t </example>\n\t */\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngMouseover\n\t *\n\t * @description\n\t * Specify custom behavior on mouseover event.\n\t *\n\t * @element ANY\n\t * @priority 0\n\t * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon\n\t * mouseover. ({@link guide/expression#-event- Event object is available as `$event`})\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <button ng-mouseover=\"count = count + 1\" ng-init=\"count=0\">\n\t Increment (when mouse is over)\n\t </button>\n\t count: {{count}}\n\t </file>\n\t </example>\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngMouseenter\n\t *\n\t * @description\n\t * Specify custom behavior on mouseenter event.\n\t *\n\t * @element ANY\n\t * @priority 0\n\t * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon\n\t * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`})\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <button ng-mouseenter=\"count = count + 1\" ng-init=\"count=0\">\n\t Increment (when mouse enters)\n\t </button>\n\t count: {{count}}\n\t </file>\n\t </example>\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngMouseleave\n\t *\n\t * @description\n\t * Specify custom behavior on mouseleave event.\n\t *\n\t * @element ANY\n\t * @priority 0\n\t * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon\n\t * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`})\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <button ng-mouseleave=\"count = count + 1\" ng-init=\"count=0\">\n\t Increment (when mouse leaves)\n\t </button>\n\t count: {{count}}\n\t </file>\n\t </example>\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngMousemove\n\t *\n\t * @description\n\t * Specify custom behavior on mousemove event.\n\t *\n\t * @element ANY\n\t * @priority 0\n\t * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon\n\t * mousemove. ({@link guide/expression#-event- Event object is available as `$event`})\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <button ng-mousemove=\"count = count + 1\" ng-init=\"count=0\">\n\t Increment (when mouse moves)\n\t </button>\n\t count: {{count}}\n\t </file>\n\t </example>\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngKeydown\n\t *\n\t * @description\n\t * Specify custom behavior on keydown event.\n\t *\n\t * @element ANY\n\t * @priority 0\n\t * @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon\n\t * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <input ng-keydown=\"count = count + 1\" ng-init=\"count=0\">\n\t key down count: {{count}}\n\t </file>\n\t </example>\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngKeyup\n\t *\n\t * @description\n\t * Specify custom behavior on keyup event.\n\t *\n\t * @element ANY\n\t * @priority 0\n\t * @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon\n\t * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <p>Typing in the input box below updates the key count</p>\n\t <input ng-keyup=\"count = count + 1\" ng-init=\"count=0\"> key up count: {{count}}\n\t\n\t <p>Typing in the input box below updates the keycode</p>\n\t <input ng-keyup=\"event=$event\">\n\t <p>event keyCode: {{ event.keyCode }}</p>\n\t <p>event altKey: {{ event.altKey }}</p>\n\t </file>\n\t </example>\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngKeypress\n\t *\n\t * @description\n\t * Specify custom behavior on keypress event.\n\t *\n\t * @element ANY\n\t * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon\n\t * keypress. ({@link guide/expression#-event- Event object is available as `$event`}\n\t * and can be interrogated for keyCode, altKey, etc.)\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <input ng-keypress=\"count = count + 1\" ng-init=\"count=0\">\n\t key press count: {{count}}\n\t </file>\n\t </example>\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngSubmit\n\t *\n\t * @description\n\t * Enables binding angular expressions to onsubmit events.\n\t *\n\t * Additionally it prevents the default action (which for form means sending the request to the\n\t * server and reloading the current page), but only if the form does not contain `action`,\n\t * `data-action`, or `x-action` attributes.\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * **Warning:** Be careful not to cause \"double-submission\" by using both the `ngClick` and\n\t * `ngSubmit` handlers together. See the\n\t * {@link form#submitting-a-form-and-preventing-the-default-action `form` directive documentation}\n\t * for a detailed discussion of when `ngSubmit` may be triggered.\n\t * </div>\n\t *\n\t * @element form\n\t * @priority 0\n\t * @param {expression} ngSubmit {@link guide/expression Expression} to eval.\n\t * ({@link guide/expression#-event- Event object is available as `$event`})\n\t *\n\t * @example\n\t <example module=\"submitExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('submitExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.list = [];\n\t $scope.text = 'hello';\n\t $scope.submit = function() {\n\t if ($scope.text) {\n\t $scope.list.push(this.text);\n\t $scope.text = '';\n\t }\n\t };\n\t }]);\n\t </script>\n\t <form ng-submit=\"submit()\" ng-controller=\"ExampleController\">\n\t Enter text and hit enter:\n\t <input type=\"text\" ng-model=\"text\" name=\"text\" />\n\t <input type=\"submit\" id=\"submit\" value=\"Submit\" />\n\t <pre>list={{list}}</pre>\n\t </form>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should check ng-submit', function() {\n\t expect(element(by.binding('list')).getText()).toBe('list=[]');\n\t element(by.css('#submit')).click();\n\t expect(element(by.binding('list')).getText()).toContain('hello');\n\t expect(element(by.model('text')).getAttribute('value')).toBe('');\n\t });\n\t it('should ignore empty strings', function() {\n\t expect(element(by.binding('list')).getText()).toBe('list=[]');\n\t element(by.css('#submit')).click();\n\t element(by.css('#submit')).click();\n\t expect(element(by.binding('list')).getText()).toContain('hello');\n\t });\n\t </file>\n\t </example>\n\t */\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngFocus\n\t *\n\t * @description\n\t * Specify custom behavior on focus event.\n\t *\n\t * Note: As the `focus` event is executed synchronously when calling `input.focus()`\n\t * AngularJS executes the expression using `scope.$evalAsync` if the event is fired\n\t * during an `$apply` to ensure a consistent state.\n\t *\n\t * @element window, input, select, textarea, a\n\t * @priority 0\n\t * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon\n\t * focus. ({@link guide/expression#-event- Event object is available as `$event`})\n\t *\n\t * @example\n\t * See {@link ng.directive:ngClick ngClick}\n\t */\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngBlur\n\t *\n\t * @description\n\t * Specify custom behavior on blur event.\n\t *\n\t * A [blur event](https://developer.mozilla.org/en-US/docs/Web/Events/blur) fires when\n\t * an element has lost focus.\n\t *\n\t * Note: As the `blur` event is executed synchronously also during DOM manipulations\n\t * (e.g. removing a focussed input),\n\t * AngularJS executes the expression using `scope.$evalAsync` if the event is fired\n\t * during an `$apply` to ensure a consistent state.\n\t *\n\t * @element window, input, select, textarea, a\n\t * @priority 0\n\t * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon\n\t * blur. ({@link guide/expression#-event- Event object is available as `$event`})\n\t *\n\t * @example\n\t * See {@link ng.directive:ngClick ngClick}\n\t */\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngCopy\n\t *\n\t * @description\n\t * Specify custom behavior on copy event.\n\t *\n\t * @element window, input, select, textarea, a\n\t * @priority 0\n\t * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon\n\t * copy. ({@link guide/expression#-event- Event object is available as `$event`})\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <input ng-copy=\"copied=true\" ng-init=\"copied=false; value='copy me'\" ng-model=\"value\">\n\t copied: {{copied}}\n\t </file>\n\t </example>\n\t */\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngCut\n\t *\n\t * @description\n\t * Specify custom behavior on cut event.\n\t *\n\t * @element window, input, select, textarea, a\n\t * @priority 0\n\t * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon\n\t * cut. ({@link guide/expression#-event- Event object is available as `$event`})\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <input ng-cut=\"cut=true\" ng-init=\"cut=false; value='cut me'\" ng-model=\"value\">\n\t cut: {{cut}}\n\t </file>\n\t </example>\n\t */\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngPaste\n\t *\n\t * @description\n\t * Specify custom behavior on paste event.\n\t *\n\t * @element window, input, select, textarea, a\n\t * @priority 0\n\t * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon\n\t * paste. ({@link guide/expression#-event- Event object is available as `$event`})\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <input ng-paste=\"paste=true\" ng-init=\"paste=false\" placeholder='paste here'>\n\t pasted: {{paste}}\n\t </file>\n\t </example>\n\t */\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngIf\n\t * @restrict A\n\t * @multiElement\n\t *\n\t * @description\n\t * The `ngIf` directive removes or recreates a portion of the DOM tree based on an\n\t * {expression}. If the expression assigned to `ngIf` evaluates to a false\n\t * value then the element is removed from the DOM, otherwise a clone of the\n\t * element is reinserted into the DOM.\n\t *\n\t * `ngIf` differs from `ngShow` and `ngHide` in that `ngIf` completely removes and recreates the\n\t * element in the DOM rather than changing its visibility via the `display` css property. A common\n\t * case when this difference is significant is when using css selectors that rely on an element's\n\t * position within the DOM, such as the `:first-child` or `:last-child` pseudo-classes.\n\t *\n\t * Note that when an element is removed using `ngIf` its scope is destroyed and a new scope\n\t * is created when the element is restored. The scope created within `ngIf` inherits from\n\t * its parent scope using\n\t * [prototypal inheritance](https://github.com/angular/angular.js/wiki/Understanding-Scopes#javascript-prototypal-inheritance).\n\t * An important implication of this is if `ngModel` is used within `ngIf` to bind to\n\t * a javascript primitive defined in the parent scope. In this case any modifications made to the\n\t * variable within the child scope will override (hide) the value in the parent scope.\n\t *\n\t * Also, `ngIf` recreates elements using their compiled state. An example of this behavior\n\t * is if an element's class attribute is directly modified after it's compiled, using something like\n\t * jQuery's `.addClass()` method, and the element is later removed. When `ngIf` recreates the element\n\t * the added class will be lost because the original compiled state is used to regenerate the element.\n\t *\n\t * Additionally, you can provide animations via the `ngAnimate` module to animate the `enter`\n\t * and `leave` effects.\n\t *\n\t * @animations\n\t * enter - happens just after the `ngIf` contents change and a new DOM element is created and injected into the `ngIf` container\n\t * leave - happens just before the `ngIf` contents are removed from the DOM\n\t *\n\t * @element ANY\n\t * @scope\n\t * @priority 600\n\t * @param {expression} ngIf If the {@link guide/expression expression} is falsy then\n\t * the element is removed from the DOM tree. If it is truthy a copy of the compiled\n\t * element is added to the DOM tree.\n\t *\n\t * @example\n\t <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n\t <file name=\"index.html\">\n\t <label>Click me: <input type=\"checkbox\" ng-model=\"checked\" ng-init=\"checked=true\" /></label><br/>\n\t Show when checked:\n\t <span ng-if=\"checked\" class=\"animate-if\">\n\t This is removed when the checkbox is unchecked.\n\t </span>\n\t </file>\n\t <file name=\"animations.css\">\n\t .animate-if {\n\t background:white;\n\t border:1px solid black;\n\t padding:10px;\n\t }\n\t\n\t .animate-if.ng-enter, .animate-if.ng-leave {\n\t transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\t }\n\t\n\t .animate-if.ng-enter,\n\t .animate-if.ng-leave.ng-leave-active {\n\t opacity:0;\n\t }\n\t\n\t .animate-if.ng-leave,\n\t .animate-if.ng-enter.ng-enter-active {\n\t opacity:1;\n\t }\n\t </file>\n\t </example>\n\t */\n\tvar ngIfDirective = ['$animate', function($animate) {\n\t return {\n\t multiElement: true,\n\t transclude: 'element',\n\t priority: 600,\n\t terminal: true,\n\t restrict: 'A',\n\t $$tlb: true,\n\t link: function($scope, $element, $attr, ctrl, $transclude) {\n\t var block, childScope, previousElements;\n\t $scope.$watch($attr.ngIf, function ngIfWatchAction(value) {\n\t\n\t if (value) {\n\t if (!childScope) {\n\t $transclude(function(clone, newScope) {\n\t childScope = newScope;\n\t clone[clone.length++] = document.createComment(' end ngIf: ' + $attr.ngIf + ' ');\n\t // Note: We only need the first/last node of the cloned nodes.\n\t // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n\t // by a directive with templateUrl when its template arrives.\n\t block = {\n\t clone: clone\n\t };\n\t $animate.enter(clone, $element.parent(), $element);\n\t });\n\t }\n\t } else {\n\t if (previousElements) {\n\t previousElements.remove();\n\t previousElements = null;\n\t }\n\t if (childScope) {\n\t childScope.$destroy();\n\t childScope = null;\n\t }\n\t if (block) {\n\t previousElements = getBlockNodes(block.clone);\n\t $animate.leave(previousElements).then(function() {\n\t previousElements = null;\n\t });\n\t block = null;\n\t }\n\t }\n\t });\n\t }\n\t };\n\t}];\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngInclude\n\t * @restrict ECA\n\t *\n\t * @description\n\t * Fetches, compiles and includes an external HTML fragment.\n\t *\n\t * By default, the template URL is restricted to the same domain and protocol as the\n\t * application document. This is done by calling {@link $sce#getTrustedResourceUrl\n\t * $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols\n\t * you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist them} or\n\t * {@link $sce#trustAsResourceUrl wrap them} as trusted values. Refer to Angular's {@link\n\t * ng.$sce Strict Contextual Escaping}.\n\t *\n\t * In addition, the browser's\n\t * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n\t * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n\t * policy may further restrict whether the template is successfully loaded.\n\t * For example, `ngInclude` won't work for cross-domain requests on all browsers and for `file://`\n\t * access on some browsers.\n\t *\n\t * @animations\n\t * enter - animation is used to bring new content into the browser.\n\t * leave - animation is used to animate existing content away.\n\t *\n\t * The enter and leave animation occur concurrently.\n\t *\n\t * @scope\n\t * @priority 400\n\t *\n\t * @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant,\n\t * make sure you wrap it in **single** quotes, e.g. `src=\"'myPartialTemplate.html'\"`.\n\t * @param {string=} onload Expression to evaluate when a new partial is loaded.\n\t * <div class=\"alert alert-warning\">\n\t * **Note:** When using onload on SVG elements in IE11, the browser will try to call\n\t * a function with the name on the window element, which will usually throw a\n\t * \"function is undefined\" error. To fix this, you can instead use `data-onload` or a\n\t * different form that {@link guide/directive#normalization matches} `onload`.\n\t * </div>\n\t *\n\t * @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll\n\t * $anchorScroll} to scroll the viewport after the content is loaded.\n\t *\n\t * - If the attribute is not set, disable scrolling.\n\t * - If the attribute is set without value, enable scrolling.\n\t * - Otherwise enable scrolling only if the expression evaluates to truthy value.\n\t *\n\t * @example\n\t <example module=\"includeExample\" deps=\"angular-animate.js\" animations=\"true\">\n\t <file name=\"index.html\">\n\t <div ng-controller=\"ExampleController\">\n\t <select ng-model=\"template\" ng-options=\"t.name for t in templates\">\n\t <option value=\"\">(blank)</option>\n\t </select>\n\t url of the template: <code>{{template.url}}</code>\n\t <hr/>\n\t <div class=\"slide-animate-container\">\n\t <div class=\"slide-animate\" ng-include=\"template.url\"></div>\n\t </div>\n\t </div>\n\t </file>\n\t <file name=\"script.js\">\n\t angular.module('includeExample', ['ngAnimate'])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.templates =\n\t [ { name: 'template1.html', url: 'template1.html'},\n\t { name: 'template2.html', url: 'template2.html'} ];\n\t $scope.template = $scope.templates[0];\n\t }]);\n\t </file>\n\t <file name=\"template1.html\">\n\t Content of template1.html\n\t </file>\n\t <file name=\"template2.html\">\n\t Content of template2.html\n\t </file>\n\t <file name=\"animations.css\">\n\t .slide-animate-container {\n\t position:relative;\n\t background:white;\n\t border:1px solid black;\n\t height:40px;\n\t overflow:hidden;\n\t }\n\t\n\t .slide-animate {\n\t padding:10px;\n\t }\n\t\n\t .slide-animate.ng-enter, .slide-animate.ng-leave {\n\t transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\t\n\t position:absolute;\n\t top:0;\n\t left:0;\n\t right:0;\n\t bottom:0;\n\t display:block;\n\t padding:10px;\n\t }\n\t\n\t .slide-animate.ng-enter {\n\t top:-50px;\n\t }\n\t .slide-animate.ng-enter.ng-enter-active {\n\t top:0;\n\t }\n\t\n\t .slide-animate.ng-leave {\n\t top:0;\n\t }\n\t .slide-animate.ng-leave.ng-leave-active {\n\t top:50px;\n\t }\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var templateSelect = element(by.model('template'));\n\t var includeElem = element(by.css('[ng-include]'));\n\t\n\t it('should load template1.html', function() {\n\t expect(includeElem.getText()).toMatch(/Content of template1.html/);\n\t });\n\t\n\t it('should load template2.html', function() {\n\t if (browser.params.browser == 'firefox') {\n\t // Firefox can't handle using selects\n\t // See https://github.com/angular/protractor/issues/480\n\t return;\n\t }\n\t templateSelect.click();\n\t templateSelect.all(by.css('option')).get(2).click();\n\t expect(includeElem.getText()).toMatch(/Content of template2.html/);\n\t });\n\t\n\t it('should change to blank', function() {\n\t if (browser.params.browser == 'firefox') {\n\t // Firefox can't handle using selects\n\t return;\n\t }\n\t templateSelect.click();\n\t templateSelect.all(by.css('option')).get(0).click();\n\t expect(includeElem.isPresent()).toBe(false);\n\t });\n\t </file>\n\t </example>\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc event\n\t * @name ngInclude#$includeContentRequested\n\t * @eventType emit on the scope ngInclude was declared in\n\t * @description\n\t * Emitted every time the ngInclude content is requested.\n\t *\n\t * @param {Object} angularEvent Synthetic event object.\n\t * @param {String} src URL of content to load.\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc event\n\t * @name ngInclude#$includeContentLoaded\n\t * @eventType emit on the current ngInclude scope\n\t * @description\n\t * Emitted every time the ngInclude content is reloaded.\n\t *\n\t * @param {Object} angularEvent Synthetic event object.\n\t * @param {String} src URL of content to load.\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc event\n\t * @name ngInclude#$includeContentError\n\t * @eventType emit on the scope ngInclude was declared in\n\t * @description\n\t * Emitted when a template HTTP request yields an erroneous response (status < 200 || status > 299)\n\t *\n\t * @param {Object} angularEvent Synthetic event object.\n\t * @param {String} src URL of content to load.\n\t */\n\tvar ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate',\n\t function($templateRequest, $anchorScroll, $animate) {\n\t return {\n\t restrict: 'ECA',\n\t priority: 400,\n\t terminal: true,\n\t transclude: 'element',\n\t controller: angular.noop,\n\t compile: function(element, attr) {\n\t var srcExp = attr.ngInclude || attr.src,\n\t onloadExp = attr.onload || '',\n\t autoScrollExp = attr.autoscroll;\n\t\n\t return function(scope, $element, $attr, ctrl, $transclude) {\n\t var changeCounter = 0,\n\t currentScope,\n\t previousElement,\n\t currentElement;\n\t\n\t var cleanupLastIncludeContent = function() {\n\t if (previousElement) {\n\t previousElement.remove();\n\t previousElement = null;\n\t }\n\t if (currentScope) {\n\t currentScope.$destroy();\n\t currentScope = null;\n\t }\n\t if (currentElement) {\n\t $animate.leave(currentElement).then(function() {\n\t previousElement = null;\n\t });\n\t previousElement = currentElement;\n\t currentElement = null;\n\t }\n\t };\n\t\n\t scope.$watch(srcExp, function ngIncludeWatchAction(src) {\n\t var afterAnimation = function() {\n\t if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {\n\t $anchorScroll();\n\t }\n\t };\n\t var thisChangeId = ++changeCounter;\n\t\n\t if (src) {\n\t //set the 2nd param to true to ignore the template request error so that the inner\n\t //contents and scope can be cleaned up.\n\t $templateRequest(src, true).then(function(response) {\n\t if (scope.$$destroyed) return;\n\t\n\t if (thisChangeId !== changeCounter) return;\n\t var newScope = scope.$new();\n\t ctrl.template = response;\n\t\n\t // Note: This will also link all children of ng-include that were contained in the original\n\t // html. If that content contains controllers, ... they could pollute/change the scope.\n\t // However, using ng-include on an element with additional content does not make sense...\n\t // Note: We can't remove them in the cloneAttchFn of $transclude as that\n\t // function is called before linking the content, which would apply child\n\t // directives to non existing elements.\n\t var clone = $transclude(newScope, function(clone) {\n\t cleanupLastIncludeContent();\n\t $animate.enter(clone, null, $element).then(afterAnimation);\n\t });\n\t\n\t currentScope = newScope;\n\t currentElement = clone;\n\t\n\t currentScope.$emit('$includeContentLoaded', src);\n\t scope.$eval(onloadExp);\n\t }, function() {\n\t if (scope.$$destroyed) return;\n\t\n\t if (thisChangeId === changeCounter) {\n\t cleanupLastIncludeContent();\n\t scope.$emit('$includeContentError', src);\n\t }\n\t });\n\t scope.$emit('$includeContentRequested', src);\n\t } else {\n\t cleanupLastIncludeContent();\n\t ctrl.template = null;\n\t }\n\t });\n\t };\n\t }\n\t };\n\t}];\n\t\n\t// This directive is called during the $transclude call of the first `ngInclude` directive.\n\t// It will replace and compile the content of the element with the loaded template.\n\t// We need this directive so that the element content is already filled when\n\t// the link function of another directive on the same element as ngInclude\n\t// is called.\n\tvar ngIncludeFillContentDirective = ['$compile',\n\t function($compile) {\n\t return {\n\t restrict: 'ECA',\n\t priority: -400,\n\t require: 'ngInclude',\n\t link: function(scope, $element, $attr, ctrl) {\n\t if (/SVG/.test($element[0].toString())) {\n\t // WebKit: https://bugs.webkit.org/show_bug.cgi?id=135698 --- SVG elements do not\n\t // support innerHTML, so detect this here and try to generate the contents\n\t // specially.\n\t $element.empty();\n\t $compile(jqLiteBuildFragment(ctrl.template, document).childNodes)(scope,\n\t function namespaceAdaptedClone(clone) {\n\t $element.append(clone);\n\t }, {futureParentElement: $element});\n\t return;\n\t }\n\t\n\t $element.html(ctrl.template);\n\t $compile($element.contents())(scope);\n\t }\n\t };\n\t }];\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngInit\n\t * @restrict AC\n\t *\n\t * @description\n\t * The `ngInit` directive allows you to evaluate an expression in the\n\t * current scope.\n\t *\n\t * <div class=\"alert alert-danger\">\n\t * This directive can be abused to add unnecessary amounts of logic into your templates.\n\t * There are only a few appropriate uses of `ngInit`, such as for aliasing special properties of\n\t * {@link ng.directive:ngRepeat `ngRepeat`}, as seen in the demo below; and for injecting data via\n\t * server side scripting. Besides these few cases, you should use {@link guide/controller controllers}\n\t * rather than `ngInit` to initialize values on a scope.\n\t * </div>\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * **Note**: If you have assignment in `ngInit` along with a {@link ng.$filter `filter`}, make\n\t * sure you have parentheses to ensure correct operator precedence:\n\t * <pre class=\"prettyprint\">\n\t * `<div ng-init=\"test1 = ($index | toString)\"></div>`\n\t * </pre>\n\t * </div>\n\t *\n\t * @priority 450\n\t *\n\t * @element ANY\n\t * @param {expression} ngInit {@link guide/expression Expression} to eval.\n\t *\n\t * @example\n\t <example module=\"initExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('initExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.list = [['a', 'b'], ['c', 'd']];\n\t }]);\n\t </script>\n\t <div ng-controller=\"ExampleController\">\n\t <div ng-repeat=\"innerList in list\" ng-init=\"outerIndex = $index\">\n\t <div ng-repeat=\"value in innerList\" ng-init=\"innerIndex = $index\">\n\t <span class=\"example-init\">list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};</span>\n\t </div>\n\t </div>\n\t </div>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should alias index positions', function() {\n\t var elements = element.all(by.css('.example-init'));\n\t expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;');\n\t expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;');\n\t expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;');\n\t expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;');\n\t });\n\t </file>\n\t </example>\n\t */\n\tvar ngInitDirective = ngDirective({\n\t priority: 450,\n\t compile: function() {\n\t return {\n\t pre: function(scope, element, attrs) {\n\t scope.$eval(attrs.ngInit);\n\t }\n\t };\n\t }\n\t});\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngList\n\t *\n\t * @description\n\t * Text input that converts between a delimited string and an array of strings. The default\n\t * delimiter is a comma followed by a space - equivalent to `ng-list=\", \"`. You can specify a custom\n\t * delimiter as the value of the `ngList` attribute - for example, `ng-list=\" | \"`.\n\t *\n\t * The behaviour of the directive is affected by the use of the `ngTrim` attribute.\n\t * * If `ngTrim` is set to `\"false\"` then whitespace around both the separator and each\n\t * list item is respected. This implies that the user of the directive is responsible for\n\t * dealing with whitespace but also allows you to use whitespace as a delimiter, such as a\n\t * tab or newline character.\n\t * * Otherwise whitespace around the delimiter is ignored when splitting (although it is respected\n\t * when joining the list items back together) and whitespace around each list item is stripped\n\t * before it is added to the model.\n\t *\n\t * ### Example with Validation\n\t *\n\t * <example name=\"ngList-directive\" module=\"listExample\">\n\t * <file name=\"app.js\">\n\t * angular.module('listExample', [])\n\t * .controller('ExampleController', ['$scope', function($scope) {\n\t * $scope.names = ['morpheus', 'neo', 'trinity'];\n\t * }]);\n\t * </file>\n\t * <file name=\"index.html\">\n\t * <form name=\"myForm\" ng-controller=\"ExampleController\">\n\t * <label>List: <input name=\"namesInput\" ng-model=\"names\" ng-list required></label>\n\t * <span role=\"alert\">\n\t * <span class=\"error\" ng-show=\"myForm.namesInput.$error.required\">\n\t * Required!</span>\n\t * </span>\n\t * <br>\n\t * <tt>names = {{names}}</tt><br/>\n\t * <tt>myForm.namesInput.$valid = {{myForm.namesInput.$valid}}</tt><br/>\n\t * <tt>myForm.namesInput.$error = {{myForm.namesInput.$error}}</tt><br/>\n\t * <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n\t * <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n\t * </form>\n\t * </file>\n\t * <file name=\"protractor.js\" type=\"protractor\">\n\t * var listInput = element(by.model('names'));\n\t * var names = element(by.exactBinding('names'));\n\t * var valid = element(by.binding('myForm.namesInput.$valid'));\n\t * var error = element(by.css('span.error'));\n\t *\n\t * it('should initialize to model', function() {\n\t * expect(names.getText()).toContain('[\"morpheus\",\"neo\",\"trinity\"]');\n\t * expect(valid.getText()).toContain('true');\n\t * expect(error.getCssValue('display')).toBe('none');\n\t * });\n\t *\n\t * it('should be invalid if empty', function() {\n\t * listInput.clear();\n\t * listInput.sendKeys('');\n\t *\n\t * expect(names.getText()).toContain('');\n\t * expect(valid.getText()).toContain('false');\n\t * expect(error.getCssValue('display')).not.toBe('none');\n\t * });\n\t * </file>\n\t * </example>\n\t *\n\t * ### Example - splitting on newline\n\t * <example name=\"ngList-directive-newlines\">\n\t * <file name=\"index.html\">\n\t * <textarea ng-model=\"list\" ng-list=\"&#10;\" ng-trim=\"false\"></textarea>\n\t * <pre>{{ list | json }}</pre>\n\t * </file>\n\t * <file name=\"protractor.js\" type=\"protractor\">\n\t * it(\"should split the text by newlines\", function() {\n\t * var listInput = element(by.model('list'));\n\t * var output = element(by.binding('list | json'));\n\t * listInput.sendKeys('abc\\ndef\\nghi');\n\t * expect(output.getText()).toContain('[\\n \"abc\",\\n \"def\",\\n \"ghi\"\\n]');\n\t * });\n\t * </file>\n\t * </example>\n\t *\n\t * @element input\n\t * @param {string=} ngList optional delimiter that should be used to split the value.\n\t */\n\tvar ngListDirective = function() {\n\t return {\n\t restrict: 'A',\n\t priority: 100,\n\t require: 'ngModel',\n\t link: function(scope, element, attr, ctrl) {\n\t // We want to control whitespace trimming so we use this convoluted approach\n\t // to access the ngList attribute, which doesn't pre-trim the attribute\n\t var ngList = element.attr(attr.$attr.ngList) || ', ';\n\t var trimValues = attr.ngTrim !== 'false';\n\t var separator = trimValues ? trim(ngList) : ngList;\n\t\n\t var parse = function(viewValue) {\n\t // If the viewValue is invalid (say required but empty) it will be `undefined`\n\t if (isUndefined(viewValue)) return;\n\t\n\t var list = [];\n\t\n\t if (viewValue) {\n\t forEach(viewValue.split(separator), function(value) {\n\t if (value) list.push(trimValues ? trim(value) : value);\n\t });\n\t }\n\t\n\t return list;\n\t };\n\t\n\t ctrl.$parsers.push(parse);\n\t ctrl.$formatters.push(function(value) {\n\t if (isArray(value)) {\n\t return value.join(ngList);\n\t }\n\t\n\t return undefined;\n\t });\n\t\n\t // Override the standard $isEmpty because an empty array means the input is empty.\n\t ctrl.$isEmpty = function(value) {\n\t return !value || !value.length;\n\t };\n\t }\n\t };\n\t};\n\t\n\t/* global VALID_CLASS: true,\n\t INVALID_CLASS: true,\n\t PRISTINE_CLASS: true,\n\t DIRTY_CLASS: true,\n\t UNTOUCHED_CLASS: true,\n\t TOUCHED_CLASS: true,\n\t*/\n\t\n\tvar VALID_CLASS = 'ng-valid',\n\t INVALID_CLASS = 'ng-invalid',\n\t PRISTINE_CLASS = 'ng-pristine',\n\t DIRTY_CLASS = 'ng-dirty',\n\t UNTOUCHED_CLASS = 'ng-untouched',\n\t TOUCHED_CLASS = 'ng-touched',\n\t PENDING_CLASS = 'ng-pending';\n\t\n\tvar ngModelMinErr = minErr('ngModel');\n\t\n\t/**\n\t * @ngdoc type\n\t * @name ngModel.NgModelController\n\t *\n\t * @property {*} $viewValue The actual value from the control's view. For `input` elements, this is a\n\t * String. See {@link ngModel.NgModelController#$setViewValue} for information about when the $viewValue\n\t * is set.\n\t * @property {*} $modelValue The value in the model that the control is bound to.\n\t * @property {Array.<Function>} $parsers Array of functions to execute, as a pipeline, whenever\n\t the control reads value from the DOM. The functions are called in array order, each passing\n\t its return value through to the next. The last return value is forwarded to the\n\t {@link ngModel.NgModelController#$validators `$validators`} collection.\n\t\n\tParsers are used to sanitize / convert the {@link ngModel.NgModelController#$viewValue\n\t`$viewValue`}.\n\t\n\tReturning `undefined` from a parser means a parse error occurred. In that case,\n\tno {@link ngModel.NgModelController#$validators `$validators`} will run and the `ngModel`\n\twill be set to `undefined` unless {@link ngModelOptions `ngModelOptions.allowInvalid`}\n\tis set to `true`. The parse error is stored in `ngModel.$error.parse`.\n\t\n\t *\n\t * @property {Array.<Function>} $formatters Array of functions to execute, as a pipeline, whenever\n\t the model value changes. The functions are called in reverse array order, each passing the value through to the\n\t next. The last return value is used as the actual DOM value.\n\t Used to format / convert values for display in the control.\n\t * ```js\n\t * function formatter(value) {\n\t * if (value) {\n\t * return value.toUpperCase();\n\t * }\n\t * }\n\t * ngModel.$formatters.push(formatter);\n\t * ```\n\t *\n\t * @property {Object.<string, function>} $validators A collection of validators that are applied\n\t * whenever the model value changes. The key value within the object refers to the name of the\n\t * validator while the function refers to the validation operation. The validation operation is\n\t * provided with the model value as an argument and must return a true or false value depending\n\t * on the response of that validation.\n\t *\n\t * ```js\n\t * ngModel.$validators.validCharacters = function(modelValue, viewValue) {\n\t * var value = modelValue || viewValue;\n\t * return /[0-9]+/.test(value) &&\n\t * /[a-z]+/.test(value) &&\n\t * /[A-Z]+/.test(value) &&\n\t * /\\W+/.test(value);\n\t * };\n\t * ```\n\t *\n\t * @property {Object.<string, function>} $asyncValidators A collection of validations that are expected to\n\t * perform an asynchronous validation (e.g. a HTTP request). The validation function that is provided\n\t * is expected to return a promise when it is run during the model validation process. Once the promise\n\t * is delivered then the validation status will be set to true when fulfilled and false when rejected.\n\t * When the asynchronous validators are triggered, each of the validators will run in parallel and the model\n\t * value will only be updated once all validators have been fulfilled. As long as an asynchronous validator\n\t * is unfulfilled, its key will be added to the controllers `$pending` property. Also, all asynchronous validators\n\t * will only run once all synchronous validators have passed.\n\t *\n\t * Please note that if $http is used then it is important that the server returns a success HTTP response code\n\t * in order to fulfill the validation and a status level of `4xx` in order to reject the validation.\n\t *\n\t * ```js\n\t * ngModel.$asyncValidators.uniqueUsername = function(modelValue, viewValue) {\n\t * var value = modelValue || viewValue;\n\t *\n\t * // Lookup user by username\n\t * return $http.get('/api/users/' + value).\n\t * then(function resolved() {\n\t * //username exists, this means validation fails\n\t * return $q.reject('exists');\n\t * }, function rejected() {\n\t * //username does not exist, therefore this validation passes\n\t * return true;\n\t * });\n\t * };\n\t * ```\n\t *\n\t * @property {Array.<Function>} $viewChangeListeners Array of functions to execute whenever the\n\t * view value has changed. It is called with no arguments, and its return value is ignored.\n\t * This can be used in place of additional $watches against the model value.\n\t *\n\t * @property {Object} $error An object hash with all failing validator ids as keys.\n\t * @property {Object} $pending An object hash with all pending validator ids as keys.\n\t *\n\t * @property {boolean} $untouched True if control has not lost focus yet.\n\t * @property {boolean} $touched True if control has lost focus.\n\t * @property {boolean} $pristine True if user has not interacted with the control yet.\n\t * @property {boolean} $dirty True if user has already interacted with the control.\n\t * @property {boolean} $valid True if there is no error.\n\t * @property {boolean} $invalid True if at least one error on the control.\n\t * @property {string} $name The name attribute of the control.\n\t *\n\t * @description\n\t *\n\t * `NgModelController` provides API for the {@link ngModel `ngModel`} directive.\n\t * The controller contains services for data-binding, validation, CSS updates, and value formatting\n\t * and parsing. It purposefully does not contain any logic which deals with DOM rendering or\n\t * listening to DOM events.\n\t * Such DOM related logic should be provided by other directives which make use of\n\t * `NgModelController` for data-binding to control elements.\n\t * Angular provides this DOM logic for most {@link input `input`} elements.\n\t * At the end of this page you can find a {@link ngModel.NgModelController#custom-control-example\n\t * custom control example} that uses `ngModelController` to bind to `contenteditable` elements.\n\t *\n\t * @example\n\t * ### Custom Control Example\n\t * This example shows how to use `NgModelController` with a custom control to achieve\n\t * data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)\n\t * collaborate together to achieve the desired result.\n\t *\n\t * `contenteditable` is an HTML5 attribute, which tells the browser to let the element\n\t * contents be edited in place by the user.\n\t *\n\t * We are using the {@link ng.service:$sce $sce} service here and include the {@link ngSanitize $sanitize}\n\t * module to automatically remove \"bad\" content like inline event listener (e.g. `<span onclick=\"...\">`).\n\t * However, as we are using `$sce` the model can still decide to provide unsafe content if it marks\n\t * that content using the `$sce` service.\n\t *\n\t * <example name=\"NgModelController\" module=\"customControl\" deps=\"angular-sanitize.js\">\n\t <file name=\"style.css\">\n\t [contenteditable] {\n\t border: 1px solid black;\n\t background-color: white;\n\t min-height: 20px;\n\t }\n\t\n\t .ng-invalid {\n\t border: 1px solid red;\n\t }\n\t\n\t </file>\n\t <file name=\"script.js\">\n\t angular.module('customControl', ['ngSanitize']).\n\t directive('contenteditable', ['$sce', function($sce) {\n\t return {\n\t restrict: 'A', // only activate on element attribute\n\t require: '?ngModel', // get a hold of NgModelController\n\t link: function(scope, element, attrs, ngModel) {\n\t if (!ngModel) return; // do nothing if no ng-model\n\t\n\t // Specify how UI should be updated\n\t ngModel.$render = function() {\n\t element.html($sce.getTrustedHtml(ngModel.$viewValue || ''));\n\t };\n\t\n\t // Listen for change events to enable binding\n\t element.on('blur keyup change', function() {\n\t scope.$evalAsync(read);\n\t });\n\t read(); // initialize\n\t\n\t // Write data to the model\n\t function read() {\n\t var html = element.html();\n\t // When we clear the content editable the browser leaves a <br> behind\n\t // If strip-br attribute is provided then we strip this out\n\t if ( attrs.stripBr && html == '<br>' ) {\n\t html = '';\n\t }\n\t ngModel.$setViewValue(html);\n\t }\n\t }\n\t };\n\t }]);\n\t </file>\n\t <file name=\"index.html\">\n\t <form name=\"myForm\">\n\t <div contenteditable\n\t name=\"myWidget\" ng-model=\"userContent\"\n\t strip-br=\"true\"\n\t required>Change me!</div>\n\t <span ng-show=\"myForm.myWidget.$error.required\">Required!</span>\n\t <hr>\n\t <textarea ng-model=\"userContent\" aria-label=\"Dynamic textarea\"></textarea>\n\t </form>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should data-bind and become invalid', function() {\n\t if (browser.params.browser == 'safari' || browser.params.browser == 'firefox') {\n\t // SafariDriver can't handle contenteditable\n\t // and Firefox driver can't clear contenteditables very well\n\t return;\n\t }\n\t var contentEditable = element(by.css('[contenteditable]'));\n\t var content = 'Change me!';\n\t\n\t expect(contentEditable.getText()).toEqual(content);\n\t\n\t contentEditable.clear();\n\t contentEditable.sendKeys(protractor.Key.BACK_SPACE);\n\t expect(contentEditable.getText()).toEqual('');\n\t expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/);\n\t });\n\t </file>\n\t * </example>\n\t *\n\t *\n\t */\n\tvar NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate', '$timeout', '$rootScope', '$q', '$interpolate',\n\t function($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $rootScope, $q, $interpolate) {\n\t this.$viewValue = Number.NaN;\n\t this.$modelValue = Number.NaN;\n\t this.$$rawModelValue = undefined; // stores the parsed modelValue / model set from scope regardless of validity.\n\t this.$validators = {};\n\t this.$asyncValidators = {};\n\t this.$parsers = [];\n\t this.$formatters = [];\n\t this.$viewChangeListeners = [];\n\t this.$untouched = true;\n\t this.$touched = false;\n\t this.$pristine = true;\n\t this.$dirty = false;\n\t this.$valid = true;\n\t this.$invalid = false;\n\t this.$error = {}; // keep invalid keys here\n\t this.$$success = {}; // keep valid keys here\n\t this.$pending = undefined; // keep pending keys here\n\t this.$name = $interpolate($attr.name || '', false)($scope);\n\t this.$$parentForm = nullFormCtrl;\n\t\n\t var parsedNgModel = $parse($attr.ngModel),\n\t parsedNgModelAssign = parsedNgModel.assign,\n\t ngModelGet = parsedNgModel,\n\t ngModelSet = parsedNgModelAssign,\n\t pendingDebounce = null,\n\t parserValid,\n\t ctrl = this;\n\t\n\t this.$$setOptions = function(options) {\n\t ctrl.$options = options;\n\t if (options && options.getterSetter) {\n\t var invokeModelGetter = $parse($attr.ngModel + '()'),\n\t invokeModelSetter = $parse($attr.ngModel + '($$$p)');\n\t\n\t ngModelGet = function($scope) {\n\t var modelValue = parsedNgModel($scope);\n\t if (isFunction(modelValue)) {\n\t modelValue = invokeModelGetter($scope);\n\t }\n\t return modelValue;\n\t };\n\t ngModelSet = function($scope, newValue) {\n\t if (isFunction(parsedNgModel($scope))) {\n\t invokeModelSetter($scope, {$$$p: ctrl.$modelValue});\n\t } else {\n\t parsedNgModelAssign($scope, ctrl.$modelValue);\n\t }\n\t };\n\t } else if (!parsedNgModel.assign) {\n\t throw ngModelMinErr('nonassign', \"Expression '{0}' is non-assignable. Element: {1}\",\n\t $attr.ngModel, startingTag($element));\n\t }\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name ngModel.NgModelController#$render\n\t *\n\t * @description\n\t * Called when the view needs to be updated. It is expected that the user of the ng-model\n\t * directive will implement this method.\n\t *\n\t * The `$render()` method is invoked in the following situations:\n\t *\n\t * * `$rollbackViewValue()` is called. If we are rolling back the view value to the last\n\t * committed value then `$render()` is called to update the input control.\n\t * * The value referenced by `ng-model` is changed programmatically and both the `$modelValue` and\n\t * the `$viewValue` are different from last time.\n\t *\n\t * Since `ng-model` does not do a deep watch, `$render()` is only invoked if the values of\n\t * `$modelValue` and `$viewValue` are actually different from their previous value. If `$modelValue`\n\t * or `$viewValue` are objects (rather than a string or number) then `$render()` will not be\n\t * invoked if you only change a property on the objects.\n\t */\n\t this.$render = noop;\n\t\n\t /**\n\t * @ngdoc method\n\t * @name ngModel.NgModelController#$isEmpty\n\t *\n\t * @description\n\t * This is called when we need to determine if the value of an input is empty.\n\t *\n\t * For instance, the required directive does this to work out if the input has data or not.\n\t *\n\t * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.\n\t *\n\t * You can override this for input directives whose concept of being empty is different from the\n\t * default. The `checkboxInputType` directive does this because in its case a value of `false`\n\t * implies empty.\n\t *\n\t * @param {*} value The value of the input to check for emptiness.\n\t * @returns {boolean} True if `value` is \"empty\".\n\t */\n\t this.$isEmpty = function(value) {\n\t return isUndefined(value) || value === '' || value === null || value !== value;\n\t };\n\t\n\t var currentValidationRunId = 0;\n\t\n\t /**\n\t * @ngdoc method\n\t * @name ngModel.NgModelController#$setValidity\n\t *\n\t * @description\n\t * Change the validity state, and notify the form.\n\t *\n\t * This method can be called within $parsers/$formatters or a custom validation implementation.\n\t * However, in most cases it should be sufficient to use the `ngModel.$validators` and\n\t * `ngModel.$asyncValidators` collections which will call `$setValidity` automatically.\n\t *\n\t * @param {string} validationErrorKey Name of the validator. The `validationErrorKey` will be assigned\n\t * to either `$error[validationErrorKey]` or `$pending[validationErrorKey]`\n\t * (for unfulfilled `$asyncValidators`), so that it is available for data-binding.\n\t * The `validationErrorKey` should be in camelCase and will get converted into dash-case\n\t * for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error`\n\t * class and can be bound to as `{{someForm.someControl.$error.myError}}` .\n\t * @param {boolean} isValid Whether the current state is valid (true), invalid (false), pending (undefined),\n\t * or skipped (null). Pending is used for unfulfilled `$asyncValidators`.\n\t * Skipped is used by Angular when validators do not run because of parse errors and\n\t * when `$asyncValidators` do not run because any of the `$validators` failed.\n\t */\n\t addSetValidityMethod({\n\t ctrl: this,\n\t $element: $element,\n\t set: function(object, property) {\n\t object[property] = true;\n\t },\n\t unset: function(object, property) {\n\t delete object[property];\n\t },\n\t $animate: $animate\n\t });\n\t\n\t /**\n\t * @ngdoc method\n\t * @name ngModel.NgModelController#$setPristine\n\t *\n\t * @description\n\t * Sets the control to its pristine state.\n\t *\n\t * This method can be called to remove the `ng-dirty` class and set the control to its pristine\n\t * state (`ng-pristine` class). A model is considered to be pristine when the control\n\t * has not been changed from when first compiled.\n\t */\n\t this.$setPristine = function() {\n\t ctrl.$dirty = false;\n\t ctrl.$pristine = true;\n\t $animate.removeClass($element, DIRTY_CLASS);\n\t $animate.addClass($element, PRISTINE_CLASS);\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name ngModel.NgModelController#$setDirty\n\t *\n\t * @description\n\t * Sets the control to its dirty state.\n\t *\n\t * This method can be called to remove the `ng-pristine` class and set the control to its dirty\n\t * state (`ng-dirty` class). A model is considered to be dirty when the control has been changed\n\t * from when first compiled.\n\t */\n\t this.$setDirty = function() {\n\t ctrl.$dirty = true;\n\t ctrl.$pristine = false;\n\t $animate.removeClass($element, PRISTINE_CLASS);\n\t $animate.addClass($element, DIRTY_CLASS);\n\t ctrl.$$parentForm.$setDirty();\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name ngModel.NgModelController#$setUntouched\n\t *\n\t * @description\n\t * Sets the control to its untouched state.\n\t *\n\t * This method can be called to remove the `ng-touched` class and set the control to its\n\t * untouched state (`ng-untouched` class). Upon compilation, a model is set as untouched\n\t * by default, however this function can be used to restore that state if the model has\n\t * already been touched by the user.\n\t */\n\t this.$setUntouched = function() {\n\t ctrl.$touched = false;\n\t ctrl.$untouched = true;\n\t $animate.setClass($element, UNTOUCHED_CLASS, TOUCHED_CLASS);\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name ngModel.NgModelController#$setTouched\n\t *\n\t * @description\n\t * Sets the control to its touched state.\n\t *\n\t * This method can be called to remove the `ng-untouched` class and set the control to its\n\t * touched state (`ng-touched` class). A model is considered to be touched when the user has\n\t * first focused the control element and then shifted focus away from the control (blur event).\n\t */\n\t this.$setTouched = function() {\n\t ctrl.$touched = true;\n\t ctrl.$untouched = false;\n\t $animate.setClass($element, TOUCHED_CLASS, UNTOUCHED_CLASS);\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name ngModel.NgModelController#$rollbackViewValue\n\t *\n\t * @description\n\t * Cancel an update and reset the input element's value to prevent an update to the `$modelValue`,\n\t * which may be caused by a pending debounced event or because the input is waiting for a some\n\t * future event.\n\t *\n\t * If you have an input that uses `ng-model-options` to set up debounced updates or updates that\n\t * depend on special events such as blur, you can have a situation where there is a period when\n\t * the `$viewValue` is out of sync with the ngModel's `$modelValue`.\n\t *\n\t * In this case, you can use `$rollbackViewValue()` to manually cancel the debounced / future update\n\t * and reset the input to the last committed view value.\n\t *\n\t * It is also possible that you run into difficulties if you try to update the ngModel's `$modelValue`\n\t * programmatically before these debounced/future events have resolved/occurred, because Angular's\n\t * dirty checking mechanism is not able to tell whether the model has actually changed or not.\n\t *\n\t * The `$rollbackViewValue()` method should be called before programmatically changing the model of an\n\t * input which may have such events pending. This is important in order to make sure that the\n\t * input field will be updated with the new model value and any pending operations are cancelled.\n\t *\n\t * <example name=\"ng-model-cancel-update\" module=\"cancel-update-example\">\n\t * <file name=\"app.js\">\n\t * angular.module('cancel-update-example', [])\n\t *\n\t * .controller('CancelUpdateController', ['$scope', function($scope) {\n\t * $scope.model = {};\n\t *\n\t * $scope.setEmpty = function(e, value, rollback) {\n\t * if (e.keyCode == 27) {\n\t * e.preventDefault();\n\t * if (rollback) {\n\t * $scope.myForm[value].$rollbackViewValue();\n\t * }\n\t * $scope.model[value] = '';\n\t * }\n\t * };\n\t * }]);\n\t * </file>\n\t * <file name=\"index.html\">\n\t * <div ng-controller=\"CancelUpdateController\">\n\t * <p>Both of these inputs are only updated if they are blurred. Hitting escape should\n\t * empty them. Follow these steps and observe the difference:</p>\n\t * <ol>\n\t * <li>Type something in the input. You will see that the model is not yet updated</li>\n\t * <li>Press the Escape key.\n\t * <ol>\n\t * <li> In the first example, nothing happens, because the model is already '', and no\n\t * update is detected. If you blur the input, the model will be set to the current view.\n\t * </li>\n\t * <li> In the second example, the pending update is cancelled, and the input is set back\n\t * to the last committed view value (''). Blurring the input does nothing.\n\t * </li>\n\t * </ol>\n\t * </li>\n\t * </ol>\n\t *\n\t * <form name=\"myForm\" ng-model-options=\"{ updateOn: 'blur' }\">\n\t * <div>\n\t * <p id=\"inputDescription1\">Without $rollbackViewValue():</p>\n\t * <input name=\"value1\" aria-describedby=\"inputDescription1\" ng-model=\"model.value1\"\n\t * ng-keydown=\"setEmpty($event, 'value1')\">\n\t * value1: \"{{ model.value1 }}\"\n\t * </div>\n\t *\n\t * <div>\n\t * <p id=\"inputDescription2\">With $rollbackViewValue():</p>\n\t * <input name=\"value2\" aria-describedby=\"inputDescription2\" ng-model=\"model.value2\"\n\t * ng-keydown=\"setEmpty($event, 'value2', true)\">\n\t * value2: \"{{ model.value2 }}\"\n\t * </div>\n\t * </form>\n\t * </div>\n\t * </file>\n\t <file name=\"style.css\">\n\t div {\n\t display: table-cell;\n\t }\n\t div:nth-child(1) {\n\t padding-right: 30px;\n\t }\n\t\n\t </file>\n\t * </example>\n\t */\n\t this.$rollbackViewValue = function() {\n\t $timeout.cancel(pendingDebounce);\n\t ctrl.$viewValue = ctrl.$$lastCommittedViewValue;\n\t ctrl.$render();\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name ngModel.NgModelController#$validate\n\t *\n\t * @description\n\t * Runs each of the registered validators (first synchronous validators and then\n\t * asynchronous validators).\n\t * If the validity changes to invalid, the model will be set to `undefined`,\n\t * unless {@link ngModelOptions `ngModelOptions.allowInvalid`} is `true`.\n\t * If the validity changes to valid, it will set the model to the last available valid\n\t * `$modelValue`, i.e. either the last parsed value or the last value set from the scope.\n\t */\n\t this.$validate = function() {\n\t // ignore $validate before model is initialized\n\t if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {\n\t return;\n\t }\n\t\n\t var viewValue = ctrl.$$lastCommittedViewValue;\n\t // Note: we use the $$rawModelValue as $modelValue might have been\n\t // set to undefined during a view -> model update that found validation\n\t // errors. We can't parse the view here, since that could change\n\t // the model although neither viewValue nor the model on the scope changed\n\t var modelValue = ctrl.$$rawModelValue;\n\t\n\t var prevValid = ctrl.$valid;\n\t var prevModelValue = ctrl.$modelValue;\n\t\n\t var allowInvalid = ctrl.$options && ctrl.$options.allowInvalid;\n\t\n\t ctrl.$$runValidators(modelValue, viewValue, function(allValid) {\n\t // If there was no change in validity, don't update the model\n\t // This prevents changing an invalid modelValue to undefined\n\t if (!allowInvalid && prevValid !== allValid) {\n\t // Note: Don't check ctrl.$valid here, as we could have\n\t // external validators (e.g. calculated on the server),\n\t // that just call $setValidity and need the model value\n\t // to calculate their validity.\n\t ctrl.$modelValue = allValid ? modelValue : undefined;\n\t\n\t if (ctrl.$modelValue !== prevModelValue) {\n\t ctrl.$$writeModelToScope();\n\t }\n\t }\n\t });\n\t\n\t };\n\t\n\t this.$$runValidators = function(modelValue, viewValue, doneCallback) {\n\t currentValidationRunId++;\n\t var localValidationRunId = currentValidationRunId;\n\t\n\t // check parser error\n\t if (!processParseErrors()) {\n\t validationDone(false);\n\t return;\n\t }\n\t if (!processSyncValidators()) {\n\t validationDone(false);\n\t return;\n\t }\n\t processAsyncValidators();\n\t\n\t function processParseErrors() {\n\t var errorKey = ctrl.$$parserName || 'parse';\n\t if (isUndefined(parserValid)) {\n\t setValidity(errorKey, null);\n\t } else {\n\t if (!parserValid) {\n\t forEach(ctrl.$validators, function(v, name) {\n\t setValidity(name, null);\n\t });\n\t forEach(ctrl.$asyncValidators, function(v, name) {\n\t setValidity(name, null);\n\t });\n\t }\n\t // Set the parse error last, to prevent unsetting it, should a $validators key == parserName\n\t setValidity(errorKey, parserValid);\n\t return parserValid;\n\t }\n\t return true;\n\t }\n\t\n\t function processSyncValidators() {\n\t var syncValidatorsValid = true;\n\t forEach(ctrl.$validators, function(validator, name) {\n\t var result = validator(modelValue, viewValue);\n\t syncValidatorsValid = syncValidatorsValid && result;\n\t setValidity(name, result);\n\t });\n\t if (!syncValidatorsValid) {\n\t forEach(ctrl.$asyncValidators, function(v, name) {\n\t setValidity(name, null);\n\t });\n\t return false;\n\t }\n\t return true;\n\t }\n\t\n\t function processAsyncValidators() {\n\t var validatorPromises = [];\n\t var allValid = true;\n\t forEach(ctrl.$asyncValidators, function(validator, name) {\n\t var promise = validator(modelValue, viewValue);\n\t if (!isPromiseLike(promise)) {\n\t throw ngModelMinErr('nopromise',\n\t \"Expected asynchronous validator to return a promise but got '{0}' instead.\", promise);\n\t }\n\t setValidity(name, undefined);\n\t validatorPromises.push(promise.then(function() {\n\t setValidity(name, true);\n\t }, function(error) {\n\t allValid = false;\n\t setValidity(name, false);\n\t }));\n\t });\n\t if (!validatorPromises.length) {\n\t validationDone(true);\n\t } else {\n\t $q.all(validatorPromises).then(function() {\n\t validationDone(allValid);\n\t }, noop);\n\t }\n\t }\n\t\n\t function setValidity(name, isValid) {\n\t if (localValidationRunId === currentValidationRunId) {\n\t ctrl.$setValidity(name, isValid);\n\t }\n\t }\n\t\n\t function validationDone(allValid) {\n\t if (localValidationRunId === currentValidationRunId) {\n\t\n\t doneCallback(allValid);\n\t }\n\t }\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name ngModel.NgModelController#$commitViewValue\n\t *\n\t * @description\n\t * Commit a pending update to the `$modelValue`.\n\t *\n\t * Updates may be pending by a debounced event or because the input is waiting for a some future\n\t * event defined in `ng-model-options`. this method is rarely needed as `NgModelController`\n\t * usually handles calling this in response to input events.\n\t */\n\t this.$commitViewValue = function() {\n\t var viewValue = ctrl.$viewValue;\n\t\n\t $timeout.cancel(pendingDebounce);\n\t\n\t // If the view value has not changed then we should just exit, except in the case where there is\n\t // a native validator on the element. In this case the validation state may have changed even though\n\t // the viewValue has stayed empty.\n\t if (ctrl.$$lastCommittedViewValue === viewValue && (viewValue !== '' || !ctrl.$$hasNativeValidators)) {\n\t return;\n\t }\n\t ctrl.$$lastCommittedViewValue = viewValue;\n\t\n\t // change to dirty\n\t if (ctrl.$pristine) {\n\t this.$setDirty();\n\t }\n\t this.$$parseAndValidate();\n\t };\n\t\n\t this.$$parseAndValidate = function() {\n\t var viewValue = ctrl.$$lastCommittedViewValue;\n\t var modelValue = viewValue;\n\t parserValid = isUndefined(modelValue) ? undefined : true;\n\t\n\t if (parserValid) {\n\t for (var i = 0; i < ctrl.$parsers.length; i++) {\n\t modelValue = ctrl.$parsers[i](modelValue);\n\t if (isUndefined(modelValue)) {\n\t parserValid = false;\n\t break;\n\t }\n\t }\n\t }\n\t if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {\n\t // ctrl.$modelValue has not been touched yet...\n\t ctrl.$modelValue = ngModelGet($scope);\n\t }\n\t var prevModelValue = ctrl.$modelValue;\n\t var allowInvalid = ctrl.$options && ctrl.$options.allowInvalid;\n\t ctrl.$$rawModelValue = modelValue;\n\t\n\t if (allowInvalid) {\n\t ctrl.$modelValue = modelValue;\n\t writeToModelIfNeeded();\n\t }\n\t\n\t // Pass the $$lastCommittedViewValue here, because the cached viewValue might be out of date.\n\t // This can happen if e.g. $setViewValue is called from inside a parser\n\t ctrl.$$runValidators(modelValue, ctrl.$$lastCommittedViewValue, function(allValid) {\n\t if (!allowInvalid) {\n\t // Note: Don't check ctrl.$valid here, as we could have\n\t // external validators (e.g. calculated on the server),\n\t // that just call $setValidity and need the model value\n\t // to calculate their validity.\n\t ctrl.$modelValue = allValid ? modelValue : undefined;\n\t writeToModelIfNeeded();\n\t }\n\t });\n\t\n\t function writeToModelIfNeeded() {\n\t if (ctrl.$modelValue !== prevModelValue) {\n\t ctrl.$$writeModelToScope();\n\t }\n\t }\n\t };\n\t\n\t this.$$writeModelToScope = function() {\n\t ngModelSet($scope, ctrl.$modelValue);\n\t forEach(ctrl.$viewChangeListeners, function(listener) {\n\t try {\n\t listener();\n\t } catch (e) {\n\t $exceptionHandler(e);\n\t }\n\t });\n\t };\n\t\n\t /**\n\t * @ngdoc method\n\t * @name ngModel.NgModelController#$setViewValue\n\t *\n\t * @description\n\t * Update the view value.\n\t *\n\t * This method should be called when a control wants to change the view value; typically,\n\t * this is done from within a DOM event handler. For example, the {@link ng.directive:input input}\n\t * directive calls it when the value of the input changes and {@link ng.directive:select select}\n\t * calls it when an option is selected.\n\t *\n\t * When `$setViewValue` is called, the new `value` will be staged for committing through the `$parsers`\n\t * and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged\n\t * value sent directly for processing, finally to be applied to `$modelValue` and then the\n\t * **expression** specified in the `ng-model` attribute. Lastly, all the registered change listeners,\n\t * in the `$viewChangeListeners` list, are called.\n\t *\n\t * In case the {@link ng.directive:ngModelOptions ngModelOptions} directive is used with `updateOn`\n\t * and the `default` trigger is not listed, all those actions will remain pending until one of the\n\t * `updateOn` events is triggered on the DOM element.\n\t * All these actions will be debounced if the {@link ng.directive:ngModelOptions ngModelOptions}\n\t * directive is used with a custom debounce for this particular event.\n\t * Note that a `$digest` is only triggered once the `updateOn` events are fired, or if `debounce`\n\t * is specified, once the timer runs out.\n\t *\n\t * When used with standard inputs, the view value will always be a string (which is in some cases\n\t * parsed into another type, such as a `Date` object for `input[date]`.)\n\t * However, custom controls might also pass objects to this method. In this case, we should make\n\t * a copy of the object before passing it to `$setViewValue`. This is because `ngModel` does not\n\t * perform a deep watch of objects, it only looks for a change of identity. If you only change\n\t * the property of the object then ngModel will not realise that the object has changed and\n\t * will not invoke the `$parsers` and `$validators` pipelines. For this reason, you should\n\t * not change properties of the copy once it has been passed to `$setViewValue`.\n\t * Otherwise you may cause the model value on the scope to change incorrectly.\n\t *\n\t * <div class=\"alert alert-info\">\n\t * In any case, the value passed to the method should always reflect the current value\n\t * of the control. For example, if you are calling `$setViewValue` for an input element,\n\t * you should pass the input DOM value. Otherwise, the control and the scope model become\n\t * out of sync. It's also important to note that `$setViewValue` does not call `$render` or change\n\t * the control's DOM value in any way. If we want to change the control's DOM value\n\t * programmatically, we should update the `ngModel` scope expression. Its new value will be\n\t * picked up by the model controller, which will run it through the `$formatters`, `$render` it\n\t * to update the DOM, and finally call `$validate` on it.\n\t * </div>\n\t *\n\t * @param {*} value value from the view.\n\t * @param {string} trigger Event that triggered the update.\n\t */\n\t this.$setViewValue = function(value, trigger) {\n\t ctrl.$viewValue = value;\n\t if (!ctrl.$options || ctrl.$options.updateOnDefault) {\n\t ctrl.$$debounceViewValueCommit(trigger);\n\t }\n\t };\n\t\n\t this.$$debounceViewValueCommit = function(trigger) {\n\t var debounceDelay = 0,\n\t options = ctrl.$options,\n\t debounce;\n\t\n\t if (options && isDefined(options.debounce)) {\n\t debounce = options.debounce;\n\t if (isNumber(debounce)) {\n\t debounceDelay = debounce;\n\t } else if (isNumber(debounce[trigger])) {\n\t debounceDelay = debounce[trigger];\n\t } else if (isNumber(debounce['default'])) {\n\t debounceDelay = debounce['default'];\n\t }\n\t }\n\t\n\t $timeout.cancel(pendingDebounce);\n\t if (debounceDelay) {\n\t pendingDebounce = $timeout(function() {\n\t ctrl.$commitViewValue();\n\t }, debounceDelay);\n\t } else if ($rootScope.$$phase) {\n\t ctrl.$commitViewValue();\n\t } else {\n\t $scope.$apply(function() {\n\t ctrl.$commitViewValue();\n\t });\n\t }\n\t };\n\t\n\t // model -> value\n\t // Note: we cannot use a normal scope.$watch as we want to detect the following:\n\t // 1. scope value is 'a'\n\t // 2. user enters 'b'\n\t // 3. ng-change kicks in and reverts scope value to 'a'\n\t // -> scope value did not change since the last digest as\n\t // ng-change executes in apply phase\n\t // 4. view should be changed back to 'a'\n\t $scope.$watch(function ngModelWatch() {\n\t var modelValue = ngModelGet($scope);\n\t\n\t // if scope model value and ngModel value are out of sync\n\t // TODO(perf): why not move this to the action fn?\n\t if (modelValue !== ctrl.$modelValue &&\n\t // checks for NaN is needed to allow setting the model to NaN when there's an asyncValidator\n\t (ctrl.$modelValue === ctrl.$modelValue || modelValue === modelValue)\n\t ) {\n\t ctrl.$modelValue = ctrl.$$rawModelValue = modelValue;\n\t parserValid = undefined;\n\t\n\t var formatters = ctrl.$formatters,\n\t idx = formatters.length;\n\t\n\t var viewValue = modelValue;\n\t while (idx--) {\n\t viewValue = formatters[idx](viewValue);\n\t }\n\t if (ctrl.$viewValue !== viewValue) {\n\t ctrl.$viewValue = ctrl.$$lastCommittedViewValue = viewValue;\n\t ctrl.$render();\n\t\n\t ctrl.$$runValidators(modelValue, viewValue, noop);\n\t }\n\t }\n\t\n\t return modelValue;\n\t });\n\t}];\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngModel\n\t *\n\t * @element input\n\t * @priority 1\n\t *\n\t * @description\n\t * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a\n\t * property on the scope using {@link ngModel.NgModelController NgModelController},\n\t * which is created and exposed by this directive.\n\t *\n\t * `ngModel` is responsible for:\n\t *\n\t * - Binding the view into the model, which other directives such as `input`, `textarea` or `select`\n\t * require.\n\t * - Providing validation behavior (i.e. required, number, email, url).\n\t * - Keeping the state of the control (valid/invalid, dirty/pristine, touched/untouched, validation errors).\n\t * - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`, `ng-touched`, `ng-untouched`) including animations.\n\t * - Registering the control with its parent {@link ng.directive:form form}.\n\t *\n\t * Note: `ngModel` will try to bind to the property given by evaluating the expression on the\n\t * current scope. If the property doesn't already exist on this scope, it will be created\n\t * implicitly and added to the scope.\n\t *\n\t * For best practices on using `ngModel`, see:\n\t *\n\t * - [Understanding Scopes](https://github.com/angular/angular.js/wiki/Understanding-Scopes)\n\t *\n\t * For basic examples, how to use `ngModel`, see:\n\t *\n\t * - {@link ng.directive:input input}\n\t * - {@link input[text] text}\n\t * - {@link input[checkbox] checkbox}\n\t * - {@link input[radio] radio}\n\t * - {@link input[number] number}\n\t * - {@link input[email] email}\n\t * - {@link input[url] url}\n\t * - {@link input[date] date}\n\t * - {@link input[datetime-local] datetime-local}\n\t * - {@link input[time] time}\n\t * - {@link input[month] month}\n\t * - {@link input[week] week}\n\t * - {@link ng.directive:select select}\n\t * - {@link ng.directive:textarea textarea}\n\t *\n\t * # Complex Models (objects or collections)\n\t *\n\t * By default, `ngModel` watches the model by reference, not value. This is important to know when\n\t * binding inputs to models that are objects (e.g. `Date`) or collections (e.g. arrays). If only properties of the\n\t * object or collection change, `ngModel` will not be notified and so the input will not be re-rendered.\n\t *\n\t * The model must be assigned an entirely new object or collection before a re-rendering will occur.\n\t *\n\t * Some directives have options that will cause them to use a custom `$watchCollection` on the model expression\n\t * - for example, `ngOptions` will do so when a `track by` clause is included in the comprehension expression or\n\t * if the select is given the `multiple` attribute.\n\t *\n\t * The `$watchCollection()` method only does a shallow comparison, meaning that changing properties deeper than the\n\t * first level of the object (or only changing the properties of an item in the collection if it's an array) will still\n\t * not trigger a re-rendering of the model.\n\t *\n\t * # CSS classes\n\t * The following CSS classes are added and removed on the associated input/select/textarea element\n\t * depending on the validity of the model.\n\t *\n\t * - `ng-valid`: the model is valid\n\t * - `ng-invalid`: the model is invalid\n\t * - `ng-valid-[key]`: for each valid key added by `$setValidity`\n\t * - `ng-invalid-[key]`: for each invalid key added by `$setValidity`\n\t * - `ng-pristine`: the control hasn't been interacted with yet\n\t * - `ng-dirty`: the control has been interacted with\n\t * - `ng-touched`: the control has been blurred\n\t * - `ng-untouched`: the control hasn't been blurred\n\t * - `ng-pending`: any `$asyncValidators` are unfulfilled\n\t *\n\t * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n\t *\n\t * ## Animation Hooks\n\t *\n\t * Animations within models are triggered when any of the associated CSS classes are added and removed\n\t * on the input element which is attached to the model. These classes are: `.ng-pristine`, `.ng-dirty`,\n\t * `.ng-invalid` and `.ng-valid` as well as any other validations that are performed on the model itself.\n\t * The animations that are triggered within ngModel are similar to how they work in ngClass and\n\t * animations can be hooked into using CSS transitions, keyframes as well as JS animations.\n\t *\n\t * The following example shows a simple way to utilize CSS transitions to style an input element\n\t * that has been rendered as invalid after it has been validated:\n\t *\n\t * <pre>\n\t * //be sure to include ngAnimate as a module to hook into more\n\t * //advanced animations\n\t * .my-input {\n\t * transition:0.5s linear all;\n\t * background: white;\n\t * }\n\t * .my-input.ng-invalid {\n\t * background: red;\n\t * color:white;\n\t * }\n\t * </pre>\n\t *\n\t * @example\n\t * <example deps=\"angular-animate.js\" animations=\"true\" fixBase=\"true\" module=\"inputExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('inputExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.val = '1';\n\t }]);\n\t </script>\n\t <style>\n\t .my-input {\n\t transition:all linear 0.5s;\n\t background: transparent;\n\t }\n\t .my-input.ng-invalid {\n\t color:white;\n\t background: red;\n\t }\n\t </style>\n\t <p id=\"inputDescription\">\n\t Update input to see transitions when valid/invalid.\n\t Integer is a valid value.\n\t </p>\n\t <form name=\"testForm\" ng-controller=\"ExampleController\">\n\t <input ng-model=\"val\" ng-pattern=\"/^\\d+$/\" name=\"anim\" class=\"my-input\"\n\t aria-describedby=\"inputDescription\" />\n\t </form>\n\t </file>\n\t * </example>\n\t *\n\t * ## Binding to a getter/setter\n\t *\n\t * Sometimes it's helpful to bind `ngModel` to a getter/setter function. A getter/setter is a\n\t * function that returns a representation of the model when called with zero arguments, and sets\n\t * the internal state of a model when called with an argument. It's sometimes useful to use this\n\t * for models that have an internal representation that's different from what the model exposes\n\t * to the view.\n\t *\n\t * <div class=\"alert alert-success\">\n\t * **Best Practice:** It's best to keep getters fast because Angular is likely to call them more\n\t * frequently than other parts of your code.\n\t * </div>\n\t *\n\t * You use this behavior by adding `ng-model-options=\"{ getterSetter: true }\"` to an element that\n\t * has `ng-model` attached to it. You can also add `ng-model-options=\"{ getterSetter: true }\"` to\n\t * a `<form>`, which will enable this behavior for all `<input>`s within it. See\n\t * {@link ng.directive:ngModelOptions `ngModelOptions`} for more.\n\t *\n\t * The following example shows how to use `ngModel` with a getter/setter:\n\t *\n\t * @example\n\t * <example name=\"ngModel-getter-setter\" module=\"getterSetterExample\">\n\t <file name=\"index.html\">\n\t <div ng-controller=\"ExampleController\">\n\t <form name=\"userForm\">\n\t <label>Name:\n\t <input type=\"text\" name=\"userName\"\n\t ng-model=\"user.name\"\n\t ng-model-options=\"{ getterSetter: true }\" />\n\t </label>\n\t </form>\n\t <pre>user.name = <span ng-bind=\"user.name()\"></span></pre>\n\t </div>\n\t </file>\n\t <file name=\"app.js\">\n\t angular.module('getterSetterExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t var _name = 'Brian';\n\t $scope.user = {\n\t name: function(newName) {\n\t // Note that newName can be undefined for two reasons:\n\t // 1. Because it is called as a getter and thus called with no arguments\n\t // 2. Because the property should actually be set to undefined. This happens e.g. if the\n\t // input is invalid\n\t return arguments.length ? (_name = newName) : _name;\n\t }\n\t };\n\t }]);\n\t </file>\n\t * </example>\n\t */\n\tvar ngModelDirective = ['$rootScope', function($rootScope) {\n\t return {\n\t restrict: 'A',\n\t require: ['ngModel', '^?form', '^?ngModelOptions'],\n\t controller: NgModelController,\n\t // Prelink needs to run before any input directive\n\t // so that we can set the NgModelOptions in NgModelController\n\t // before anyone else uses it.\n\t priority: 1,\n\t compile: function ngModelCompile(element) {\n\t // Setup initial state of the control\n\t element.addClass(PRISTINE_CLASS).addClass(UNTOUCHED_CLASS).addClass(VALID_CLASS);\n\t\n\t return {\n\t pre: function ngModelPreLink(scope, element, attr, ctrls) {\n\t var modelCtrl = ctrls[0],\n\t formCtrl = ctrls[1] || modelCtrl.$$parentForm;\n\t\n\t modelCtrl.$$setOptions(ctrls[2] && ctrls[2].$options);\n\t\n\t // notify others, especially parent forms\n\t formCtrl.$addControl(modelCtrl);\n\t\n\t attr.$observe('name', function(newValue) {\n\t if (modelCtrl.$name !== newValue) {\n\t modelCtrl.$$parentForm.$$renameControl(modelCtrl, newValue);\n\t }\n\t });\n\t\n\t scope.$on('$destroy', function() {\n\t modelCtrl.$$parentForm.$removeControl(modelCtrl);\n\t });\n\t },\n\t post: function ngModelPostLink(scope, element, attr, ctrls) {\n\t var modelCtrl = ctrls[0];\n\t if (modelCtrl.$options && modelCtrl.$options.updateOn) {\n\t element.on(modelCtrl.$options.updateOn, function(ev) {\n\t modelCtrl.$$debounceViewValueCommit(ev && ev.type);\n\t });\n\t }\n\t\n\t element.on('blur', function(ev) {\n\t if (modelCtrl.$touched) return;\n\t\n\t if ($rootScope.$$phase) {\n\t scope.$evalAsync(modelCtrl.$setTouched);\n\t } else {\n\t scope.$apply(modelCtrl.$setTouched);\n\t }\n\t });\n\t }\n\t };\n\t }\n\t };\n\t}];\n\t\n\tvar DEFAULT_REGEXP = /(\\s+|^)default(\\s+|$)/;\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngModelOptions\n\t *\n\t * @description\n\t * Allows tuning how model updates are done. Using `ngModelOptions` you can specify a custom list of\n\t * events that will trigger a model update and/or a debouncing delay so that the actual update only\n\t * takes place when a timer expires; this timer will be reset after another change takes place.\n\t *\n\t * Given the nature of `ngModelOptions`, the value displayed inside input fields in the view might\n\t * be different from the value in the actual model. This means that if you update the model you\n\t * should also invoke {@link ngModel.NgModelController `$rollbackViewValue`} on the relevant input field in\n\t * order to make sure it is synchronized with the model and that any debounced action is canceled.\n\t *\n\t * The easiest way to reference the control's {@link ngModel.NgModelController `$rollbackViewValue`}\n\t * method is by making sure the input is placed inside a form that has a `name` attribute. This is\n\t * important because `form` controllers are published to the related scope under the name in their\n\t * `name` attribute.\n\t *\n\t * Any pending changes will take place immediately when an enclosing form is submitted via the\n\t * `submit` event. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`\n\t * to have access to the updated model.\n\t *\n\t * `ngModelOptions` has an effect on the element it's declared on and its descendants.\n\t *\n\t * @param {Object} ngModelOptions options to apply to the current model. Valid keys are:\n\t * - `updateOn`: string specifying which event should the input be bound to. You can set several\n\t * events using an space delimited list. There is a special event called `default` that\n\t * matches the default events belonging of the control.\n\t * - `debounce`: integer value which contains the debounce model update value in milliseconds. A\n\t * value of 0 triggers an immediate update. If an object is supplied instead, you can specify a\n\t * custom value for each event. For example:\n\t * `ng-model-options=\"{ updateOn: 'default blur', debounce: { 'default': 500, 'blur': 0 } }\"`\n\t * - `allowInvalid`: boolean value which indicates that the model can be set with values that did\n\t * not validate correctly instead of the default behavior of setting the model to undefined.\n\t * - `getterSetter`: boolean value which determines whether or not to treat functions bound to\n\t `ngModel` as getters/setters.\n\t * - `timezone`: Defines the timezone to be used to read/write the `Date` instance in the model for\n\t * `<input type=\"date\">`, `<input type=\"time\">`, ... . It understands UTC/GMT and the\n\t * continental US time zone abbreviations, but for general use, use a time zone offset, for\n\t * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian)\n\t * If not specified, the timezone of the browser will be used.\n\t *\n\t * @example\n\t\n\t The following example shows how to override immediate updates. Changes on the inputs within the\n\t form will update the model only when the control loses focus (blur event). If `escape` key is\n\t pressed while the input field is focused, the value is reset to the value in the current model.\n\t\n\t <example name=\"ngModelOptions-directive-blur\" module=\"optionsExample\">\n\t <file name=\"index.html\">\n\t <div ng-controller=\"ExampleController\">\n\t <form name=\"userForm\">\n\t <label>Name:\n\t <input type=\"text\" name=\"userName\"\n\t ng-model=\"user.name\"\n\t ng-model-options=\"{ updateOn: 'blur' }\"\n\t ng-keyup=\"cancel($event)\" />\n\t </label><br />\n\t <label>Other data:\n\t <input type=\"text\" ng-model=\"user.data\" />\n\t </label><br />\n\t </form>\n\t <pre>user.name = <span ng-bind=\"user.name\"></span></pre>\n\t <pre>user.data = <span ng-bind=\"user.data\"></span></pre>\n\t </div>\n\t </file>\n\t <file name=\"app.js\">\n\t angular.module('optionsExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.user = { name: 'John', data: '' };\n\t\n\t $scope.cancel = function(e) {\n\t if (e.keyCode == 27) {\n\t $scope.userForm.userName.$rollbackViewValue();\n\t }\n\t };\n\t }]);\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var model = element(by.binding('user.name'));\n\t var input = element(by.model('user.name'));\n\t var other = element(by.model('user.data'));\n\t\n\t it('should allow custom events', function() {\n\t input.sendKeys(' Doe');\n\t input.click();\n\t expect(model.getText()).toEqual('John');\n\t other.click();\n\t expect(model.getText()).toEqual('John Doe');\n\t });\n\t\n\t it('should $rollbackViewValue when model changes', function() {\n\t input.sendKeys(' Doe');\n\t expect(input.getAttribute('value')).toEqual('John Doe');\n\t input.sendKeys(protractor.Key.ESCAPE);\n\t expect(input.getAttribute('value')).toEqual('John');\n\t other.click();\n\t expect(model.getText()).toEqual('John');\n\t });\n\t </file>\n\t </example>\n\t\n\t This one shows how to debounce model changes. Model will be updated only 1 sec after last change.\n\t If the `Clear` button is pressed, any debounced action is canceled and the value becomes empty.\n\t\n\t <example name=\"ngModelOptions-directive-debounce\" module=\"optionsExample\">\n\t <file name=\"index.html\">\n\t <div ng-controller=\"ExampleController\">\n\t <form name=\"userForm\">\n\t <label>Name:\n\t <input type=\"text\" name=\"userName\"\n\t ng-model=\"user.name\"\n\t ng-model-options=\"{ debounce: 1000 }\" />\n\t </label>\n\t <button ng-click=\"userForm.userName.$rollbackViewValue(); user.name=''\">Clear</button>\n\t <br />\n\t </form>\n\t <pre>user.name = <span ng-bind=\"user.name\"></span></pre>\n\t </div>\n\t </file>\n\t <file name=\"app.js\">\n\t angular.module('optionsExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.user = { name: 'Igor' };\n\t }]);\n\t </file>\n\t </example>\n\t\n\t This one shows how to bind to getter/setters:\n\t\n\t <example name=\"ngModelOptions-directive-getter-setter\" module=\"getterSetterExample\">\n\t <file name=\"index.html\">\n\t <div ng-controller=\"ExampleController\">\n\t <form name=\"userForm\">\n\t <label>Name:\n\t <input type=\"text\" name=\"userName\"\n\t ng-model=\"user.name\"\n\t ng-model-options=\"{ getterSetter: true }\" />\n\t </label>\n\t </form>\n\t <pre>user.name = <span ng-bind=\"user.name()\"></span></pre>\n\t </div>\n\t </file>\n\t <file name=\"app.js\">\n\t angular.module('getterSetterExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t var _name = 'Brian';\n\t $scope.user = {\n\t name: function(newName) {\n\t // Note that newName can be undefined for two reasons:\n\t // 1. Because it is called as a getter and thus called with no arguments\n\t // 2. Because the property should actually be set to undefined. This happens e.g. if the\n\t // input is invalid\n\t return arguments.length ? (_name = newName) : _name;\n\t }\n\t };\n\t }]);\n\t </file>\n\t </example>\n\t */\n\tvar ngModelOptionsDirective = function() {\n\t return {\n\t restrict: 'A',\n\t controller: ['$scope', '$attrs', function($scope, $attrs) {\n\t var that = this;\n\t this.$options = copy($scope.$eval($attrs.ngModelOptions));\n\t // Allow adding/overriding bound events\n\t if (isDefined(this.$options.updateOn)) {\n\t this.$options.updateOnDefault = false;\n\t // extract \"default\" pseudo-event from list of events that can trigger a model update\n\t this.$options.updateOn = trim(this.$options.updateOn.replace(DEFAULT_REGEXP, function() {\n\t that.$options.updateOnDefault = true;\n\t return ' ';\n\t }));\n\t } else {\n\t this.$options.updateOnDefault = true;\n\t }\n\t }]\n\t };\n\t};\n\t\n\t\n\t\n\t// helper methods\n\tfunction addSetValidityMethod(context) {\n\t var ctrl = context.ctrl,\n\t $element = context.$element,\n\t classCache = {},\n\t set = context.set,\n\t unset = context.unset,\n\t $animate = context.$animate;\n\t\n\t classCache[INVALID_CLASS] = !(classCache[VALID_CLASS] = $element.hasClass(VALID_CLASS));\n\t\n\t ctrl.$setValidity = setValidity;\n\t\n\t function setValidity(validationErrorKey, state, controller) {\n\t if (isUndefined(state)) {\n\t createAndSet('$pending', validationErrorKey, controller);\n\t } else {\n\t unsetAndCleanup('$pending', validationErrorKey, controller);\n\t }\n\t if (!isBoolean(state)) {\n\t unset(ctrl.$error, validationErrorKey, controller);\n\t unset(ctrl.$$success, validationErrorKey, controller);\n\t } else {\n\t if (state) {\n\t unset(ctrl.$error, validationErrorKey, controller);\n\t set(ctrl.$$success, validationErrorKey, controller);\n\t } else {\n\t set(ctrl.$error, validationErrorKey, controller);\n\t unset(ctrl.$$success, validationErrorKey, controller);\n\t }\n\t }\n\t if (ctrl.$pending) {\n\t cachedToggleClass(PENDING_CLASS, true);\n\t ctrl.$valid = ctrl.$invalid = undefined;\n\t toggleValidationCss('', null);\n\t } else {\n\t cachedToggleClass(PENDING_CLASS, false);\n\t ctrl.$valid = isObjectEmpty(ctrl.$error);\n\t ctrl.$invalid = !ctrl.$valid;\n\t toggleValidationCss('', ctrl.$valid);\n\t }\n\t\n\t // re-read the state as the set/unset methods could have\n\t // combined state in ctrl.$error[validationError] (used for forms),\n\t // where setting/unsetting only increments/decrements the value,\n\t // and does not replace it.\n\t var combinedState;\n\t if (ctrl.$pending && ctrl.$pending[validationErrorKey]) {\n\t combinedState = undefined;\n\t } else if (ctrl.$error[validationErrorKey]) {\n\t combinedState = false;\n\t } else if (ctrl.$$success[validationErrorKey]) {\n\t combinedState = true;\n\t } else {\n\t combinedState = null;\n\t }\n\t\n\t toggleValidationCss(validationErrorKey, combinedState);\n\t ctrl.$$parentForm.$setValidity(validationErrorKey, combinedState, ctrl);\n\t }\n\t\n\t function createAndSet(name, value, controller) {\n\t if (!ctrl[name]) {\n\t ctrl[name] = {};\n\t }\n\t set(ctrl[name], value, controller);\n\t }\n\t\n\t function unsetAndCleanup(name, value, controller) {\n\t if (ctrl[name]) {\n\t unset(ctrl[name], value, controller);\n\t }\n\t if (isObjectEmpty(ctrl[name])) {\n\t ctrl[name] = undefined;\n\t }\n\t }\n\t\n\t function cachedToggleClass(className, switchValue) {\n\t if (switchValue && !classCache[className]) {\n\t $animate.addClass($element, className);\n\t classCache[className] = true;\n\t } else if (!switchValue && classCache[className]) {\n\t $animate.removeClass($element, className);\n\t classCache[className] = false;\n\t }\n\t }\n\t\n\t function toggleValidationCss(validationErrorKey, isValid) {\n\t validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';\n\t\n\t cachedToggleClass(VALID_CLASS + validationErrorKey, isValid === true);\n\t cachedToggleClass(INVALID_CLASS + validationErrorKey, isValid === false);\n\t }\n\t}\n\t\n\tfunction isObjectEmpty(obj) {\n\t if (obj) {\n\t for (var prop in obj) {\n\t if (obj.hasOwnProperty(prop)) {\n\t return false;\n\t }\n\t }\n\t }\n\t return true;\n\t}\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngNonBindable\n\t * @restrict AC\n\t * @priority 1000\n\t *\n\t * @description\n\t * The `ngNonBindable` directive tells Angular not to compile or bind the contents of the current\n\t * DOM element. This is useful if the element contains what appears to be Angular directives and\n\t * bindings but which should be ignored by Angular. This could be the case if you have a site that\n\t * displays snippets of code, for instance.\n\t *\n\t * @element ANY\n\t *\n\t * @example\n\t * In this example there are two locations where a simple interpolation binding (`{{}}`) is present,\n\t * but the one wrapped in `ngNonBindable` is left alone.\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <div>Normal: {{1 + 2}}</div>\n\t <div ng-non-bindable>Ignored: {{1 + 2}}</div>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should check ng-non-bindable', function() {\n\t expect(element(by.binding('1 + 2')).getText()).toContain('3');\n\t expect(element.all(by.css('div')).last().getText()).toMatch(/1 \\+ 2/);\n\t });\n\t </file>\n\t </example>\n\t */\n\tvar ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });\n\t\n\t/* global jqLiteRemove */\n\t\n\tvar ngOptionsMinErr = minErr('ngOptions');\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngOptions\n\t * @restrict A\n\t *\n\t * @description\n\t *\n\t * The `ngOptions` attribute can be used to dynamically generate a list of `<option>`\n\t * elements for the `<select>` element using the array or object obtained by evaluating the\n\t * `ngOptions` comprehension expression.\n\t *\n\t * In many cases, `ngRepeat` can be used on `<option>` elements instead of `ngOptions` to achieve a\n\t * similar result. However, `ngOptions` provides some benefits such as reducing memory and\n\t * increasing speed by not creating a new scope for each repeated instance, as well as providing\n\t * more flexibility in how the `<select>`'s model is assigned via the `select` **`as`** part of the\n\t * comprehension expression. `ngOptions` should be used when the `<select>` model needs to be bound\n\t * to a non-string value. This is because an option element can only be bound to string values at\n\t * present.\n\t *\n\t * When an item in the `<select>` menu is selected, the array element or object property\n\t * represented by the selected option will be bound to the model identified by the `ngModel`\n\t * directive.\n\t *\n\t * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can\n\t * be nested into the `<select>` element. This element will then represent the `null` or \"not selected\"\n\t * option. See example below for demonstration.\n\t *\n\t * ## Complex Models (objects or collections)\n\t *\n\t * By default, `ngModel` watches the model by reference, not value. This is important to know when\n\t * binding the select to a model that is an object or a collection.\n\t *\n\t * One issue occurs if you want to preselect an option. For example, if you set\n\t * the model to an object that is equal to an object in your collection, `ngOptions` won't be able to set the selection,\n\t * because the objects are not identical. So by default, you should always reference the item in your collection\n\t * for preselections, e.g.: `$scope.selected = $scope.collection[3]`.\n\t *\n\t * Another solution is to use a `track by` clause, because then `ngOptions` will track the identity\n\t * of the item not by reference, but by the result of the `track by` expression. For example, if your\n\t * collection items have an id property, you would `track by item.id`.\n\t *\n\t * A different issue with objects or collections is that ngModel won't detect if an object property or\n\t * a collection item changes. For that reason, `ngOptions` additionally watches the model using\n\t * `$watchCollection`, when the expression contains a `track by` clause or the the select has the `multiple` attribute.\n\t * This allows ngOptions to trigger a re-rendering of the options even if the actual object/collection\n\t * has not changed identity, but only a property on the object or an item in the collection changes.\n\t *\n\t * Note that `$watchCollection` does a shallow comparison of the properties of the object (or the items in the collection\n\t * if the model is an array). This means that changing a property deeper than the first level inside the\n\t * object/collection will not trigger a re-rendering.\n\t *\n\t * ## `select` **`as`**\n\t *\n\t * Using `select` **`as`** will bind the result of the `select` expression to the model, but\n\t * the value of the `<select>` and `<option>` html elements will be either the index (for array data sources)\n\t * or property name (for object data sources) of the value within the collection. If a **`track by`** expression\n\t * is used, the result of that expression will be set as the value of the `option` and `select` elements.\n\t *\n\t *\n\t * ### `select` **`as`** and **`track by`**\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * Be careful when using `select` **`as`** and **`track by`** in the same expression.\n\t * </div>\n\t *\n\t * Given this array of items on the $scope:\n\t *\n\t * ```js\n\t * $scope.items = [{\n\t * id: 1,\n\t * label: 'aLabel',\n\t * subItem: { name: 'aSubItem' }\n\t * }, {\n\t * id: 2,\n\t * label: 'bLabel',\n\t * subItem: { name: 'bSubItem' }\n\t * }];\n\t * ```\n\t *\n\t * This will work:\n\t *\n\t * ```html\n\t * <select ng-options=\"item as item.label for item in items track by item.id\" ng-model=\"selected\"></select>\n\t * ```\n\t * ```js\n\t * $scope.selected = $scope.items[0];\n\t * ```\n\t *\n\t * but this will not work:\n\t *\n\t * ```html\n\t * <select ng-options=\"item.subItem as item.label for item in items track by item.id\" ng-model=\"selected\"></select>\n\t * ```\n\t * ```js\n\t * $scope.selected = $scope.items[0].subItem;\n\t * ```\n\t *\n\t * In both examples, the **`track by`** expression is applied successfully to each `item` in the\n\t * `items` array. Because the selected option has been set programmatically in the controller, the\n\t * **`track by`** expression is also applied to the `ngModel` value. In the first example, the\n\t * `ngModel` value is `items[0]` and the **`track by`** expression evaluates to `items[0].id` with\n\t * no issue. In the second example, the `ngModel` value is `items[0].subItem` and the **`track by`**\n\t * expression evaluates to `items[0].subItem.id` (which is undefined). As a result, the model value\n\t * is not matched against any `<option>` and the `<select>` appears as having no selected value.\n\t *\n\t *\n\t * @param {string} ngModel Assignable angular expression to data-bind to.\n\t * @param {string=} name Property name of the form under which the control is published.\n\t * @param {string=} required The control is considered valid only if value is entered.\n\t * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n\t * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n\t * `required` when you want to data-bind to the `required` attribute.\n\t * @param {comprehension_expression=} ngOptions in one of the following forms:\n\t *\n\t * * for array data sources:\n\t * * `label` **`for`** `value` **`in`** `array`\n\t * * `select` **`as`** `label` **`for`** `value` **`in`** `array`\n\t * * `label` **`group by`** `group` **`for`** `value` **`in`** `array`\n\t * * `label` **`disable when`** `disable` **`for`** `value` **`in`** `array`\n\t * * `label` **`group by`** `group` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`\n\t * * `label` **`disable when`** `disable` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`\n\t * * `label` **`for`** `value` **`in`** `array` | orderBy:`orderexpr` **`track by`** `trackexpr`\n\t * (for including a filter with `track by`)\n\t * * for object data sources:\n\t * * `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n\t * * `select` **`as`** `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n\t * * `label` **`group by`** `group` **`for (`**`key`**`,`** `value`**`) in`** `object`\n\t * * `label` **`disable when`** `disable` **`for (`**`key`**`,`** `value`**`) in`** `object`\n\t * * `select` **`as`** `label` **`group by`** `group`\n\t * **`for` `(`**`key`**`,`** `value`**`) in`** `object`\n\t * * `select` **`as`** `label` **`disable when`** `disable`\n\t * **`for` `(`**`key`**`,`** `value`**`) in`** `object`\n\t *\n\t * Where:\n\t *\n\t * * `array` / `object`: an expression which evaluates to an array / object to iterate over.\n\t * * `value`: local variable which will refer to each item in the `array` or each property value\n\t * of `object` during iteration.\n\t * * `key`: local variable which will refer to a property name in `object` during iteration.\n\t * * `label`: The result of this expression will be the label for `<option>` element. The\n\t * `expression` will most likely refer to the `value` variable (e.g. `value.propertyName`).\n\t * * `select`: The result of this expression will be bound to the model of the parent `<select>`\n\t * element. If not specified, `select` expression will default to `value`.\n\t * * `group`: The result of this expression will be used to group options using the `<optgroup>`\n\t * DOM element.\n\t * * `disable`: The result of this expression will be used to disable the rendered `<option>`\n\t * element. Return `true` to disable.\n\t * * `trackexpr`: Used when working with an array of objects. The result of this expression will be\n\t * used to identify the objects in the array. The `trackexpr` will most likely refer to the\n\t * `value` variable (e.g. `value.propertyName`). With this the selection is preserved\n\t * even when the options are recreated (e.g. reloaded from the server).\n\t *\n\t * @example\n\t <example module=\"selectExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('selectExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.colors = [\n\t {name:'black', shade:'dark'},\n\t {name:'white', shade:'light', notAnOption: true},\n\t {name:'red', shade:'dark'},\n\t {name:'blue', shade:'dark', notAnOption: true},\n\t {name:'yellow', shade:'light', notAnOption: false}\n\t ];\n\t $scope.myColor = $scope.colors[2]; // red\n\t }]);\n\t </script>\n\t <div ng-controller=\"ExampleController\">\n\t <ul>\n\t <li ng-repeat=\"color in colors\">\n\t <label>Name: <input ng-model=\"color.name\"></label>\n\t <label><input type=\"checkbox\" ng-model=\"color.notAnOption\"> Disabled?</label>\n\t <button ng-click=\"colors.splice($index, 1)\" aria-label=\"Remove\">X</button>\n\t </li>\n\t <li>\n\t <button ng-click=\"colors.push({})\">add</button>\n\t </li>\n\t </ul>\n\t <hr/>\n\t <label>Color (null not allowed):\n\t <select ng-model=\"myColor\" ng-options=\"color.name for color in colors\"></select>\n\t </label><br/>\n\t <label>Color (null allowed):\n\t <span class=\"nullable\">\n\t <select ng-model=\"myColor\" ng-options=\"color.name for color in colors\">\n\t <option value=\"\">-- choose color --</option>\n\t </select>\n\t </span></label><br/>\n\t\n\t <label>Color grouped by shade:\n\t <select ng-model=\"myColor\" ng-options=\"color.name group by color.shade for color in colors\">\n\t </select>\n\t </label><br/>\n\t\n\t <label>Color grouped by shade, with some disabled:\n\t <select ng-model=\"myColor\"\n\t ng-options=\"color.name group by color.shade disable when color.notAnOption for color in colors\">\n\t </select>\n\t </label><br/>\n\t\n\t\n\t\n\t Select <button ng-click=\"myColor = { name:'not in list', shade: 'other' }\">bogus</button>.\n\t <br/>\n\t <hr/>\n\t Currently selected: {{ {selected_color:myColor} }}\n\t <div style=\"border:solid 1px black; height:20px\"\n\t ng-style=\"{'background-color':myColor.name}\">\n\t </div>\n\t </div>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should check ng-options', function() {\n\t expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red');\n\t element.all(by.model('myColor')).first().click();\n\t element.all(by.css('select[ng-model=\"myColor\"] option')).first().click();\n\t expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black');\n\t element(by.css('.nullable select[ng-model=\"myColor\"]')).click();\n\t element.all(by.css('.nullable select[ng-model=\"myColor\"] option')).first().click();\n\t expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null');\n\t });\n\t </file>\n\t </example>\n\t */\n\t\n\t// jshint maxlen: false\n\t// //00001111111111000000000002222222222000000000000000000000333333333300000000000000000000000004444444444400000000000005555555555555550000000006666666666666660000000777777777777777000000000000000888888888800000000000000000009999999999\n\tvar NG_OPTIONS_REGEXP = /^\\s*([\\s\\S]+?)(?:\\s+as\\s+([\\s\\S]+?))?(?:\\s+group\\s+by\\s+([\\s\\S]+?))?(?:\\s+disable\\s+when\\s+([\\s\\S]+?))?\\s+for\\s+(?:([\\$\\w][\\$\\w]*)|(?:\\(\\s*([\\$\\w][\\$\\w]*)\\s*,\\s*([\\$\\w][\\$\\w]*)\\s*\\)))\\s+in\\s+([\\s\\S]+?)(?:\\s+track\\s+by\\s+([\\s\\S]+?))?$/;\n\t // 1: value expression (valueFn)\n\t // 2: label expression (displayFn)\n\t // 3: group by expression (groupByFn)\n\t // 4: disable when expression (disableWhenFn)\n\t // 5: array item variable name\n\t // 6: object item key variable name\n\t // 7: object item value variable name\n\t // 8: collection expression\n\t // 9: track by expression\n\t// jshint maxlen: 100\n\t\n\t\n\tvar ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) {\n\t\n\t function parseOptionsExpression(optionsExp, selectElement, scope) {\n\t\n\t var match = optionsExp.match(NG_OPTIONS_REGEXP);\n\t if (!(match)) {\n\t throw ngOptionsMinErr('iexp',\n\t \"Expected expression in form of \" +\n\t \"'_select_ (as _label_)? for (_key_,)?_value_ in _collection_'\" +\n\t \" but got '{0}'. Element: {1}\",\n\t optionsExp, startingTag(selectElement));\n\t }\n\t\n\t // Extract the parts from the ngOptions expression\n\t\n\t // The variable name for the value of the item in the collection\n\t var valueName = match[5] || match[7];\n\t // The variable name for the key of the item in the collection\n\t var keyName = match[6];\n\t\n\t // An expression that generates the viewValue for an option if there is a label expression\n\t var selectAs = / as /.test(match[0]) && match[1];\n\t // An expression that is used to track the id of each object in the options collection\n\t var trackBy = match[9];\n\t // An expression that generates the viewValue for an option if there is no label expression\n\t var valueFn = $parse(match[2] ? match[1] : valueName);\n\t var selectAsFn = selectAs && $parse(selectAs);\n\t var viewValueFn = selectAsFn || valueFn;\n\t var trackByFn = trackBy && $parse(trackBy);\n\t\n\t // Get the value by which we are going to track the option\n\t // if we have a trackFn then use that (passing scope and locals)\n\t // otherwise just hash the given viewValue\n\t var getTrackByValueFn = trackBy ?\n\t function(value, locals) { return trackByFn(scope, locals); } :\n\t function getHashOfValue(value) { return hashKey(value); };\n\t var getTrackByValue = function(value, key) {\n\t return getTrackByValueFn(value, getLocals(value, key));\n\t };\n\t\n\t var displayFn = $parse(match[2] || match[1]);\n\t var groupByFn = $parse(match[3] || '');\n\t var disableWhenFn = $parse(match[4] || '');\n\t var valuesFn = $parse(match[8]);\n\t\n\t var locals = {};\n\t var getLocals = keyName ? function(value, key) {\n\t locals[keyName] = key;\n\t locals[valueName] = value;\n\t return locals;\n\t } : function(value) {\n\t locals[valueName] = value;\n\t return locals;\n\t };\n\t\n\t\n\t function Option(selectValue, viewValue, label, group, disabled) {\n\t this.selectValue = selectValue;\n\t this.viewValue = viewValue;\n\t this.label = label;\n\t this.group = group;\n\t this.disabled = disabled;\n\t }\n\t\n\t function getOptionValuesKeys(optionValues) {\n\t var optionValuesKeys;\n\t\n\t if (!keyName && isArrayLike(optionValues)) {\n\t optionValuesKeys = optionValues;\n\t } else {\n\t // if object, extract keys, in enumeration order, unsorted\n\t optionValuesKeys = [];\n\t for (var itemKey in optionValues) {\n\t if (optionValues.hasOwnProperty(itemKey) && itemKey.charAt(0) !== '$') {\n\t optionValuesKeys.push(itemKey);\n\t }\n\t }\n\t }\n\t return optionValuesKeys;\n\t }\n\t\n\t return {\n\t trackBy: trackBy,\n\t getTrackByValue: getTrackByValue,\n\t getWatchables: $parse(valuesFn, function(optionValues) {\n\t // Create a collection of things that we would like to watch (watchedArray)\n\t // so that they can all be watched using a single $watchCollection\n\t // that only runs the handler once if anything changes\n\t var watchedArray = [];\n\t optionValues = optionValues || [];\n\t\n\t var optionValuesKeys = getOptionValuesKeys(optionValues);\n\t var optionValuesLength = optionValuesKeys.length;\n\t for (var index = 0; index < optionValuesLength; index++) {\n\t var key = (optionValues === optionValuesKeys) ? index : optionValuesKeys[index];\n\t var value = optionValues[key];\n\t\n\t var locals = getLocals(optionValues[key], key);\n\t var selectValue = getTrackByValueFn(optionValues[key], locals);\n\t watchedArray.push(selectValue);\n\t\n\t // Only need to watch the displayFn if there is a specific label expression\n\t if (match[2] || match[1]) {\n\t var label = displayFn(scope, locals);\n\t watchedArray.push(label);\n\t }\n\t\n\t // Only need to watch the disableWhenFn if there is a specific disable expression\n\t if (match[4]) {\n\t var disableWhen = disableWhenFn(scope, locals);\n\t watchedArray.push(disableWhen);\n\t }\n\t }\n\t return watchedArray;\n\t }),\n\t\n\t getOptions: function() {\n\t\n\t var optionItems = [];\n\t var selectValueMap = {};\n\t\n\t // The option values were already computed in the `getWatchables` fn,\n\t // which must have been called to trigger `getOptions`\n\t var optionValues = valuesFn(scope) || [];\n\t var optionValuesKeys = getOptionValuesKeys(optionValues);\n\t var optionValuesLength = optionValuesKeys.length;\n\t\n\t for (var index = 0; index < optionValuesLength; index++) {\n\t var key = (optionValues === optionValuesKeys) ? index : optionValuesKeys[index];\n\t var value = optionValues[key];\n\t var locals = getLocals(value, key);\n\t var viewValue = viewValueFn(scope, locals);\n\t var selectValue = getTrackByValueFn(viewValue, locals);\n\t var label = displayFn(scope, locals);\n\t var group = groupByFn(scope, locals);\n\t var disabled = disableWhenFn(scope, locals);\n\t var optionItem = new Option(selectValue, viewValue, label, group, disabled);\n\t\n\t optionItems.push(optionItem);\n\t selectValueMap[selectValue] = optionItem;\n\t }\n\t\n\t return {\n\t items: optionItems,\n\t selectValueMap: selectValueMap,\n\t getOptionFromViewValue: function(value) {\n\t return selectValueMap[getTrackByValue(value)];\n\t },\n\t getViewValueFromOption: function(option) {\n\t // If the viewValue could be an object that may be mutated by the application,\n\t // we need to make a copy and not return the reference to the value on the option.\n\t return trackBy ? angular.copy(option.viewValue) : option.viewValue;\n\t }\n\t };\n\t }\n\t };\n\t }\n\t\n\t\n\t // we can't just jqLite('<option>') since jqLite is not smart enough\n\t // to create it in <select> and IE barfs otherwise.\n\t var optionTemplate = document.createElement('option'),\n\t optGroupTemplate = document.createElement('optgroup');\n\t\n\t\n\t function ngOptionsPostLink(scope, selectElement, attr, ctrls) {\n\t\n\t // if ngModel is not defined, we don't need to do anything\n\t var ngModelCtrl = ctrls[1];\n\t if (!ngModelCtrl) return;\n\t\n\t var selectCtrl = ctrls[0];\n\t var multiple = attr.multiple;\n\t\n\t // The emptyOption allows the application developer to provide their own custom \"empty\"\n\t // option when the viewValue does not match any of the option values.\n\t var emptyOption;\n\t for (var i = 0, children = selectElement.children(), ii = children.length; i < ii; i++) {\n\t if (children[i].value === '') {\n\t emptyOption = children.eq(i);\n\t break;\n\t }\n\t }\n\t\n\t var providedEmptyOption = !!emptyOption;\n\t\n\t var unknownOption = jqLite(optionTemplate.cloneNode(false));\n\t unknownOption.val('?');\n\t\n\t var options;\n\t var ngOptions = parseOptionsExpression(attr.ngOptions, selectElement, scope);\n\t\n\t\n\t var renderEmptyOption = function() {\n\t if (!providedEmptyOption) {\n\t selectElement.prepend(emptyOption);\n\t }\n\t selectElement.val('');\n\t emptyOption.prop('selected', true); // needed for IE\n\t emptyOption.attr('selected', true);\n\t };\n\t\n\t var removeEmptyOption = function() {\n\t if (!providedEmptyOption) {\n\t emptyOption.remove();\n\t }\n\t };\n\t\n\t\n\t var renderUnknownOption = function() {\n\t selectElement.prepend(unknownOption);\n\t selectElement.val('?');\n\t unknownOption.prop('selected', true); // needed for IE\n\t unknownOption.attr('selected', true);\n\t };\n\t\n\t var removeUnknownOption = function() {\n\t unknownOption.remove();\n\t };\n\t\n\t // Update the controller methods for multiple selectable options\n\t if (!multiple) {\n\t\n\t selectCtrl.writeValue = function writeNgOptionsValue(value) {\n\t var option = options.getOptionFromViewValue(value);\n\t\n\t if (option && !option.disabled) {\n\t // Don't update the option when it is already selected.\n\t // For example, the browser will select the first option by default. In that case,\n\t // most properties are set automatically - except the `selected` attribute, which we\n\t // set always\n\t\n\t if (selectElement[0].value !== option.selectValue) {\n\t removeUnknownOption();\n\t removeEmptyOption();\n\t\n\t selectElement[0].value = option.selectValue;\n\t option.element.selected = true;\n\t }\n\t\n\t option.element.setAttribute('selected', 'selected');\n\t } else {\n\t if (value === null || providedEmptyOption) {\n\t removeUnknownOption();\n\t renderEmptyOption();\n\t } else {\n\t removeEmptyOption();\n\t renderUnknownOption();\n\t }\n\t }\n\t };\n\t\n\t selectCtrl.readValue = function readNgOptionsValue() {\n\t\n\t var selectedOption = options.selectValueMap[selectElement.val()];\n\t\n\t if (selectedOption && !selectedOption.disabled) {\n\t removeEmptyOption();\n\t removeUnknownOption();\n\t return options.getViewValueFromOption(selectedOption);\n\t }\n\t return null;\n\t };\n\t\n\t // If we are using `track by` then we must watch the tracked value on the model\n\t // since ngModel only watches for object identity change\n\t if (ngOptions.trackBy) {\n\t scope.$watch(\n\t function() { return ngOptions.getTrackByValue(ngModelCtrl.$viewValue); },\n\t function() { ngModelCtrl.$render(); }\n\t );\n\t }\n\t\n\t } else {\n\t\n\t ngModelCtrl.$isEmpty = function(value) {\n\t return !value || value.length === 0;\n\t };\n\t\n\t\n\t selectCtrl.writeValue = function writeNgOptionsMultiple(value) {\n\t options.items.forEach(function(option) {\n\t option.element.selected = false;\n\t });\n\t\n\t if (value) {\n\t value.forEach(function(item) {\n\t var option = options.getOptionFromViewValue(item);\n\t if (option && !option.disabled) option.element.selected = true;\n\t });\n\t }\n\t };\n\t\n\t\n\t selectCtrl.readValue = function readNgOptionsMultiple() {\n\t var selectedValues = selectElement.val() || [],\n\t selections = [];\n\t\n\t forEach(selectedValues, function(value) {\n\t var option = options.selectValueMap[value];\n\t if (option && !option.disabled) selections.push(options.getViewValueFromOption(option));\n\t });\n\t\n\t return selections;\n\t };\n\t\n\t // If we are using `track by` then we must watch these tracked values on the model\n\t // since ngModel only watches for object identity change\n\t if (ngOptions.trackBy) {\n\t\n\t scope.$watchCollection(function() {\n\t if (isArray(ngModelCtrl.$viewValue)) {\n\t return ngModelCtrl.$viewValue.map(function(value) {\n\t return ngOptions.getTrackByValue(value);\n\t });\n\t }\n\t }, function() {\n\t ngModelCtrl.$render();\n\t });\n\t\n\t }\n\t }\n\t\n\t\n\t if (providedEmptyOption) {\n\t\n\t // we need to remove it before calling selectElement.empty() because otherwise IE will\n\t // remove the label from the element. wtf?\n\t emptyOption.remove();\n\t\n\t // compile the element since there might be bindings in it\n\t $compile(emptyOption)(scope);\n\t\n\t // remove the class, which is added automatically because we recompile the element and it\n\t // becomes the compilation root\n\t emptyOption.removeClass('ng-scope');\n\t } else {\n\t emptyOption = jqLite(optionTemplate.cloneNode(false));\n\t }\n\t\n\t // We need to do this here to ensure that the options object is defined\n\t // when we first hit it in writeNgOptionsValue\n\t updateOptions();\n\t\n\t // We will re-render the option elements if the option values or labels change\n\t scope.$watchCollection(ngOptions.getWatchables, updateOptions);\n\t\n\t // ------------------------------------------------------------------ //\n\t\n\t\n\t function updateOptionElement(option, element) {\n\t option.element = element;\n\t element.disabled = option.disabled;\n\t // NOTE: The label must be set before the value, otherwise IE10/11/EDGE create unresponsive\n\t // selects in certain circumstances when multiple selects are next to each other and display\n\t // the option list in listbox style, i.e. the select is [multiple], or specifies a [size].\n\t // See https://github.com/angular/angular.js/issues/11314 for more info.\n\t // This is unfortunately untestable with unit / e2e tests\n\t if (option.label !== element.label) {\n\t element.label = option.label;\n\t element.textContent = option.label;\n\t }\n\t if (option.value !== element.value) element.value = option.selectValue;\n\t }\n\t\n\t function addOrReuseElement(parent, current, type, templateElement) {\n\t var element;\n\t // Check whether we can reuse the next element\n\t if (current && lowercase(current.nodeName) === type) {\n\t // The next element is the right type so reuse it\n\t element = current;\n\t } else {\n\t // The next element is not the right type so create a new one\n\t element = templateElement.cloneNode(false);\n\t if (!current) {\n\t // There are no more elements so just append it to the select\n\t parent.appendChild(element);\n\t } else {\n\t // The next element is not a group so insert the new one\n\t parent.insertBefore(element, current);\n\t }\n\t }\n\t return element;\n\t }\n\t\n\t\n\t function removeExcessElements(current) {\n\t var next;\n\t while (current) {\n\t next = current.nextSibling;\n\t jqLiteRemove(current);\n\t current = next;\n\t }\n\t }\n\t\n\t\n\t function skipEmptyAndUnknownOptions(current) {\n\t var emptyOption_ = emptyOption && emptyOption[0];\n\t var unknownOption_ = unknownOption && unknownOption[0];\n\t\n\t // We cannot rely on the extracted empty option being the same as the compiled empty option,\n\t // because the compiled empty option might have been replaced by a comment because\n\t // it had an \"element\" transclusion directive on it (such as ngIf)\n\t if (emptyOption_ || unknownOption_) {\n\t while (current &&\n\t (current === emptyOption_ ||\n\t current === unknownOption_ ||\n\t current.nodeType === NODE_TYPE_COMMENT ||\n\t (nodeName_(current) === 'option' && current.value === ''))) {\n\t current = current.nextSibling;\n\t }\n\t }\n\t return current;\n\t }\n\t\n\t\n\t function updateOptions() {\n\t\n\t var previousValue = options && selectCtrl.readValue();\n\t\n\t options = ngOptions.getOptions();\n\t\n\t var groupMap = {};\n\t var currentElement = selectElement[0].firstChild;\n\t\n\t // Ensure that the empty option is always there if it was explicitly provided\n\t if (providedEmptyOption) {\n\t selectElement.prepend(emptyOption);\n\t }\n\t\n\t currentElement = skipEmptyAndUnknownOptions(currentElement);\n\t\n\t options.items.forEach(function updateOption(option) {\n\t var group;\n\t var groupElement;\n\t var optionElement;\n\t\n\t if (option.group) {\n\t\n\t // This option is to live in a group\n\t // See if we have already created this group\n\t group = groupMap[option.group];\n\t\n\t if (!group) {\n\t\n\t // We have not already created this group\n\t groupElement = addOrReuseElement(selectElement[0],\n\t currentElement,\n\t 'optgroup',\n\t optGroupTemplate);\n\t // Move to the next element\n\t currentElement = groupElement.nextSibling;\n\t\n\t // Update the label on the group element\n\t groupElement.label = option.group;\n\t\n\t // Store it for use later\n\t group = groupMap[option.group] = {\n\t groupElement: groupElement,\n\t currentOptionElement: groupElement.firstChild\n\t };\n\t\n\t }\n\t\n\t // So now we have a group for this option we add the option to the group\n\t optionElement = addOrReuseElement(group.groupElement,\n\t group.currentOptionElement,\n\t 'option',\n\t optionTemplate);\n\t updateOptionElement(option, optionElement);\n\t // Move to the next element\n\t group.currentOptionElement = optionElement.nextSibling;\n\t\n\t } else {\n\t\n\t // This option is not in a group\n\t optionElement = addOrReuseElement(selectElement[0],\n\t currentElement,\n\t 'option',\n\t optionTemplate);\n\t updateOptionElement(option, optionElement);\n\t // Move to the next element\n\t currentElement = optionElement.nextSibling;\n\t }\n\t });\n\t\n\t\n\t // Now remove all excess options and group\n\t Object.keys(groupMap).forEach(function(key) {\n\t removeExcessElements(groupMap[key].currentOptionElement);\n\t });\n\t removeExcessElements(currentElement);\n\t\n\t ngModelCtrl.$render();\n\t\n\t // Check to see if the value has changed due to the update to the options\n\t if (!ngModelCtrl.$isEmpty(previousValue)) {\n\t var nextValue = selectCtrl.readValue();\n\t var isNotPrimitive = ngOptions.trackBy || multiple;\n\t if (isNotPrimitive ? !equals(previousValue, nextValue) : previousValue !== nextValue) {\n\t ngModelCtrl.$setViewValue(nextValue);\n\t ngModelCtrl.$render();\n\t }\n\t }\n\t\n\t }\n\t }\n\t\n\t return {\n\t restrict: 'A',\n\t terminal: true,\n\t require: ['select', '?ngModel'],\n\t link: {\n\t pre: function ngOptionsPreLink(scope, selectElement, attr, ctrls) {\n\t // Deactivate the SelectController.register method to prevent\n\t // option directives from accidentally registering themselves\n\t // (and unwanted $destroy handlers etc.)\n\t ctrls[0].registerOption = noop;\n\t },\n\t post: ngOptionsPostLink\n\t }\n\t };\n\t}];\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngPluralize\n\t * @restrict EA\n\t *\n\t * @description\n\t * `ngPluralize` is a directive that displays messages according to en-US localization rules.\n\t * These rules are bundled with angular.js, but can be overridden\n\t * (see {@link guide/i18n Angular i18n} dev guide). You configure ngPluralize directive\n\t * by specifying the mappings between\n\t * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)\n\t * and the strings to be displayed.\n\t *\n\t * # Plural categories and explicit number rules\n\t * There are two\n\t * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)\n\t * in Angular's default en-US locale: \"one\" and \"other\".\n\t *\n\t * While a plural category may match many numbers (for example, in en-US locale, \"other\" can match\n\t * any number that is not 1), an explicit number rule can only match one number. For example, the\n\t * explicit number rule for \"3\" matches the number 3. There are examples of plural categories\n\t * and explicit number rules throughout the rest of this documentation.\n\t *\n\t * # Configuring ngPluralize\n\t * You configure ngPluralize by providing 2 attributes: `count` and `when`.\n\t * You can also provide an optional attribute, `offset`.\n\t *\n\t * The value of the `count` attribute can be either a string or an {@link guide/expression\n\t * Angular expression}; these are evaluated on the current scope for its bound value.\n\t *\n\t * The `when` attribute specifies the mappings between plural categories and the actual\n\t * string to be displayed. The value of the attribute should be a JSON object.\n\t *\n\t * The following example shows how to configure ngPluralize:\n\t *\n\t * ```html\n\t * <ng-pluralize count=\"personCount\"\n\t when=\"{'0': 'Nobody is viewing.',\n\t * 'one': '1 person is viewing.',\n\t * 'other': '{} people are viewing.'}\">\n\t * </ng-pluralize>\n\t *```\n\t *\n\t * In the example, `\"0: Nobody is viewing.\"` is an explicit number rule. If you did not\n\t * specify this rule, 0 would be matched to the \"other\" category and \"0 people are viewing\"\n\t * would be shown instead of \"Nobody is viewing\". You can specify an explicit number rule for\n\t * other numbers, for example 12, so that instead of showing \"12 people are viewing\", you can\n\t * show \"a dozen people are viewing\".\n\t *\n\t * You can use a set of closed braces (`{}`) as a placeholder for the number that you want substituted\n\t * into pluralized strings. In the previous example, Angular will replace `{}` with\n\t * <span ng-non-bindable>`{{personCount}}`</span>. The closed braces `{}` is a placeholder\n\t * for <span ng-non-bindable>{{numberExpression}}</span>.\n\t *\n\t * If no rule is defined for a category, then an empty string is displayed and a warning is generated.\n\t * Note that some locales define more categories than `one` and `other`. For example, fr-fr defines `few` and `many`.\n\t *\n\t * # Configuring ngPluralize with offset\n\t * The `offset` attribute allows further customization of pluralized text, which can result in\n\t * a better user experience. For example, instead of the message \"4 people are viewing this document\",\n\t * you might display \"John, Kate and 2 others are viewing this document\".\n\t * The offset attribute allows you to offset a number by any desired value.\n\t * Let's take a look at an example:\n\t *\n\t * ```html\n\t * <ng-pluralize count=\"personCount\" offset=2\n\t * when=\"{'0': 'Nobody is viewing.',\n\t * '1': '{{person1}} is viewing.',\n\t * '2': '{{person1}} and {{person2}} are viewing.',\n\t * 'one': '{{person1}}, {{person2}} and one other person are viewing.',\n\t * 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}\">\n\t * </ng-pluralize>\n\t * ```\n\t *\n\t * Notice that we are still using two plural categories(one, other), but we added\n\t * three explicit number rules 0, 1 and 2.\n\t * When one person, perhaps John, views the document, \"John is viewing\" will be shown.\n\t * When three people view the document, no explicit number rule is found, so\n\t * an offset of 2 is taken off 3, and Angular uses 1 to decide the plural category.\n\t * In this case, plural category 'one' is matched and \"John, Mary and one other person are viewing\"\n\t * is shown.\n\t *\n\t * Note that when you specify offsets, you must provide explicit number rules for\n\t * numbers from 0 up to and including the offset. If you use an offset of 3, for example,\n\t * you must provide explicit number rules for 0, 1, 2 and 3. You must also provide plural strings for\n\t * plural categories \"one\" and \"other\".\n\t *\n\t * @param {string|expression} count The variable to be bound to.\n\t * @param {string} when The mapping between plural category to its corresponding strings.\n\t * @param {number=} offset Offset to deduct from the total number.\n\t *\n\t * @example\n\t <example module=\"pluralizeExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('pluralizeExample', [])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.person1 = 'Igor';\n\t $scope.person2 = 'Misko';\n\t $scope.personCount = 1;\n\t }]);\n\t </script>\n\t <div ng-controller=\"ExampleController\">\n\t <label>Person 1:<input type=\"text\" ng-model=\"person1\" value=\"Igor\" /></label><br/>\n\t <label>Person 2:<input type=\"text\" ng-model=\"person2\" value=\"Misko\" /></label><br/>\n\t <label>Number of People:<input type=\"text\" ng-model=\"personCount\" value=\"1\" /></label><br/>\n\t\n\t <!--- Example with simple pluralization rules for en locale --->\n\t Without Offset:\n\t <ng-pluralize count=\"personCount\"\n\t when=\"{'0': 'Nobody is viewing.',\n\t 'one': '1 person is viewing.',\n\t 'other': '{} people are viewing.'}\">\n\t </ng-pluralize><br>\n\t\n\t <!--- Example with offset --->\n\t With Offset(2):\n\t <ng-pluralize count=\"personCount\" offset=2\n\t when=\"{'0': 'Nobody is viewing.',\n\t '1': '{{person1}} is viewing.',\n\t '2': '{{person1}} and {{person2}} are viewing.',\n\t 'one': '{{person1}}, {{person2}} and one other person are viewing.',\n\t 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}\">\n\t </ng-pluralize>\n\t </div>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should show correct pluralized string', function() {\n\t var withoutOffset = element.all(by.css('ng-pluralize')).get(0);\n\t var withOffset = element.all(by.css('ng-pluralize')).get(1);\n\t var countInput = element(by.model('personCount'));\n\t\n\t expect(withoutOffset.getText()).toEqual('1 person is viewing.');\n\t expect(withOffset.getText()).toEqual('Igor is viewing.');\n\t\n\t countInput.clear();\n\t countInput.sendKeys('0');\n\t\n\t expect(withoutOffset.getText()).toEqual('Nobody is viewing.');\n\t expect(withOffset.getText()).toEqual('Nobody is viewing.');\n\t\n\t countInput.clear();\n\t countInput.sendKeys('2');\n\t\n\t expect(withoutOffset.getText()).toEqual('2 people are viewing.');\n\t expect(withOffset.getText()).toEqual('Igor and Misko are viewing.');\n\t\n\t countInput.clear();\n\t countInput.sendKeys('3');\n\t\n\t expect(withoutOffset.getText()).toEqual('3 people are viewing.');\n\t expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.');\n\t\n\t countInput.clear();\n\t countInput.sendKeys('4');\n\t\n\t expect(withoutOffset.getText()).toEqual('4 people are viewing.');\n\t expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.');\n\t });\n\t it('should show data-bound names', function() {\n\t var withOffset = element.all(by.css('ng-pluralize')).get(1);\n\t var personCount = element(by.model('personCount'));\n\t var person1 = element(by.model('person1'));\n\t var person2 = element(by.model('person2'));\n\t personCount.clear();\n\t personCount.sendKeys('4');\n\t person1.clear();\n\t person1.sendKeys('Di');\n\t person2.clear();\n\t person2.sendKeys('Vojta');\n\t expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.');\n\t });\n\t </file>\n\t </example>\n\t */\n\tvar ngPluralizeDirective = ['$locale', '$interpolate', '$log', function($locale, $interpolate, $log) {\n\t var BRACE = /{}/g,\n\t IS_WHEN = /^when(Minus)?(.+)$/;\n\t\n\t return {\n\t link: function(scope, element, attr) {\n\t var numberExp = attr.count,\n\t whenExp = attr.$attr.when && element.attr(attr.$attr.when), // we have {{}} in attrs\n\t offset = attr.offset || 0,\n\t whens = scope.$eval(whenExp) || {},\n\t whensExpFns = {},\n\t startSymbol = $interpolate.startSymbol(),\n\t endSymbol = $interpolate.endSymbol(),\n\t braceReplacement = startSymbol + numberExp + '-' + offset + endSymbol,\n\t watchRemover = angular.noop,\n\t lastCount;\n\t\n\t forEach(attr, function(expression, attributeName) {\n\t var tmpMatch = IS_WHEN.exec(attributeName);\n\t if (tmpMatch) {\n\t var whenKey = (tmpMatch[1] ? '-' : '') + lowercase(tmpMatch[2]);\n\t whens[whenKey] = element.attr(attr.$attr[attributeName]);\n\t }\n\t });\n\t forEach(whens, function(expression, key) {\n\t whensExpFns[key] = $interpolate(expression.replace(BRACE, braceReplacement));\n\t\n\t });\n\t\n\t scope.$watch(numberExp, function ngPluralizeWatchAction(newVal) {\n\t var count = parseFloat(newVal);\n\t var countIsNaN = isNaN(count);\n\t\n\t if (!countIsNaN && !(count in whens)) {\n\t // If an explicit number rule such as 1, 2, 3... is defined, just use it.\n\t // Otherwise, check it against pluralization rules in $locale service.\n\t count = $locale.pluralCat(count - offset);\n\t }\n\t\n\t // If both `count` and `lastCount` are NaN, we don't need to re-register a watch.\n\t // In JS `NaN !== NaN`, so we have to exlicitly check.\n\t if ((count !== lastCount) && !(countIsNaN && isNumber(lastCount) && isNaN(lastCount))) {\n\t watchRemover();\n\t var whenExpFn = whensExpFns[count];\n\t if (isUndefined(whenExpFn)) {\n\t if (newVal != null) {\n\t $log.debug(\"ngPluralize: no rule defined for '\" + count + \"' in \" + whenExp);\n\t }\n\t watchRemover = noop;\n\t updateElementText();\n\t } else {\n\t watchRemover = scope.$watch(whenExpFn, updateElementText);\n\t }\n\t lastCount = count;\n\t }\n\t });\n\t\n\t function updateElementText(newText) {\n\t element.text(newText || '');\n\t }\n\t }\n\t };\n\t}];\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngRepeat\n\t * @multiElement\n\t *\n\t * @description\n\t * The `ngRepeat` directive instantiates a template once per item from a collection. Each template\n\t * instance gets its own scope, where the given loop variable is set to the current collection item,\n\t * and `$index` is set to the item index or key.\n\t *\n\t * Special properties are exposed on the local scope of each template instance, including:\n\t *\n\t * | Variable | Type | Details |\n\t * |-----------|-----------------|-----------------------------------------------------------------------------|\n\t * | `$index` | {@type number} | iterator offset of the repeated element (0..length-1) |\n\t * | `$first` | {@type boolean} | true if the repeated element is first in the iterator. |\n\t * | `$middle` | {@type boolean} | true if the repeated element is between the first and last in the iterator. |\n\t * | `$last` | {@type boolean} | true if the repeated element is last in the iterator. |\n\t * | `$even` | {@type boolean} | true if the iterator position `$index` is even (otherwise false). |\n\t * | `$odd` | {@type boolean} | true if the iterator position `$index` is odd (otherwise false). |\n\t *\n\t * <div class=\"alert alert-info\">\n\t * Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}.\n\t * This may be useful when, for instance, nesting ngRepeats.\n\t * </div>\n\t *\n\t *\n\t * # Iterating over object properties\n\t *\n\t * It is possible to get `ngRepeat` to iterate over the properties of an object using the following\n\t * syntax:\n\t *\n\t * ```js\n\t * <div ng-repeat=\"(key, value) in myObj\"> ... </div>\n\t * ```\n\t *\n\t * You need to be aware that the JavaScript specification does not define the order of keys\n\t * returned for an object. (To mitigate this in Angular 1.3 the `ngRepeat` directive\n\t * used to sort the keys alphabetically.)\n\t *\n\t * Version 1.4 removed the alphabetic sorting. We now rely on the order returned by the browser\n\t * when running `for key in myObj`. It seems that browsers generally follow the strategy of providing\n\t * keys in the order in which they were defined, although there are exceptions when keys are deleted\n\t * and reinstated. See the [MDN page on `delete` for more info](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete#Cross-browser_notes).\n\t *\n\t * If this is not desired, the recommended workaround is to convert your object into an array\n\t * that is sorted into the order that you prefer before providing it to `ngRepeat`. You could\n\t * do this with a filter such as [toArrayFilter](http://ngmodules.org/modules/angular-toArrayFilter)\n\t * or implement a `$watch` on the object yourself.\n\t *\n\t *\n\t * # Tracking and Duplicates\n\t *\n\t * `ngRepeat` uses {@link $rootScope.Scope#$watchCollection $watchCollection} to detect changes in\n\t * the collection. When a change happens, ngRepeat then makes the corresponding changes to the DOM:\n\t *\n\t * * When an item is added, a new instance of the template is added to the DOM.\n\t * * When an item is removed, its template instance is removed from the DOM.\n\t * * When items are reordered, their respective templates are reordered in the DOM.\n\t *\n\t * To minimize creation of DOM elements, `ngRepeat` uses a function\n\t * to \"keep track\" of all items in the collection and their corresponding DOM elements.\n\t * For example, if an item is added to the collection, ngRepeat will know that all other items\n\t * already have DOM elements, and will not re-render them.\n\t *\n\t * The default tracking function (which tracks items by their identity) does not allow\n\t * duplicate items in arrays. This is because when there are duplicates, it is not possible\n\t * to maintain a one-to-one mapping between collection items and DOM elements.\n\t *\n\t * If you do need to repeat duplicate items, you can substitute the default tracking behavior\n\t * with your own using the `track by` expression.\n\t *\n\t * For example, you may track items by the index of each item in the collection, using the\n\t * special scope property `$index`:\n\t * ```html\n\t * <div ng-repeat=\"n in [42, 42, 43, 43] track by $index\">\n\t * {{n}}\n\t * </div>\n\t * ```\n\t *\n\t * You may also use arbitrary expressions in `track by`, including references to custom functions\n\t * on the scope:\n\t * ```html\n\t * <div ng-repeat=\"n in [42, 42, 43, 43] track by myTrackingFunction(n)\">\n\t * {{n}}\n\t * </div>\n\t * ```\n\t *\n\t * <div class=\"alert alert-success\">\n\t * If you are working with objects that have an identifier property, you should track\n\t * by the identifier instead of the whole object. Should you reload your data later, `ngRepeat`\n\t * will not have to rebuild the DOM elements for items it has already rendered, even if the\n\t * JavaScript objects in the collection have been substituted for new ones. For large collections,\n\t * this signifincantly improves rendering performance. If you don't have a unique identifier,\n\t * `track by $index` can also provide a performance boost.\n\t * </div>\n\t * ```html\n\t * <div ng-repeat=\"model in collection track by model.id\">\n\t * {{model.name}}\n\t * </div>\n\t * ```\n\t *\n\t * When no `track by` expression is provided, it is equivalent to tracking by the built-in\n\t * `$id` function, which tracks items by their identity:\n\t * ```html\n\t * <div ng-repeat=\"obj in collection track by $id(obj)\">\n\t * {{obj.prop}}\n\t * </div>\n\t * ```\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * **Note:** `track by` must always be the last expression:\n\t * </div>\n\t * ```\n\t * <div ng-repeat=\"model in collection | orderBy: 'id' as filtered_result track by model.id\">\n\t * {{model.name}}\n\t * </div>\n\t * ```\n\t *\n\t * # Special repeat start and end points\n\t * To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending\n\t * the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.\n\t * The **ng-repeat-start** directive works the same as **ng-repeat**, but will repeat all the HTML code (including the tag it's defined on)\n\t * up to and including the ending HTML tag where **ng-repeat-end** is placed.\n\t *\n\t * The example below makes use of this feature:\n\t * ```html\n\t * <header ng-repeat-start=\"item in items\">\n\t * Header {{ item }}\n\t * </header>\n\t * <div class=\"body\">\n\t * Body {{ item }}\n\t * </div>\n\t * <footer ng-repeat-end>\n\t * Footer {{ item }}\n\t * </footer>\n\t * ```\n\t *\n\t * And with an input of {@type ['A','B']} for the items variable in the example above, the output will evaluate to:\n\t * ```html\n\t * <header>\n\t * Header A\n\t * </header>\n\t * <div class=\"body\">\n\t * Body A\n\t * </div>\n\t * <footer>\n\t * Footer A\n\t * </footer>\n\t * <header>\n\t * Header B\n\t * </header>\n\t * <div class=\"body\">\n\t * Body B\n\t * </div>\n\t * <footer>\n\t * Footer B\n\t * </footer>\n\t * ```\n\t *\n\t * The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such\n\t * as **data-ng-repeat-start**, **x-ng-repeat-start** and **ng:repeat-start**).\n\t *\n\t * @animations\n\t * **.enter** - when a new item is added to the list or when an item is revealed after a filter\n\t *\n\t * **.leave** - when an item is removed from the list or when an item is filtered out\n\t *\n\t * **.move** - when an adjacent item is filtered out causing a reorder or when the item contents are reordered\n\t *\n\t * @element ANY\n\t * @scope\n\t * @priority 1000\n\t * @param {repeat_expression} ngRepeat The expression indicating how to enumerate a collection. These\n\t * formats are currently supported:\n\t *\n\t * * `variable in expression` where variable is the user defined loop variable and `expression`\n\t * is a scope expression giving the collection to enumerate.\n\t *\n\t * For example: `album in artist.albums`.\n\t *\n\t * * `(key, value) in expression` where `key` and `value` can be any user defined identifiers,\n\t * and `expression` is the scope expression giving the collection to enumerate.\n\t *\n\t * For example: `(name, age) in {'adam':10, 'amalie':12}`.\n\t *\n\t * * `variable in expression track by tracking_expression` You can also provide an optional tracking expression\n\t * which can be used to associate the objects in the collection with the DOM elements. If no tracking expression\n\t * is specified, ng-repeat associates elements by identity. It is an error to have\n\t * more than one tracking expression value resolve to the same key. (This would mean that two distinct objects are\n\t * mapped to the same DOM element, which is not possible.)\n\t *\n\t * Note that the tracking expression must come last, after any filters, and the alias expression.\n\t *\n\t * For example: `item in items` is equivalent to `item in items track by $id(item)`. This implies that the DOM elements\n\t * will be associated by item identity in the array.\n\t *\n\t * For example: `item in items track by $id(item)`. A built in `$id()` function can be used to assign a unique\n\t * `$$hashKey` property to each item in the array. This property is then used as a key to associated DOM elements\n\t * with the corresponding item in the array by identity. Moving the same object in array would move the DOM\n\t * element in the same way in the DOM.\n\t *\n\t * For example: `item in items track by item.id` is a typical pattern when the items come from the database. In this\n\t * case the object identity does not matter. Two objects are considered equivalent as long as their `id`\n\t * property is same.\n\t *\n\t * For example: `item in items | filter:searchText track by item.id` is a pattern that might be used to apply a filter\n\t * to items in conjunction with a tracking expression.\n\t *\n\t * * `variable in expression as alias_expression` You can also provide an optional alias expression which will then store the\n\t * intermediate results of the repeater after the filters have been applied. Typically this is used to render a special message\n\t * when a filter is active on the repeater, but the filtered result set is empty.\n\t *\n\t * For example: `item in items | filter:x as results` will store the fragment of the repeated items as `results`, but only after\n\t * the items have been processed through the filter.\n\t *\n\t * Please note that `as [variable name] is not an operator but rather a part of ngRepeat micro-syntax so it can be used only at the end\n\t * (and not as operator, inside an expression).\n\t *\n\t * For example: `item in items | filter : x | orderBy : order | limitTo : limit as results` .\n\t *\n\t * @example\n\t * This example initializes the scope to a list of names and\n\t * then uses `ngRepeat` to display every person:\n\t <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n\t <file name=\"index.html\">\n\t <div ng-init=\"friends = [\n\t {name:'John', age:25, gender:'boy'},\n\t {name:'Jessie', age:30, gender:'girl'},\n\t {name:'Johanna', age:28, gender:'girl'},\n\t {name:'Joy', age:15, gender:'girl'},\n\t {name:'Mary', age:28, gender:'girl'},\n\t {name:'Peter', age:95, gender:'boy'},\n\t {name:'Sebastian', age:50, gender:'boy'},\n\t {name:'Erika', age:27, gender:'girl'},\n\t {name:'Patrick', age:40, gender:'boy'},\n\t {name:'Samantha', age:60, gender:'girl'}\n\t ]\">\n\t I have {{friends.length}} friends. They are:\n\t <input type=\"search\" ng-model=\"q\" placeholder=\"filter friends...\" aria-label=\"filter friends\" />\n\t <ul class=\"example-animate-container\">\n\t <li class=\"animate-repeat\" ng-repeat=\"friend in friends | filter:q as results\">\n\t [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.\n\t </li>\n\t <li class=\"animate-repeat\" ng-if=\"results.length == 0\">\n\t <strong>No results found...</strong>\n\t </li>\n\t </ul>\n\t </div>\n\t </file>\n\t <file name=\"animations.css\">\n\t .example-animate-container {\n\t background:white;\n\t border:1px solid black;\n\t list-style:none;\n\t margin:0;\n\t padding:0 10px;\n\t }\n\t\n\t .animate-repeat {\n\t line-height:40px;\n\t list-style:none;\n\t box-sizing:border-box;\n\t }\n\t\n\t .animate-repeat.ng-move,\n\t .animate-repeat.ng-enter,\n\t .animate-repeat.ng-leave {\n\t transition:all linear 0.5s;\n\t }\n\t\n\t .animate-repeat.ng-leave.ng-leave-active,\n\t .animate-repeat.ng-move,\n\t .animate-repeat.ng-enter {\n\t opacity:0;\n\t max-height:0;\n\t }\n\t\n\t .animate-repeat.ng-leave,\n\t .animate-repeat.ng-move.ng-move-active,\n\t .animate-repeat.ng-enter.ng-enter-active {\n\t opacity:1;\n\t max-height:40px;\n\t }\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var friends = element.all(by.repeater('friend in friends'));\n\t\n\t it('should render initial data set', function() {\n\t expect(friends.count()).toBe(10);\n\t expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.');\n\t expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.');\n\t expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.');\n\t expect(element(by.binding('friends.length')).getText())\n\t .toMatch(\"I have 10 friends. They are:\");\n\t });\n\t\n\t it('should update repeater when filter predicate changes', function() {\n\t expect(friends.count()).toBe(10);\n\t\n\t element(by.model('q')).sendKeys('ma');\n\t\n\t expect(friends.count()).toBe(2);\n\t expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.');\n\t expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.');\n\t });\n\t </file>\n\t </example>\n\t */\n\tvar ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {\n\t var NG_REMOVED = '$$NG_REMOVED';\n\t var ngRepeatMinErr = minErr('ngRepeat');\n\t\n\t var updateScope = function(scope, index, valueIdentifier, value, keyIdentifier, key, arrayLength) {\n\t // TODO(perf): generate setters to shave off ~40ms or 1-1.5%\n\t scope[valueIdentifier] = value;\n\t if (keyIdentifier) scope[keyIdentifier] = key;\n\t scope.$index = index;\n\t scope.$first = (index === 0);\n\t scope.$last = (index === (arrayLength - 1));\n\t scope.$middle = !(scope.$first || scope.$last);\n\t // jshint bitwise: false\n\t scope.$odd = !(scope.$even = (index&1) === 0);\n\t // jshint bitwise: true\n\t };\n\t\n\t var getBlockStart = function(block) {\n\t return block.clone[0];\n\t };\n\t\n\t var getBlockEnd = function(block) {\n\t return block.clone[block.clone.length - 1];\n\t };\n\t\n\t\n\t return {\n\t restrict: 'A',\n\t multiElement: true,\n\t transclude: 'element',\n\t priority: 1000,\n\t terminal: true,\n\t $$tlb: true,\n\t compile: function ngRepeatCompile($element, $attr) {\n\t var expression = $attr.ngRepeat;\n\t var ngRepeatEndComment = document.createComment(' end ngRepeat: ' + expression + ' ');\n\t\n\t var match = expression.match(/^\\s*([\\s\\S]+?)\\s+in\\s+([\\s\\S]+?)(?:\\s+as\\s+([\\s\\S]+?))?(?:\\s+track\\s+by\\s+([\\s\\S]+?))?\\s*$/);\n\t\n\t if (!match) {\n\t throw ngRepeatMinErr('iexp', \"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.\",\n\t expression);\n\t }\n\t\n\t var lhs = match[1];\n\t var rhs = match[2];\n\t var aliasAs = match[3];\n\t var trackByExp = match[4];\n\t\n\t match = lhs.match(/^(?:(\\s*[\\$\\w]+)|\\(\\s*([\\$\\w]+)\\s*,\\s*([\\$\\w]+)\\s*\\))$/);\n\t\n\t if (!match) {\n\t throw ngRepeatMinErr('iidexp', \"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.\",\n\t lhs);\n\t }\n\t var valueIdentifier = match[3] || match[1];\n\t var keyIdentifier = match[2];\n\t\n\t if (aliasAs && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs) ||\n\t /^(null|undefined|this|\\$index|\\$first|\\$middle|\\$last|\\$even|\\$odd|\\$parent|\\$root|\\$id)$/.test(aliasAs))) {\n\t throw ngRepeatMinErr('badident', \"alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.\",\n\t aliasAs);\n\t }\n\t\n\t var trackByExpGetter, trackByIdExpFn, trackByIdArrayFn, trackByIdObjFn;\n\t var hashFnLocals = {$id: hashKey};\n\t\n\t if (trackByExp) {\n\t trackByExpGetter = $parse(trackByExp);\n\t } else {\n\t trackByIdArrayFn = function(key, value) {\n\t return hashKey(value);\n\t };\n\t trackByIdObjFn = function(key) {\n\t return key;\n\t };\n\t }\n\t\n\t return function ngRepeatLink($scope, $element, $attr, ctrl, $transclude) {\n\t\n\t if (trackByExpGetter) {\n\t trackByIdExpFn = function(key, value, index) {\n\t // assign key, value, and $index to the locals so that they can be used in hash functions\n\t if (keyIdentifier) hashFnLocals[keyIdentifier] = key;\n\t hashFnLocals[valueIdentifier] = value;\n\t hashFnLocals.$index = index;\n\t return trackByExpGetter($scope, hashFnLocals);\n\t };\n\t }\n\t\n\t // Store a list of elements from previous run. This is a hash where key is the item from the\n\t // iterator, and the value is objects with following properties.\n\t // - scope: bound scope\n\t // - element: previous element.\n\t // - index: position\n\t //\n\t // We are using no-proto object so that we don't need to guard against inherited props via\n\t // hasOwnProperty.\n\t var lastBlockMap = createMap();\n\t\n\t //watch props\n\t $scope.$watchCollection(rhs, function ngRepeatAction(collection) {\n\t var index, length,\n\t previousNode = $element[0], // node that cloned nodes should be inserted after\n\t // initialized to the comment node anchor\n\t nextNode,\n\t // Same as lastBlockMap but it has the current state. It will become the\n\t // lastBlockMap on the next iteration.\n\t nextBlockMap = createMap(),\n\t collectionLength,\n\t key, value, // key/value of iteration\n\t trackById,\n\t trackByIdFn,\n\t collectionKeys,\n\t block, // last object information {scope, element, id}\n\t nextBlockOrder,\n\t elementsToRemove;\n\t\n\t if (aliasAs) {\n\t $scope[aliasAs] = collection;\n\t }\n\t\n\t if (isArrayLike(collection)) {\n\t collectionKeys = collection;\n\t trackByIdFn = trackByIdExpFn || trackByIdArrayFn;\n\t } else {\n\t trackByIdFn = trackByIdExpFn || trackByIdObjFn;\n\t // if object, extract keys, in enumeration order, unsorted\n\t collectionKeys = [];\n\t for (var itemKey in collection) {\n\t if (hasOwnProperty.call(collection, itemKey) && itemKey.charAt(0) !== '$') {\n\t collectionKeys.push(itemKey);\n\t }\n\t }\n\t }\n\t\n\t collectionLength = collectionKeys.length;\n\t nextBlockOrder = new Array(collectionLength);\n\t\n\t // locate existing items\n\t for (index = 0; index < collectionLength; index++) {\n\t key = (collection === collectionKeys) ? index : collectionKeys[index];\n\t value = collection[key];\n\t trackById = trackByIdFn(key, value, index);\n\t if (lastBlockMap[trackById]) {\n\t // found previously seen block\n\t block = lastBlockMap[trackById];\n\t delete lastBlockMap[trackById];\n\t nextBlockMap[trackById] = block;\n\t nextBlockOrder[index] = block;\n\t } else if (nextBlockMap[trackById]) {\n\t // if collision detected. restore lastBlockMap and throw an error\n\t forEach(nextBlockOrder, function(block) {\n\t if (block && block.scope) lastBlockMap[block.id] = block;\n\t });\n\t throw ngRepeatMinErr('dupes',\n\t \"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}\",\n\t expression, trackById, value);\n\t } else {\n\t // new never before seen block\n\t nextBlockOrder[index] = {id: trackById, scope: undefined, clone: undefined};\n\t nextBlockMap[trackById] = true;\n\t }\n\t }\n\t\n\t // remove leftover items\n\t for (var blockKey in lastBlockMap) {\n\t block = lastBlockMap[blockKey];\n\t elementsToRemove = getBlockNodes(block.clone);\n\t $animate.leave(elementsToRemove);\n\t if (elementsToRemove[0].parentNode) {\n\t // if the element was not removed yet because of pending animation, mark it as deleted\n\t // so that we can ignore it later\n\t for (index = 0, length = elementsToRemove.length; index < length; index++) {\n\t elementsToRemove[index][NG_REMOVED] = true;\n\t }\n\t }\n\t block.scope.$destroy();\n\t }\n\t\n\t // we are not using forEach for perf reasons (trying to avoid #call)\n\t for (index = 0; index < collectionLength; index++) {\n\t key = (collection === collectionKeys) ? index : collectionKeys[index];\n\t value = collection[key];\n\t block = nextBlockOrder[index];\n\t\n\t if (block.scope) {\n\t // if we have already seen this object, then we need to reuse the\n\t // associated scope/element\n\t\n\t nextNode = previousNode;\n\t\n\t // skip nodes that are already pending removal via leave animation\n\t do {\n\t nextNode = nextNode.nextSibling;\n\t } while (nextNode && nextNode[NG_REMOVED]);\n\t\n\t if (getBlockStart(block) != nextNode) {\n\t // existing item which got moved\n\t $animate.move(getBlockNodes(block.clone), null, previousNode);\n\t }\n\t previousNode = getBlockEnd(block);\n\t updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);\n\t } else {\n\t // new item which we don't know about\n\t $transclude(function ngRepeatTransclude(clone, scope) {\n\t block.scope = scope;\n\t // http://jsperf.com/clone-vs-createcomment\n\t var endNode = ngRepeatEndComment.cloneNode(false);\n\t clone[clone.length++] = endNode;\n\t\n\t $animate.enter(clone, null, previousNode);\n\t previousNode = endNode;\n\t // Note: We only need the first/last node of the cloned nodes.\n\t // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n\t // by a directive with templateUrl when its template arrives.\n\t block.clone = clone;\n\t nextBlockMap[block.id] = block;\n\t updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);\n\t });\n\t }\n\t }\n\t lastBlockMap = nextBlockMap;\n\t });\n\t };\n\t }\n\t };\n\t}];\n\t\n\tvar NG_HIDE_CLASS = 'ng-hide';\n\tvar NG_HIDE_IN_PROGRESS_CLASS = 'ng-hide-animate';\n\t/**\n\t * @ngdoc directive\n\t * @name ngShow\n\t * @multiElement\n\t *\n\t * @description\n\t * The `ngShow` directive shows or hides the given HTML element based on the expression\n\t * provided to the `ngShow` attribute. The element is shown or hidden by removing or adding\n\t * the `.ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n\t * in AngularJS and sets the display style to none (using an !important flag).\n\t * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n\t *\n\t * ```html\n\t * <!-- when $scope.myValue is truthy (element is visible) -->\n\t * <div ng-show=\"myValue\"></div>\n\t *\n\t * <!-- when $scope.myValue is falsy (element is hidden) -->\n\t * <div ng-show=\"myValue\" class=\"ng-hide\"></div>\n\t * ```\n\t *\n\t * When the `ngShow` expression evaluates to a falsy value then the `.ng-hide` CSS class is added to the class\n\t * attribute on the element causing it to become hidden. When truthy, the `.ng-hide` CSS class is removed\n\t * from the element causing the element not to appear hidden.\n\t *\n\t * ## Why is !important used?\n\t *\n\t * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector\n\t * can be easily overridden by heavier selectors. For example, something as simple\n\t * as changing the display style on a HTML list item would make hidden elements appear visible.\n\t * This also becomes a bigger issue when dealing with CSS frameworks.\n\t *\n\t * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n\t * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n\t * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n\t *\n\t * ### Overriding `.ng-hide`\n\t *\n\t * By default, the `.ng-hide` class will style the element with `display: none!important`. If you wish to change\n\t * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`\n\t * class CSS. Note that the selector that needs to be used is actually `.ng-hide:not(.ng-hide-animate)` to cope\n\t * with extra animation classes that can be added.\n\t *\n\t * ```css\n\t * .ng-hide:not(.ng-hide-animate) {\n\t * /&#42; this is just another form of hiding an element &#42;/\n\t * display: block!important;\n\t * position: absolute;\n\t * top: -9999px;\n\t * left: -9999px;\n\t * }\n\t * ```\n\t *\n\t * By default you don't need to override in CSS anything and the animations will work around the display style.\n\t *\n\t * ## A note about animations with `ngShow`\n\t *\n\t * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n\t * is true and false. This system works like the animation system present with ngClass except that\n\t * you must also include the !important flag to override the display property\n\t * so that you can perform an animation when the element is hidden during the time of the animation.\n\t *\n\t * ```css\n\t * //\n\t * //a working example can be found at the bottom of this page\n\t * //\n\t * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n\t * /&#42; this is required as of 1.3x to properly\n\t * apply all styling in a show/hide animation &#42;/\n\t * transition: 0s linear all;\n\t * }\n\t *\n\t * .my-element.ng-hide-add-active,\n\t * .my-element.ng-hide-remove-active {\n\t * /&#42; the transition is defined in the active class &#42;/\n\t * transition: 1s linear all;\n\t * }\n\t *\n\t * .my-element.ng-hide-add { ... }\n\t * .my-element.ng-hide-add.ng-hide-add-active { ... }\n\t * .my-element.ng-hide-remove { ... }\n\t * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n\t * ```\n\t *\n\t * Keep in mind that, as of AngularJS version 1.3.0-beta.11, there is no need to change the display\n\t * property to block during animation states--ngAnimate will handle the style toggling automatically for you.\n\t *\n\t * @animations\n\t * addClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a truthy value and the just before contents are set to visible\n\t * removeClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a non truthy value and just before the contents are set to hidden\n\t *\n\t * @element ANY\n\t * @param {expression} ngShow If the {@link guide/expression expression} is truthy\n\t * then the element is shown or hidden respectively.\n\t *\n\t * @example\n\t <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n\t <file name=\"index.html\">\n\t Click me: <input type=\"checkbox\" ng-model=\"checked\" aria-label=\"Toggle ngHide\"><br/>\n\t <div>\n\t Show:\n\t <div class=\"check-element animate-show\" ng-show=\"checked\">\n\t <span class=\"glyphicon glyphicon-thumbs-up\"></span> I show up when your checkbox is checked.\n\t </div>\n\t </div>\n\t <div>\n\t Hide:\n\t <div class=\"check-element animate-show\" ng-hide=\"checked\">\n\t <span class=\"glyphicon glyphicon-thumbs-down\"></span> I hide when your checkbox is checked.\n\t </div>\n\t </div>\n\t </file>\n\t <file name=\"glyphicons.css\">\n\t @import url(../../components/bootstrap-3.1.1/css/bootstrap.css);\n\t </file>\n\t <file name=\"animations.css\">\n\t .animate-show {\n\t line-height: 20px;\n\t opacity: 1;\n\t padding: 10px;\n\t border: 1px solid black;\n\t background: white;\n\t }\n\t\n\t .animate-show.ng-hide-add, .animate-show.ng-hide-remove {\n\t transition: all linear 0.5s;\n\t }\n\t\n\t .animate-show.ng-hide {\n\t line-height: 0;\n\t opacity: 0;\n\t padding: 0 10px;\n\t }\n\t\n\t .check-element {\n\t padding: 10px;\n\t border: 1px solid black;\n\t background: white;\n\t }\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));\n\t var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));\n\t\n\t it('should check ng-show / ng-hide', function() {\n\t expect(thumbsUp.isDisplayed()).toBeFalsy();\n\t expect(thumbsDown.isDisplayed()).toBeTruthy();\n\t\n\t element(by.model('checked')).click();\n\t\n\t expect(thumbsUp.isDisplayed()).toBeTruthy();\n\t expect(thumbsDown.isDisplayed()).toBeFalsy();\n\t });\n\t </file>\n\t </example>\n\t */\n\tvar ngShowDirective = ['$animate', function($animate) {\n\t return {\n\t restrict: 'A',\n\t multiElement: true,\n\t link: function(scope, element, attr) {\n\t scope.$watch(attr.ngShow, function ngShowWatchAction(value) {\n\t // we're adding a temporary, animation-specific class for ng-hide since this way\n\t // we can control when the element is actually displayed on screen without having\n\t // to have a global/greedy CSS selector that breaks when other animations are run.\n\t // Read: https://github.com/angular/angular.js/issues/9103#issuecomment-58335845\n\t $animate[value ? 'removeClass' : 'addClass'](element, NG_HIDE_CLASS, {\n\t tempClasses: NG_HIDE_IN_PROGRESS_CLASS\n\t });\n\t });\n\t }\n\t };\n\t}];\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngHide\n\t * @multiElement\n\t *\n\t * @description\n\t * The `ngHide` directive shows or hides the given HTML element based on the expression\n\t * provided to the `ngHide` attribute. The element is shown or hidden by removing or adding\n\t * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n\t * in AngularJS and sets the display style to none (using an !important flag).\n\t * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n\t *\n\t * ```html\n\t * <!-- when $scope.myValue is truthy (element is hidden) -->\n\t * <div ng-hide=\"myValue\" class=\"ng-hide\"></div>\n\t *\n\t * <!-- when $scope.myValue is falsy (element is visible) -->\n\t * <div ng-hide=\"myValue\"></div>\n\t * ```\n\t *\n\t * When the `ngHide` expression evaluates to a truthy value then the `.ng-hide` CSS class is added to the class\n\t * attribute on the element causing it to become hidden. When falsy, the `.ng-hide` CSS class is removed\n\t * from the element causing the element not to appear hidden.\n\t *\n\t * ## Why is !important used?\n\t *\n\t * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector\n\t * can be easily overridden by heavier selectors. For example, something as simple\n\t * as changing the display style on a HTML list item would make hidden elements appear visible.\n\t * This also becomes a bigger issue when dealing with CSS frameworks.\n\t *\n\t * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n\t * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n\t * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n\t *\n\t * ### Overriding `.ng-hide`\n\t *\n\t * By default, the `.ng-hide` class will style the element with `display: none!important`. If you wish to change\n\t * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`\n\t * class in CSS:\n\t *\n\t * ```css\n\t * .ng-hide {\n\t * /&#42; this is just another form of hiding an element &#42;/\n\t * display: block!important;\n\t * position: absolute;\n\t * top: -9999px;\n\t * left: -9999px;\n\t * }\n\t * ```\n\t *\n\t * By default you don't need to override in CSS anything and the animations will work around the display style.\n\t *\n\t * ## A note about animations with `ngHide`\n\t *\n\t * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n\t * is true and false. This system works like the animation system present with ngClass, except that the `.ng-hide`\n\t * CSS class is added and removed for you instead of your own CSS class.\n\t *\n\t * ```css\n\t * //\n\t * //a working example can be found at the bottom of this page\n\t * //\n\t * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n\t * transition: 0.5s linear all;\n\t * }\n\t *\n\t * .my-element.ng-hide-add { ... }\n\t * .my-element.ng-hide-add.ng-hide-add-active { ... }\n\t * .my-element.ng-hide-remove { ... }\n\t * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n\t * ```\n\t *\n\t * Keep in mind that, as of AngularJS version 1.3.0-beta.11, there is no need to change the display\n\t * property to block during animation states--ngAnimate will handle the style toggling automatically for you.\n\t *\n\t * @animations\n\t * removeClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a truthy value and just before the contents are set to hidden\n\t * addClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a non truthy value and just before the contents are set to visible\n\t *\n\t * @element ANY\n\t * @param {expression} ngHide If the {@link guide/expression expression} is truthy then\n\t * the element is shown or hidden respectively.\n\t *\n\t * @example\n\t <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n\t <file name=\"index.html\">\n\t Click me: <input type=\"checkbox\" ng-model=\"checked\" aria-label=\"Toggle ngShow\"><br/>\n\t <div>\n\t Show:\n\t <div class=\"check-element animate-hide\" ng-show=\"checked\">\n\t <span class=\"glyphicon glyphicon-thumbs-up\"></span> I show up when your checkbox is checked.\n\t </div>\n\t </div>\n\t <div>\n\t Hide:\n\t <div class=\"check-element animate-hide\" ng-hide=\"checked\">\n\t <span class=\"glyphicon glyphicon-thumbs-down\"></span> I hide when your checkbox is checked.\n\t </div>\n\t </div>\n\t </file>\n\t <file name=\"glyphicons.css\">\n\t @import url(../../components/bootstrap-3.1.1/css/bootstrap.css);\n\t </file>\n\t <file name=\"animations.css\">\n\t .animate-hide {\n\t transition: all linear 0.5s;\n\t line-height: 20px;\n\t opacity: 1;\n\t padding: 10px;\n\t border: 1px solid black;\n\t background: white;\n\t }\n\t\n\t .animate-hide.ng-hide {\n\t line-height: 0;\n\t opacity: 0;\n\t padding: 0 10px;\n\t }\n\t\n\t .check-element {\n\t padding: 10px;\n\t border: 1px solid black;\n\t background: white;\n\t }\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));\n\t var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));\n\t\n\t it('should check ng-show / ng-hide', function() {\n\t expect(thumbsUp.isDisplayed()).toBeFalsy();\n\t expect(thumbsDown.isDisplayed()).toBeTruthy();\n\t\n\t element(by.model('checked')).click();\n\t\n\t expect(thumbsUp.isDisplayed()).toBeTruthy();\n\t expect(thumbsDown.isDisplayed()).toBeFalsy();\n\t });\n\t </file>\n\t </example>\n\t */\n\tvar ngHideDirective = ['$animate', function($animate) {\n\t return {\n\t restrict: 'A',\n\t multiElement: true,\n\t link: function(scope, element, attr) {\n\t scope.$watch(attr.ngHide, function ngHideWatchAction(value) {\n\t // The comment inside of the ngShowDirective explains why we add and\n\t // remove a temporary class for the show/hide animation\n\t $animate[value ? 'addClass' : 'removeClass'](element,NG_HIDE_CLASS, {\n\t tempClasses: NG_HIDE_IN_PROGRESS_CLASS\n\t });\n\t });\n\t }\n\t };\n\t}];\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngStyle\n\t * @restrict AC\n\t *\n\t * @description\n\t * The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.\n\t *\n\t * @element ANY\n\t * @param {expression} ngStyle\n\t *\n\t * {@link guide/expression Expression} which evals to an\n\t * object whose keys are CSS style names and values are corresponding values for those CSS\n\t * keys.\n\t *\n\t * Since some CSS style names are not valid keys for an object, they must be quoted.\n\t * See the 'background-color' style in the example below.\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <input type=\"button\" value=\"set color\" ng-click=\"myStyle={color:'red'}\">\n\t <input type=\"button\" value=\"set background\" ng-click=\"myStyle={'background-color':'blue'}\">\n\t <input type=\"button\" value=\"clear\" ng-click=\"myStyle={}\">\n\t <br/>\n\t <span ng-style=\"myStyle\">Sample Text</span>\n\t <pre>myStyle={{myStyle}}</pre>\n\t </file>\n\t <file name=\"style.css\">\n\t span {\n\t color: black;\n\t }\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var colorSpan = element(by.css('span'));\n\t\n\t it('should check ng-style', function() {\n\t expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n\t element(by.css('input[value=\\'set color\\']')).click();\n\t expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)');\n\t element(by.css('input[value=clear]')).click();\n\t expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n\t });\n\t </file>\n\t </example>\n\t */\n\tvar ngStyleDirective = ngDirective(function(scope, element, attr) {\n\t scope.$watch(attr.ngStyle, function ngStyleWatchAction(newStyles, oldStyles) {\n\t if (oldStyles && (newStyles !== oldStyles)) {\n\t forEach(oldStyles, function(val, style) { element.css(style, '');});\n\t }\n\t if (newStyles) element.css(newStyles);\n\t }, true);\n\t});\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngSwitch\n\t * @restrict EA\n\t *\n\t * @description\n\t * The `ngSwitch` directive is used to conditionally swap DOM structure on your template based on a scope expression.\n\t * Elements within `ngSwitch` but without `ngSwitchWhen` or `ngSwitchDefault` directives will be preserved at the location\n\t * as specified in the template.\n\t *\n\t * The directive itself works similar to ngInclude, however, instead of downloading template code (or loading it\n\t * from the template cache), `ngSwitch` simply chooses one of the nested elements and makes it visible based on which element\n\t * matches the value obtained from the evaluated expression. In other words, you define a container element\n\t * (where you place the directive), place an expression on the **`on=\"...\"` attribute**\n\t * (or the **`ng-switch=\"...\"` attribute**), define any inner elements inside of the directive and place\n\t * a when attribute per element. The when attribute is used to inform ngSwitch which element to display when the on\n\t * expression is evaluated. If a matching expression is not found via a when attribute then an element with the default\n\t * attribute is displayed.\n\t *\n\t * <div class=\"alert alert-info\">\n\t * Be aware that the attribute values to match against cannot be expressions. They are interpreted\n\t * as literal string values to match against.\n\t * For example, **`ng-switch-when=\"someVal\"`** will match against the string `\"someVal\"` not against the\n\t * value of the expression `$scope.someVal`.\n\t * </div>\n\t\n\t * @animations\n\t * enter - happens after the ngSwitch contents change and the matched child element is placed inside the container\n\t * leave - happens just after the ngSwitch contents change and just before the former contents are removed from the DOM\n\t *\n\t * @usage\n\t *\n\t * ```\n\t * <ANY ng-switch=\"expression\">\n\t * <ANY ng-switch-when=\"matchValue1\">...</ANY>\n\t * <ANY ng-switch-when=\"matchValue2\">...</ANY>\n\t * <ANY ng-switch-default>...</ANY>\n\t * </ANY>\n\t * ```\n\t *\n\t *\n\t * @scope\n\t * @priority 1200\n\t * @param {*} ngSwitch|on expression to match against <code>ng-switch-when</code>.\n\t * On child elements add:\n\t *\n\t * * `ngSwitchWhen`: the case statement to match against. If match then this\n\t * case will be displayed. If the same match appears multiple times, all the\n\t * elements will be displayed.\n\t * * `ngSwitchDefault`: the default case when no other case match. If there\n\t * are multiple default cases, all of them will be displayed when no other\n\t * case match.\n\t *\n\t *\n\t * @example\n\t <example module=\"switchExample\" deps=\"angular-animate.js\" animations=\"true\">\n\t <file name=\"index.html\">\n\t <div ng-controller=\"ExampleController\">\n\t <select ng-model=\"selection\" ng-options=\"item for item in items\">\n\t </select>\n\t <code>selection={{selection}}</code>\n\t <hr/>\n\t <div class=\"animate-switch-container\"\n\t ng-switch on=\"selection\">\n\t <div class=\"animate-switch\" ng-switch-when=\"settings\">Settings Div</div>\n\t <div class=\"animate-switch\" ng-switch-when=\"home\">Home Span</div>\n\t <div class=\"animate-switch\" ng-switch-default>default</div>\n\t </div>\n\t </div>\n\t </file>\n\t <file name=\"script.js\">\n\t angular.module('switchExample', ['ngAnimate'])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.items = ['settings', 'home', 'other'];\n\t $scope.selection = $scope.items[0];\n\t }]);\n\t </file>\n\t <file name=\"animations.css\">\n\t .animate-switch-container {\n\t position:relative;\n\t background:white;\n\t border:1px solid black;\n\t height:40px;\n\t overflow:hidden;\n\t }\n\t\n\t .animate-switch {\n\t padding:10px;\n\t }\n\t\n\t .animate-switch.ng-animate {\n\t transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\t\n\t position:absolute;\n\t top:0;\n\t left:0;\n\t right:0;\n\t bottom:0;\n\t }\n\t\n\t .animate-switch.ng-leave.ng-leave-active,\n\t .animate-switch.ng-enter {\n\t top:-50px;\n\t }\n\t .animate-switch.ng-leave,\n\t .animate-switch.ng-enter.ng-enter-active {\n\t top:0;\n\t }\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t var switchElem = element(by.css('[ng-switch]'));\n\t var select = element(by.model('selection'));\n\t\n\t it('should start in settings', function() {\n\t expect(switchElem.getText()).toMatch(/Settings Div/);\n\t });\n\t it('should change to home', function() {\n\t select.all(by.css('option')).get(1).click();\n\t expect(switchElem.getText()).toMatch(/Home Span/);\n\t });\n\t it('should select default', function() {\n\t select.all(by.css('option')).get(2).click();\n\t expect(switchElem.getText()).toMatch(/default/);\n\t });\n\t </file>\n\t </example>\n\t */\n\tvar ngSwitchDirective = ['$animate', function($animate) {\n\t return {\n\t require: 'ngSwitch',\n\t\n\t // asks for $scope to fool the BC controller module\n\t controller: ['$scope', function ngSwitchController() {\n\t this.cases = {};\n\t }],\n\t link: function(scope, element, attr, ngSwitchController) {\n\t var watchExpr = attr.ngSwitch || attr.on,\n\t selectedTranscludes = [],\n\t selectedElements = [],\n\t previousLeaveAnimations = [],\n\t selectedScopes = [];\n\t\n\t var spliceFactory = function(array, index) {\n\t return function() { array.splice(index, 1); };\n\t };\n\t\n\t scope.$watch(watchExpr, function ngSwitchWatchAction(value) {\n\t var i, ii;\n\t for (i = 0, ii = previousLeaveAnimations.length; i < ii; ++i) {\n\t $animate.cancel(previousLeaveAnimations[i]);\n\t }\n\t previousLeaveAnimations.length = 0;\n\t\n\t for (i = 0, ii = selectedScopes.length; i < ii; ++i) {\n\t var selected = getBlockNodes(selectedElements[i].clone);\n\t selectedScopes[i].$destroy();\n\t var promise = previousLeaveAnimations[i] = $animate.leave(selected);\n\t promise.then(spliceFactory(previousLeaveAnimations, i));\n\t }\n\t\n\t selectedElements.length = 0;\n\t selectedScopes.length = 0;\n\t\n\t if ((selectedTranscludes = ngSwitchController.cases['!' + value] || ngSwitchController.cases['?'])) {\n\t forEach(selectedTranscludes, function(selectedTransclude) {\n\t selectedTransclude.transclude(function(caseElement, selectedScope) {\n\t selectedScopes.push(selectedScope);\n\t var anchor = selectedTransclude.element;\n\t caseElement[caseElement.length++] = document.createComment(' end ngSwitchWhen: ');\n\t var block = { clone: caseElement };\n\t\n\t selectedElements.push(block);\n\t $animate.enter(caseElement, anchor.parent(), anchor);\n\t });\n\t });\n\t }\n\t });\n\t }\n\t };\n\t}];\n\t\n\tvar ngSwitchWhenDirective = ngDirective({\n\t transclude: 'element',\n\t priority: 1200,\n\t require: '^ngSwitch',\n\t multiElement: true,\n\t link: function(scope, element, attrs, ctrl, $transclude) {\n\t ctrl.cases['!' + attrs.ngSwitchWhen] = (ctrl.cases['!' + attrs.ngSwitchWhen] || []);\n\t ctrl.cases['!' + attrs.ngSwitchWhen].push({ transclude: $transclude, element: element });\n\t }\n\t});\n\t\n\tvar ngSwitchDefaultDirective = ngDirective({\n\t transclude: 'element',\n\t priority: 1200,\n\t require: '^ngSwitch',\n\t multiElement: true,\n\t link: function(scope, element, attr, ctrl, $transclude) {\n\t ctrl.cases['?'] = (ctrl.cases['?'] || []);\n\t ctrl.cases['?'].push({ transclude: $transclude, element: element });\n\t }\n\t});\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngTransclude\n\t * @restrict EAC\n\t *\n\t * @description\n\t * Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.\n\t *\n\t * Any existing content of the element that this directive is placed on will be removed before the transcluded content is inserted.\n\t *\n\t * @element ANY\n\t *\n\t * @example\n\t <example module=\"transcludeExample\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('transcludeExample', [])\n\t .directive('pane', function(){\n\t return {\n\t restrict: 'E',\n\t transclude: true,\n\t scope: { title:'@' },\n\t template: '<div style=\"border: 1px solid black;\">' +\n\t '<div style=\"background-color: gray\">{{title}}</div>' +\n\t '<ng-transclude></ng-transclude>' +\n\t '</div>'\n\t };\n\t })\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.title = 'Lorem Ipsum';\n\t $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...';\n\t }]);\n\t </script>\n\t <div ng-controller=\"ExampleController\">\n\t <input ng-model=\"title\" aria-label=\"title\"> <br/>\n\t <textarea ng-model=\"text\" aria-label=\"text\"></textarea> <br/>\n\t <pane title=\"{{title}}\">{{text}}</pane>\n\t </div>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should have transcluded', function() {\n\t var titleElement = element(by.model('title'));\n\t titleElement.clear();\n\t titleElement.sendKeys('TITLE');\n\t var textElement = element(by.model('text'));\n\t textElement.clear();\n\t textElement.sendKeys('TEXT');\n\t expect(element(by.binding('title')).getText()).toEqual('TITLE');\n\t expect(element(by.binding('text')).getText()).toEqual('TEXT');\n\t });\n\t </file>\n\t </example>\n\t *\n\t */\n\tvar ngTranscludeDirective = ngDirective({\n\t restrict: 'EAC',\n\t link: function($scope, $element, $attrs, controller, $transclude) {\n\t if (!$transclude) {\n\t throw minErr('ngTransclude')('orphan',\n\t 'Illegal use of ngTransclude directive in the template! ' +\n\t 'No parent directive that requires a transclusion found. ' +\n\t 'Element: {0}',\n\t startingTag($element));\n\t }\n\t\n\t $transclude(function(clone) {\n\t $element.empty();\n\t $element.append(clone);\n\t });\n\t }\n\t});\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name script\n\t * @restrict E\n\t *\n\t * @description\n\t * Load the content of a `<script>` element into {@link ng.$templateCache `$templateCache`}, so that the\n\t * template can be used by {@link ng.directive:ngInclude `ngInclude`},\n\t * {@link ngRoute.directive:ngView `ngView`}, or {@link guide/directive directives}. The type of the\n\t * `<script>` element must be specified as `text/ng-template`, and a cache name for the template must be\n\t * assigned through the element's `id`, which can then be used as a directive's `templateUrl`.\n\t *\n\t * @param {string} type Must be set to `'text/ng-template'`.\n\t * @param {string} id Cache name of the template.\n\t *\n\t * @example\n\t <example>\n\t <file name=\"index.html\">\n\t <script type=\"text/ng-template\" id=\"/tpl.html\">\n\t Content of the template.\n\t </script>\n\t\n\t <a ng-click=\"currentTpl='/tpl.html'\" id=\"tpl-link\">Load inlined template</a>\n\t <div id=\"tpl-content\" ng-include src=\"currentTpl\"></div>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should load template defined inside script tag', function() {\n\t element(by.css('#tpl-link')).click();\n\t expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/);\n\t });\n\t </file>\n\t </example>\n\t */\n\tvar scriptDirective = ['$templateCache', function($templateCache) {\n\t return {\n\t restrict: 'E',\n\t terminal: true,\n\t compile: function(element, attr) {\n\t if (attr.type == 'text/ng-template') {\n\t var templateUrl = attr.id,\n\t text = element[0].text;\n\t\n\t $templateCache.put(templateUrl, text);\n\t }\n\t }\n\t };\n\t}];\n\t\n\tvar noopNgModelController = { $setViewValue: noop, $render: noop };\n\t\n\tfunction chromeHack(optionElement) {\n\t // Workaround for https://code.google.com/p/chromium/issues/detail?id=381459\n\t // Adding an <option selected=\"selected\"> element to a <select required=\"required\"> should\n\t // automatically select the new element\n\t if (optionElement[0].hasAttribute('selected')) {\n\t optionElement[0].selected = true;\n\t }\n\t}\n\t\n\t/**\n\t * @ngdoc type\n\t * @name select.SelectController\n\t * @description\n\t * The controller for the `<select>` directive. This provides support for reading\n\t * and writing the selected value(s) of the control and also coordinates dynamically\n\t * added `<option>` elements, perhaps by an `ngRepeat` directive.\n\t */\n\tvar SelectController =\n\t ['$element', '$scope', '$attrs', function($element, $scope, $attrs) {\n\t\n\t var self = this,\n\t optionsMap = new HashMap();\n\t\n\t // If the ngModel doesn't get provided then provide a dummy noop version to prevent errors\n\t self.ngModelCtrl = noopNgModelController;\n\t\n\t // The \"unknown\" option is one that is prepended to the list if the viewValue\n\t // does not match any of the options. When it is rendered the value of the unknown\n\t // option is '? XXX ?' where XXX is the hashKey of the value that is not known.\n\t //\n\t // We can't just jqLite('<option>') since jqLite is not smart enough\n\t // to create it in <select> and IE barfs otherwise.\n\t self.unknownOption = jqLite(document.createElement('option'));\n\t self.renderUnknownOption = function(val) {\n\t var unknownVal = '? ' + hashKey(val) + ' ?';\n\t self.unknownOption.val(unknownVal);\n\t $element.prepend(self.unknownOption);\n\t $element.val(unknownVal);\n\t };\n\t\n\t $scope.$on('$destroy', function() {\n\t // disable unknown option so that we don't do work when the whole select is being destroyed\n\t self.renderUnknownOption = noop;\n\t });\n\t\n\t self.removeUnknownOption = function() {\n\t if (self.unknownOption.parent()) self.unknownOption.remove();\n\t };\n\t\n\t\n\t // Read the value of the select control, the implementation of this changes depending\n\t // upon whether the select can have multiple values and whether ngOptions is at work.\n\t self.readValue = function readSingleValue() {\n\t self.removeUnknownOption();\n\t return $element.val();\n\t };\n\t\n\t\n\t // Write the value to the select control, the implementation of this changes depending\n\t // upon whether the select can have multiple values and whether ngOptions is at work.\n\t self.writeValue = function writeSingleValue(value) {\n\t if (self.hasOption(value)) {\n\t self.removeUnknownOption();\n\t $element.val(value);\n\t if (value === '') self.emptyOption.prop('selected', true); // to make IE9 happy\n\t } else {\n\t if (value == null && self.emptyOption) {\n\t self.removeUnknownOption();\n\t $element.val('');\n\t } else {\n\t self.renderUnknownOption(value);\n\t }\n\t }\n\t };\n\t\n\t\n\t // Tell the select control that an option, with the given value, has been added\n\t self.addOption = function(value, element) {\n\t // Skip comment nodes, as they only pollute the `optionsMap`\n\t if (element[0].nodeType === NODE_TYPE_COMMENT) return;\n\t\n\t assertNotHasOwnProperty(value, '\"option value\"');\n\t if (value === '') {\n\t self.emptyOption = element;\n\t }\n\t var count = optionsMap.get(value) || 0;\n\t optionsMap.put(value, count + 1);\n\t self.ngModelCtrl.$render();\n\t chromeHack(element);\n\t };\n\t\n\t // Tell the select control that an option, with the given value, has been removed\n\t self.removeOption = function(value) {\n\t var count = optionsMap.get(value);\n\t if (count) {\n\t if (count === 1) {\n\t optionsMap.remove(value);\n\t if (value === '') {\n\t self.emptyOption = undefined;\n\t }\n\t } else {\n\t optionsMap.put(value, count - 1);\n\t }\n\t }\n\t };\n\t\n\t // Check whether the select control has an option matching the given value\n\t self.hasOption = function(value) {\n\t return !!optionsMap.get(value);\n\t };\n\t\n\t\n\t self.registerOption = function(optionScope, optionElement, optionAttrs, interpolateValueFn, interpolateTextFn) {\n\t\n\t if (interpolateValueFn) {\n\t // The value attribute is interpolated\n\t var oldVal;\n\t optionAttrs.$observe('value', function valueAttributeObserveAction(newVal) {\n\t if (isDefined(oldVal)) {\n\t self.removeOption(oldVal);\n\t }\n\t oldVal = newVal;\n\t self.addOption(newVal, optionElement);\n\t });\n\t } else if (interpolateTextFn) {\n\t // The text content is interpolated\n\t optionScope.$watch(interpolateTextFn, function interpolateWatchAction(newVal, oldVal) {\n\t optionAttrs.$set('value', newVal);\n\t if (oldVal !== newVal) {\n\t self.removeOption(oldVal);\n\t }\n\t self.addOption(newVal, optionElement);\n\t });\n\t } else {\n\t // The value attribute is static\n\t self.addOption(optionAttrs.value, optionElement);\n\t }\n\t\n\t optionElement.on('$destroy', function() {\n\t self.removeOption(optionAttrs.value);\n\t self.ngModelCtrl.$render();\n\t });\n\t };\n\t}];\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name select\n\t * @restrict E\n\t *\n\t * @description\n\t * HTML `SELECT` element with angular data-binding.\n\t *\n\t * The `select` directive is used together with {@link ngModel `ngModel`} to provide data-binding\n\t * between the scope and the `<select>` control (including setting default values).\n\t * It also handles dynamic `<option>` elements, which can be added using the {@link ngRepeat `ngRepeat}` or\n\t * {@link ngOptions `ngOptions`} directives.\n\t *\n\t * When an item in the `<select>` menu is selected, the value of the selected option will be bound\n\t * to the model identified by the `ngModel` directive. With static or repeated options, this is\n\t * the content of the `value` attribute or the textContent of the `<option>`, if the value attribute is missing.\n\t * If you want dynamic value attributes, you can use interpolation inside the value attribute.\n\t *\n\t * <div class=\"alert alert-warning\">\n\t * Note that the value of a `select` directive used without `ngOptions` is always a string.\n\t * When the model needs to be bound to a non-string value, you must either explictly convert it\n\t * using a directive (see example below) or use `ngOptions` to specify the set of options.\n\t * This is because an option element can only be bound to string values at present.\n\t * </div>\n\t *\n\t * If the viewValue of `ngModel` does not match any of the options, then the control\n\t * will automatically add an \"unknown\" option, which it then removes when the mismatch is resolved.\n\t *\n\t * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can\n\t * be nested into the `<select>` element. This element will then represent the `null` or \"not selected\"\n\t * option. See example below for demonstration.\n\t *\n\t * <div class=\"alert alert-info\">\n\t * In many cases, `ngRepeat` can be used on `<option>` elements instead of {@link ng.directive:ngOptions\n\t * ngOptions} to achieve a similar result. However, `ngOptions` provides some benefits, such as\n\t * more flexibility in how the `<select>`'s model is assigned via the `select` **`as`** part of the\n\t * comprehension expression, and additionally in reducing memory and increasing speed by not creating\n\t * a new scope for each repeated instance.\n\t * </div>\n\t *\n\t *\n\t * @param {string} ngModel Assignable angular expression to data-bind to.\n\t * @param {string=} name Property name of the form under which the control is published.\n\t * @param {string=} multiple Allows multiple options to be selected. The selected values will be\n\t * bound to the model as an array.\n\t * @param {string=} required Sets `required` validation error key if the value is not entered.\n\t * @param {string=} ngRequired Adds required attribute and required validation constraint to\n\t * the element when the ngRequired expression evaluates to true. Use ngRequired instead of required\n\t * when you want to data-bind to the required attribute.\n\t * @param {string=} ngChange Angular expression to be executed when selected option(s) changes due to user\n\t * interaction with the select element.\n\t * @param {string=} ngOptions sets the options that the select is populated with and defines what is\n\t * set on the model on selection. See {@link ngOptions `ngOptions`}.\n\t *\n\t * @example\n\t * ### Simple `select` elements with static options\n\t *\n\t * <example name=\"static-select\" module=\"staticSelect\">\n\t * <file name=\"index.html\">\n\t * <div ng-controller=\"ExampleController\">\n\t * <form name=\"myForm\">\n\t * <label for=\"singleSelect\"> Single select: </label><br>\n\t * <select name=\"singleSelect\" ng-model=\"data.singleSelect\">\n\t * <option value=\"option-1\">Option 1</option>\n\t * <option value=\"option-2\">Option 2</option>\n\t * </select><br>\n\t *\n\t * <label for=\"singleSelect\"> Single select with \"not selected\" option and dynamic option values: </label><br>\n\t * <select name=\"singleSelect\" id=\"singleSelect\" ng-model=\"data.singleSelect\">\n\t * <option value=\"\">---Please select---</option> <!-- not selected / blank option -->\n\t * <option value=\"{{data.option1}}\">Option 1</option> <!-- interpolation -->\n\t * <option value=\"option-2\">Option 2</option>\n\t * </select><br>\n\t * <button ng-click=\"forceUnknownOption()\">Force unknown option</button><br>\n\t * <tt>singleSelect = {{data.singleSelect}}</tt>\n\t *\n\t * <hr>\n\t * <label for=\"multipleSelect\"> Multiple select: </label><br>\n\t * <select name=\"multipleSelect\" id=\"multipleSelect\" ng-model=\"data.multipleSelect\" multiple>\n\t * <option value=\"option-1\">Option 1</option>\n\t * <option value=\"option-2\">Option 2</option>\n\t * <option value=\"option-3\">Option 3</option>\n\t * </select><br>\n\t * <tt>multipleSelect = {{data.multipleSelect}}</tt><br/>\n\t * </form>\n\t * </div>\n\t * </file>\n\t * <file name=\"app.js\">\n\t * angular.module('staticSelect', [])\n\t * .controller('ExampleController', ['$scope', function($scope) {\n\t * $scope.data = {\n\t * singleSelect: null,\n\t * multipleSelect: [],\n\t * option1: 'option-1',\n\t * };\n\t *\n\t * $scope.forceUnknownOption = function() {\n\t * $scope.data.singleSelect = 'nonsense';\n\t * };\n\t * }]);\n\t * </file>\n\t *</example>\n\t *\n\t * ### Using `ngRepeat` to generate `select` options\n\t * <example name=\"ngrepeat-select\" module=\"ngrepeatSelect\">\n\t * <file name=\"index.html\">\n\t * <div ng-controller=\"ExampleController\">\n\t * <form name=\"myForm\">\n\t * <label for=\"repeatSelect\"> Repeat select: </label>\n\t * <select name=\"repeatSelect\" id=\"repeatSelect\" ng-model=\"data.repeatSelect\">\n\t * <option ng-repeat=\"option in data.availableOptions\" value=\"{{option.id}}\">{{option.name}}</option>\n\t * </select>\n\t * </form>\n\t * <hr>\n\t * <tt>repeatSelect = {{data.repeatSelect}}</tt><br/>\n\t * </div>\n\t * </file>\n\t * <file name=\"app.js\">\n\t * angular.module('ngrepeatSelect', [])\n\t * .controller('ExampleController', ['$scope', function($scope) {\n\t * $scope.data = {\n\t * repeatSelect: null,\n\t * availableOptions: [\n\t * {id: '1', name: 'Option A'},\n\t * {id: '2', name: 'Option B'},\n\t * {id: '3', name: 'Option C'}\n\t * ],\n\t * };\n\t * }]);\n\t * </file>\n\t *</example>\n\t *\n\t *\n\t * ### Using `select` with `ngOptions` and setting a default value\n\t * See the {@link ngOptions ngOptions documentation} for more `ngOptions` usage examples.\n\t *\n\t * <example name=\"select-with-default-values\" module=\"defaultValueSelect\">\n\t * <file name=\"index.html\">\n\t * <div ng-controller=\"ExampleController\">\n\t * <form name=\"myForm\">\n\t * <label for=\"mySelect\">Make a choice:</label>\n\t * <select name=\"mySelect\" id=\"mySelect\"\n\t * ng-options=\"option.name for option in data.availableOptions track by option.id\"\n\t * ng-model=\"data.selectedOption\"></select>\n\t * </form>\n\t * <hr>\n\t * <tt>option = {{data.selectedOption}}</tt><br/>\n\t * </div>\n\t * </file>\n\t * <file name=\"app.js\">\n\t * angular.module('defaultValueSelect', [])\n\t * .controller('ExampleController', ['$scope', function($scope) {\n\t * $scope.data = {\n\t * availableOptions: [\n\t * {id: '1', name: 'Option A'},\n\t * {id: '2', name: 'Option B'},\n\t * {id: '3', name: 'Option C'}\n\t * ],\n\t * selectedOption: {id: '3', name: 'Option C'} //This sets the default value of the select in the ui\n\t * };\n\t * }]);\n\t * </file>\n\t *</example>\n\t *\n\t *\n\t * ### Binding `select` to a non-string value via `ngModel` parsing / formatting\n\t *\n\t * <example name=\"select-with-non-string-options\" module=\"nonStringSelect\">\n\t * <file name=\"index.html\">\n\t * <select ng-model=\"model.id\" convert-to-number>\n\t * <option value=\"0\">Zero</option>\n\t * <option value=\"1\">One</option>\n\t * <option value=\"2\">Two</option>\n\t * </select>\n\t * {{ model }}\n\t * </file>\n\t * <file name=\"app.js\">\n\t * angular.module('nonStringSelect', [])\n\t * .run(function($rootScope) {\n\t * $rootScope.model = { id: 2 };\n\t * })\n\t * .directive('convertToNumber', function() {\n\t * return {\n\t * require: 'ngModel',\n\t * link: function(scope, element, attrs, ngModel) {\n\t * ngModel.$parsers.push(function(val) {\n\t * return parseInt(val, 10);\n\t * });\n\t * ngModel.$formatters.push(function(val) {\n\t * return '' + val;\n\t * });\n\t * }\n\t * };\n\t * });\n\t * </file>\n\t * <file name=\"protractor.js\" type=\"protractor\">\n\t * it('should initialize to model', function() {\n\t * var select = element(by.css('select'));\n\t * expect(element(by.model('model.id')).$('option:checked').getText()).toEqual('Two');\n\t * });\n\t * </file>\n\t * </example>\n\t *\n\t */\n\tvar selectDirective = function() {\n\t\n\t return {\n\t restrict: 'E',\n\t require: ['select', '?ngModel'],\n\t controller: SelectController,\n\t priority: 1,\n\t link: {\n\t pre: selectPreLink,\n\t post: selectPostLink\n\t }\n\t };\n\t\n\t function selectPreLink(scope, element, attr, ctrls) {\n\t\n\t // if ngModel is not defined, we don't need to do anything\n\t var ngModelCtrl = ctrls[1];\n\t if (!ngModelCtrl) return;\n\t\n\t var selectCtrl = ctrls[0];\n\t\n\t selectCtrl.ngModelCtrl = ngModelCtrl;\n\t\n\t // When the selected item(s) changes we delegate getting the value of the select control\n\t // to the `readValue` method, which can be changed if the select can have multiple\n\t // selected values or if the options are being generated by `ngOptions`\n\t element.on('change', function() {\n\t scope.$apply(function() {\n\t ngModelCtrl.$setViewValue(selectCtrl.readValue());\n\t });\n\t });\n\t\n\t // If the select allows multiple values then we need to modify how we read and write\n\t // values from and to the control; also what it means for the value to be empty and\n\t // we have to add an extra watch since ngModel doesn't work well with arrays - it\n\t // doesn't trigger rendering if only an item in the array changes.\n\t if (attr.multiple) {\n\t\n\t // Read value now needs to check each option to see if it is selected\n\t selectCtrl.readValue = function readMultipleValue() {\n\t var array = [];\n\t forEach(element.find('option'), function(option) {\n\t if (option.selected) {\n\t array.push(option.value);\n\t }\n\t });\n\t return array;\n\t };\n\t\n\t // Write value now needs to set the selected property of each matching option\n\t selectCtrl.writeValue = function writeMultipleValue(value) {\n\t var items = new HashMap(value);\n\t forEach(element.find('option'), function(option) {\n\t option.selected = isDefined(items.get(option.value));\n\t });\n\t };\n\t\n\t // we have to do it on each watch since ngModel watches reference, but\n\t // we need to work of an array, so we need to see if anything was inserted/removed\n\t var lastView, lastViewRef = NaN;\n\t scope.$watch(function selectMultipleWatch() {\n\t if (lastViewRef === ngModelCtrl.$viewValue && !equals(lastView, ngModelCtrl.$viewValue)) {\n\t lastView = shallowCopy(ngModelCtrl.$viewValue);\n\t ngModelCtrl.$render();\n\t }\n\t lastViewRef = ngModelCtrl.$viewValue;\n\t });\n\t\n\t // If we are a multiple select then value is now a collection\n\t // so the meaning of $isEmpty changes\n\t ngModelCtrl.$isEmpty = function(value) {\n\t return !value || value.length === 0;\n\t };\n\t\n\t }\n\t }\n\t\n\t function selectPostLink(scope, element, attrs, ctrls) {\n\t // if ngModel is not defined, we don't need to do anything\n\t var ngModelCtrl = ctrls[1];\n\t if (!ngModelCtrl) return;\n\t\n\t var selectCtrl = ctrls[0];\n\t\n\t // We delegate rendering to the `writeValue` method, which can be changed\n\t // if the select can have multiple selected values or if the options are being\n\t // generated by `ngOptions`.\n\t // This must be done in the postLink fn to prevent $render to be called before\n\t // all nodes have been linked correctly.\n\t ngModelCtrl.$render = function() {\n\t selectCtrl.writeValue(ngModelCtrl.$viewValue);\n\t };\n\t }\n\t};\n\t\n\t\n\t// The option directive is purely designed to communicate the existence (or lack of)\n\t// of dynamically created (and destroyed) option elements to their containing select\n\t// directive via its controller.\n\tvar optionDirective = ['$interpolate', function($interpolate) {\n\t return {\n\t restrict: 'E',\n\t priority: 100,\n\t compile: function(element, attr) {\n\t if (isDefined(attr.value)) {\n\t // If the value attribute is defined, check if it contains an interpolation\n\t var interpolateValueFn = $interpolate(attr.value, true);\n\t } else {\n\t // If the value attribute is not defined then we fall back to the\n\t // text content of the option element, which may be interpolated\n\t var interpolateTextFn = $interpolate(element.text(), true);\n\t if (!interpolateTextFn) {\n\t attr.$set('value', element.text());\n\t }\n\t }\n\t\n\t return function(scope, element, attr) {\n\t // This is an optimization over using ^^ since we don't want to have to search\n\t // all the way to the root of the DOM for every single option element\n\t var selectCtrlName = '$selectController',\n\t parent = element.parent(),\n\t selectCtrl = parent.data(selectCtrlName) ||\n\t parent.parent().data(selectCtrlName); // in case we are in optgroup\n\t\n\t if (selectCtrl) {\n\t selectCtrl.registerOption(scope, element, attr, interpolateValueFn, interpolateTextFn);\n\t }\n\t };\n\t }\n\t };\n\t}];\n\t\n\tvar styleDirective = valueFn({\n\t restrict: 'E',\n\t terminal: false\n\t});\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngRequired\n\t * @restrict A\n\t *\n\t * @description\n\t *\n\t * ngRequired adds the required {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n\t * It is most often used for {@link input `input`} and {@link select `select`} controls, but can also be\n\t * applied to custom controls.\n\t *\n\t * The directive sets the `required` attribute on the element if the Angular expression inside\n\t * `ngRequired` evaluates to true. A special directive for setting `required` is necessary because we\n\t * cannot use interpolation inside `required`. See the {@link guide/interpolation interpolation guide}\n\t * for more info.\n\t *\n\t * The validator will set the `required` error key to true if the `required` attribute is set and\n\t * calling {@link ngModel.NgModelController#$isEmpty `NgModelController.$isEmpty`} with the\n\t * {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} returns `true`. For example, the\n\t * `$isEmpty()` implementation for `input[text]` checks the length of the `$viewValue`. When developing\n\t * custom controls, `$isEmpty()` can be overwritten to account for a $viewValue that is not string-based.\n\t *\n\t * @example\n\t * <example name=\"ngRequiredDirective\" module=\"ngRequiredExample\">\n\t * <file name=\"index.html\">\n\t * <script>\n\t * angular.module('ngRequiredExample', [])\n\t * .controller('ExampleController', ['$scope', function($scope) {\n\t * $scope.required = true;\n\t * }]);\n\t * </script>\n\t * <div ng-controller=\"ExampleController\">\n\t * <form name=\"form\">\n\t * <label for=\"required\">Toggle required: </label>\n\t * <input type=\"checkbox\" ng-model=\"required\" id=\"required\" />\n\t * <br>\n\t * <label for=\"input\">This input must be filled if `required` is true: </label>\n\t * <input type=\"text\" ng-model=\"model\" id=\"input\" name=\"input\" ng-required=\"required\" /><br>\n\t * <hr>\n\t * required error set? = <code>{{form.input.$error.required}}</code><br>\n\t * model = <code>{{model}}</code>\n\t * </form>\n\t * </div>\n\t * </file>\n\t * <file name=\"protractor.js\" type=\"protractor\">\n\t var required = element(by.binding('form.input.$error.required'));\n\t var model = element(by.binding('model'));\n\t var input = element(by.id('input'));\n\t\n\t it('should set the required error', function() {\n\t expect(required.getText()).toContain('true');\n\t\n\t input.sendKeys('123');\n\t expect(required.getText()).not.toContain('true');\n\t expect(model.getText()).toContain('123');\n\t });\n\t * </file>\n\t * </example>\n\t */\n\tvar requiredDirective = function() {\n\t return {\n\t restrict: 'A',\n\t require: '?ngModel',\n\t link: function(scope, elm, attr, ctrl) {\n\t if (!ctrl) return;\n\t attr.required = true; // force truthy in case we are on non input element\n\t\n\t ctrl.$validators.required = function(modelValue, viewValue) {\n\t return !attr.required || !ctrl.$isEmpty(viewValue);\n\t };\n\t\n\t attr.$observe('required', function() {\n\t ctrl.$validate();\n\t });\n\t }\n\t };\n\t};\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngPattern\n\t *\n\t * @description\n\t *\n\t * ngPattern adds the pattern {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n\t * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.\n\t *\n\t * The validator sets the `pattern` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`}\n\t * does not match a RegExp which is obtained by evaluating the Angular expression given in the\n\t * `ngPattern` attribute value:\n\t * * If the expression evaluates to a RegExp object, then this is used directly.\n\t * * If the expression evaluates to a string, then it will be converted to a RegExp after wrapping it\n\t * in `^` and `$` characters. For instance, `\"abc\"` will be converted to `new RegExp('^abc$')`.\n\t *\n\t * <div class=\"alert alert-info\">\n\t * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n\t * start at the index of the last search's match, thus not taking the whole input value into\n\t * account.\n\t * </div>\n\t *\n\t * <div class=\"alert alert-info\">\n\t * **Note:** This directive is also added when the plain `pattern` attribute is used, with two\n\t * differences:\n\t * <ol>\n\t * <li>\n\t * `ngPattern` does not set the `pattern` attribute and therefore HTML5 constraint validation is\n\t * not available.\n\t * </li>\n\t * <li>\n\t * The `ngPattern` attribute must be an expression, while the `pattern` value must be\n\t * interpolated.\n\t * </li>\n\t * </ol>\n\t * </div>\n\t *\n\t * @example\n\t * <example name=\"ngPatternDirective\" module=\"ngPatternExample\">\n\t * <file name=\"index.html\">\n\t * <script>\n\t * angular.module('ngPatternExample', [])\n\t * .controller('ExampleController', ['$scope', function($scope) {\n\t * $scope.regex = '\\\\d+';\n\t * }]);\n\t * </script>\n\t * <div ng-controller=\"ExampleController\">\n\t * <form name=\"form\">\n\t * <label for=\"regex\">Set a pattern (regex string): </label>\n\t * <input type=\"text\" ng-model=\"regex\" id=\"regex\" />\n\t * <br>\n\t * <label for=\"input\">This input is restricted by the current pattern: </label>\n\t * <input type=\"text\" ng-model=\"model\" id=\"input\" name=\"input\" ng-pattern=\"regex\" /><br>\n\t * <hr>\n\t * input valid? = <code>{{form.input.$valid}}</code><br>\n\t * model = <code>{{model}}</code>\n\t * </form>\n\t * </div>\n\t * </file>\n\t * <file name=\"protractor.js\" type=\"protractor\">\n\t var model = element(by.binding('model'));\n\t var input = element(by.id('input'));\n\t\n\t it('should validate the input with the default pattern', function() {\n\t input.sendKeys('aaa');\n\t expect(model.getText()).not.toContain('aaa');\n\t\n\t input.clear().then(function() {\n\t input.sendKeys('123');\n\t expect(model.getText()).toContain('123');\n\t });\n\t });\n\t * </file>\n\t * </example>\n\t */\n\tvar patternDirective = function() {\n\t return {\n\t restrict: 'A',\n\t require: '?ngModel',\n\t link: function(scope, elm, attr, ctrl) {\n\t if (!ctrl) return;\n\t\n\t var regexp, patternExp = attr.ngPattern || attr.pattern;\n\t attr.$observe('pattern', function(regex) {\n\t if (isString(regex) && regex.length > 0) {\n\t regex = new RegExp('^' + regex + '$');\n\t }\n\t\n\t if (regex && !regex.test) {\n\t throw minErr('ngPattern')('noregexp',\n\t 'Expected {0} to be a RegExp but was {1}. Element: {2}', patternExp,\n\t regex, startingTag(elm));\n\t }\n\t\n\t regexp = regex || undefined;\n\t ctrl.$validate();\n\t });\n\t\n\t ctrl.$validators.pattern = function(modelValue, viewValue) {\n\t // HTML5 pattern constraint validates the input value, so we validate the viewValue\n\t return ctrl.$isEmpty(viewValue) || isUndefined(regexp) || regexp.test(viewValue);\n\t };\n\t }\n\t };\n\t};\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngMaxlength\n\t *\n\t * @description\n\t *\n\t * ngMaxlength adds the maxlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n\t * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.\n\t *\n\t * The validator sets the `maxlength` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`}\n\t * is longer than the integer obtained by evaluating the Angular expression given in the\n\t * `ngMaxlength` attribute value.\n\t *\n\t * <div class=\"alert alert-info\">\n\t * **Note:** This directive is also added when the plain `maxlength` attribute is used, with two\n\t * differences:\n\t * <ol>\n\t * <li>\n\t * `ngMaxlength` does not set the `maxlength` attribute and therefore HTML5 constraint\n\t * validation is not available.\n\t * </li>\n\t * <li>\n\t * The `ngMaxlength` attribute must be an expression, while the `maxlength` value must be\n\t * interpolated.\n\t * </li>\n\t * </ol>\n\t * </div>\n\t *\n\t * @example\n\t * <example name=\"ngMaxlengthDirective\" module=\"ngMaxlengthExample\">\n\t * <file name=\"index.html\">\n\t * <script>\n\t * angular.module('ngMaxlengthExample', [])\n\t * .controller('ExampleController', ['$scope', function($scope) {\n\t * $scope.maxlength = 5;\n\t * }]);\n\t * </script>\n\t * <div ng-controller=\"ExampleController\">\n\t * <form name=\"form\">\n\t * <label for=\"maxlength\">Set a maxlength: </label>\n\t * <input type=\"number\" ng-model=\"maxlength\" id=\"maxlength\" />\n\t * <br>\n\t * <label for=\"input\">This input is restricted by the current maxlength: </label>\n\t * <input type=\"text\" ng-model=\"model\" id=\"input\" name=\"input\" ng-maxlength=\"maxlength\" /><br>\n\t * <hr>\n\t * input valid? = <code>{{form.input.$valid}}</code><br>\n\t * model = <code>{{model}}</code>\n\t * </form>\n\t * </div>\n\t * </file>\n\t * <file name=\"protractor.js\" type=\"protractor\">\n\t var model = element(by.binding('model'));\n\t var input = element(by.id('input'));\n\t\n\t it('should validate the input with the default maxlength', function() {\n\t input.sendKeys('abcdef');\n\t expect(model.getText()).not.toContain('abcdef');\n\t\n\t input.clear().then(function() {\n\t input.sendKeys('abcde');\n\t expect(model.getText()).toContain('abcde');\n\t });\n\t });\n\t * </file>\n\t * </example>\n\t */\n\tvar maxlengthDirective = function() {\n\t return {\n\t restrict: 'A',\n\t require: '?ngModel',\n\t link: function(scope, elm, attr, ctrl) {\n\t if (!ctrl) return;\n\t\n\t var maxlength = -1;\n\t attr.$observe('maxlength', function(value) {\n\t var intVal = toInt(value);\n\t maxlength = isNaN(intVal) ? -1 : intVal;\n\t ctrl.$validate();\n\t });\n\t ctrl.$validators.maxlength = function(modelValue, viewValue) {\n\t return (maxlength < 0) || ctrl.$isEmpty(viewValue) || (viewValue.length <= maxlength);\n\t };\n\t }\n\t };\n\t};\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngMinlength\n\t *\n\t * @description\n\t *\n\t * ngMinlength adds the minlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n\t * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.\n\t *\n\t * The validator sets the `minlength` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`}\n\t * is shorter than the integer obtained by evaluating the Angular expression given in the\n\t * `ngMinlength` attribute value.\n\t *\n\t * <div class=\"alert alert-info\">\n\t * **Note:** This directive is also added when the plain `minlength` attribute is used, with two\n\t * differences:\n\t * <ol>\n\t * <li>\n\t * `ngMinlength` does not set the `minlength` attribute and therefore HTML5 constraint\n\t * validation is not available.\n\t * </li>\n\t * <li>\n\t * The `ngMinlength` value must be an expression, while the `minlength` value must be\n\t * interpolated.\n\t * </li>\n\t * </ol>\n\t * </div>\n\t *\n\t * @example\n\t * <example name=\"ngMinlengthDirective\" module=\"ngMinlengthExample\">\n\t * <file name=\"index.html\">\n\t * <script>\n\t * angular.module('ngMinlengthExample', [])\n\t * .controller('ExampleController', ['$scope', function($scope) {\n\t * $scope.minlength = 3;\n\t * }]);\n\t * </script>\n\t * <div ng-controller=\"ExampleController\">\n\t * <form name=\"form\">\n\t * <label for=\"minlength\">Set a minlength: </label>\n\t * <input type=\"number\" ng-model=\"minlength\" id=\"minlength\" />\n\t * <br>\n\t * <label for=\"input\">This input is restricted by the current minlength: </label>\n\t * <input type=\"text\" ng-model=\"model\" id=\"input\" name=\"input\" ng-minlength=\"minlength\" /><br>\n\t * <hr>\n\t * input valid? = <code>{{form.input.$valid}}</code><br>\n\t * model = <code>{{model}}</code>\n\t * </form>\n\t * </div>\n\t * </file>\n\t * <file name=\"protractor.js\" type=\"protractor\">\n\t var model = element(by.binding('model'));\n\t var input = element(by.id('input'));\n\t\n\t it('should validate the input with the default minlength', function() {\n\t input.sendKeys('ab');\n\t expect(model.getText()).not.toContain('ab');\n\t\n\t input.sendKeys('abc');\n\t expect(model.getText()).toContain('abc');\n\t });\n\t * </file>\n\t * </example>\n\t */\n\tvar minlengthDirective = function() {\n\t return {\n\t restrict: 'A',\n\t require: '?ngModel',\n\t link: function(scope, elm, attr, ctrl) {\n\t if (!ctrl) return;\n\t\n\t var minlength = 0;\n\t attr.$observe('minlength', function(value) {\n\t minlength = toInt(value) || 0;\n\t ctrl.$validate();\n\t });\n\t ctrl.$validators.minlength = function(modelValue, viewValue) {\n\t return ctrl.$isEmpty(viewValue) || viewValue.length >= minlength;\n\t };\n\t }\n\t };\n\t};\n\t\n\tif (window.angular.bootstrap) {\n\t //AngularJS is already loaded, so we can return here...\n\t if (window.console) {\n\t console.log('WARNING: Tried to load angular more than once.');\n\t }\n\t return;\n\t}\n\t\n\t//try to bind to jquery now so that one can write jqLite(document).ready()\n\t//but we will rebind on bootstrap again.\n\tbindJQuery();\n\t\n\tpublishExternalAPI(angular);\n\t\n\tangular.module(\"ngLocale\", [], [\"$provide\", function($provide) {\n\tvar PLURAL_CATEGORY = {ZERO: \"zero\", ONE: \"one\", TWO: \"two\", FEW: \"few\", MANY: \"many\", OTHER: \"other\"};\n\tfunction getDecimals(n) {\n\t n = n + '';\n\t var i = n.indexOf('.');\n\t return (i == -1) ? 0 : n.length - i - 1;\n\t}\n\t\n\tfunction getVF(n, opt_precision) {\n\t var v = opt_precision;\n\t\n\t if (undefined === v) {\n\t v = Math.min(getDecimals(n), 3);\n\t }\n\t\n\t var base = Math.pow(10, v);\n\t var f = ((n * base) | 0) % base;\n\t return {v: v, f: f};\n\t}\n\t\n\t$provide.value(\"$locale\", {\n\t \"DATETIME_FORMATS\": {\n\t \"AMPMS\": [\n\t \"AM\",\n\t \"PM\"\n\t ],\n\t \"DAY\": [\n\t \"Sunday\",\n\t \"Monday\",\n\t \"Tuesday\",\n\t \"Wednesday\",\n\t \"Thursday\",\n\t \"Friday\",\n\t \"Saturday\"\n\t ],\n\t \"ERANAMES\": [\n\t \"Before Christ\",\n\t \"Anno Domini\"\n\t ],\n\t \"ERAS\": [\n\t \"BC\",\n\t \"AD\"\n\t ],\n\t \"FIRSTDAYOFWEEK\": 6,\n\t \"MONTH\": [\n\t \"January\",\n\t \"February\",\n\t \"March\",\n\t \"April\",\n\t \"May\",\n\t \"June\",\n\t \"July\",\n\t \"August\",\n\t \"September\",\n\t \"October\",\n\t \"November\",\n\t \"December\"\n\t ],\n\t \"SHORTDAY\": [\n\t \"Sun\",\n\t \"Mon\",\n\t \"Tue\",\n\t \"Wed\",\n\t \"Thu\",\n\t \"Fri\",\n\t \"Sat\"\n\t ],\n\t \"SHORTMONTH\": [\n\t \"Jan\",\n\t \"Feb\",\n\t \"Mar\",\n\t \"Apr\",\n\t \"May\",\n\t \"Jun\",\n\t \"Jul\",\n\t \"Aug\",\n\t \"Sep\",\n\t \"Oct\",\n\t \"Nov\",\n\t \"Dec\"\n\t ],\n\t \"STANDALONEMONTH\": [\n\t \"January\",\n\t \"February\",\n\t \"March\",\n\t \"April\",\n\t \"May\",\n\t \"June\",\n\t \"July\",\n\t \"August\",\n\t \"September\",\n\t \"October\",\n\t \"November\",\n\t \"December\"\n\t ],\n\t \"WEEKENDRANGE\": [\n\t 5,\n\t 6\n\t ],\n\t \"fullDate\": \"EEEE, MMMM d, y\",\n\t \"longDate\": \"MMMM d, y\",\n\t \"medium\": \"MMM d, y h:mm:ss a\",\n\t \"mediumDate\": \"MMM d, y\",\n\t \"mediumTime\": \"h:mm:ss a\",\n\t \"short\": \"M/d/yy h:mm a\",\n\t \"shortDate\": \"M/d/yy\",\n\t \"shortTime\": \"h:mm a\"\n\t },\n\t \"NUMBER_FORMATS\": {\n\t \"CURRENCY_SYM\": \"$\",\n\t \"DECIMAL_SEP\": \".\",\n\t \"GROUP_SEP\": \",\",\n\t \"PATTERNS\": [\n\t {\n\t \"gSize\": 3,\n\t \"lgSize\": 3,\n\t \"maxFrac\": 3,\n\t \"minFrac\": 0,\n\t \"minInt\": 1,\n\t \"negPre\": \"-\",\n\t \"negSuf\": \"\",\n\t \"posPre\": \"\",\n\t \"posSuf\": \"\"\n\t },\n\t {\n\t \"gSize\": 3,\n\t \"lgSize\": 3,\n\t \"maxFrac\": 2,\n\t \"minFrac\": 2,\n\t \"minInt\": 1,\n\t \"negPre\": \"-\\u00a4\",\n\t \"negSuf\": \"\",\n\t \"posPre\": \"\\u00a4\",\n\t \"posSuf\": \"\"\n\t }\n\t ]\n\t },\n\t \"id\": \"en-us\",\n\t \"localeID\": \"en_US\",\n\t \"pluralCat\": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}\n\t});\n\t}]);\n\t\n\t jqLite(document).ready(function() {\n\t angularInit(document, bootstrap);\n\t });\n\t\n\t})(window, document);\n\t\n\t!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend('<style type=\"text/css\">@charset \"UTF-8\";[ng\\\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>');\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(5);\n\tmodule.exports = 'ngRoute';\n\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\t/**\n\t * @license AngularJS v1.4.14\n\t * (c) 2010-2015 Google, Inc. http://angularjs.org\n\t * License: MIT\n\t */\n\t(function(window, angular, undefined) {'use strict';\n\t\n\t/**\n\t * @ngdoc module\n\t * @name ngRoute\n\t * @description\n\t *\n\t * # ngRoute\n\t *\n\t * The `ngRoute` module provides routing and deeplinking services and directives for angular apps.\n\t *\n\t * ## Example\n\t * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`.\n\t *\n\t *\n\t * <div doc-module-components=\"ngRoute\"></div>\n\t */\n\t /* global -ngRouteModule */\n\tvar ngRouteModule = angular.module('ngRoute', ['ng']).\n\t provider('$route', $RouteProvider),\n\t $routeMinErr = angular.$$minErr('ngRoute');\n\t\n\t/**\n\t * @ngdoc provider\n\t * @name $routeProvider\n\t *\n\t * @description\n\t *\n\t * Used for configuring routes.\n\t *\n\t * ## Example\n\t * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`.\n\t *\n\t * ## Dependencies\n\t * Requires the {@link ngRoute `ngRoute`} module to be installed.\n\t */\n\tfunction $RouteProvider() {\n\t function inherit(parent, extra) {\n\t return angular.extend(Object.create(parent), extra);\n\t }\n\t\n\t var routes = {};\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $routeProvider#when\n\t *\n\t * @param {string} path Route path (matched against `$location.path`). If `$location.path`\n\t * contains redundant trailing slash or is missing one, the route will still match and the\n\t * `$location.path` will be updated to add or drop the trailing slash to exactly match the\n\t * route definition.\n\t *\n\t * * `path` can contain named groups starting with a colon: e.g. `:name`. All characters up\n\t * to the next slash are matched and stored in `$routeParams` under the given `name`\n\t * when the route matches.\n\t * * `path` can contain named groups starting with a colon and ending with a star:\n\t * e.g.`:name*`. All characters are eagerly stored in `$routeParams` under the given `name`\n\t * when the route matches.\n\t * * `path` can contain optional named groups with a question mark: e.g.`:name?`.\n\t *\n\t * For example, routes like `/color/:color/largecode/:largecode*\\/edit` will match\n\t * `/color/brown/largecode/code/with/slashes/edit` and extract:\n\t *\n\t * * `color: brown`\n\t * * `largecode: code/with/slashes`.\n\t *\n\t *\n\t * @param {Object} route Mapping information to be assigned to `$route.current` on route\n\t * match.\n\t *\n\t * Object properties:\n\t *\n\t * - `controller` `{(string|function()=}` Controller fn that should be associated with\n\t * newly created scope or the name of a {@link angular.Module#controller registered\n\t * controller} if passed as a string.\n\t * - `controllerAs` `{string=}` An identifier name for a reference to the controller.\n\t * If present, the controller will be published to scope under the `controllerAs` name.\n\t * - `template` `{string=|function()=}` html template as a string or a function that\n\t * returns an html template as a string which should be used by {@link\n\t * ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives.\n\t * This property takes precedence over `templateUrl`.\n\t *\n\t * If `template` is a function, it will be called with the following parameters:\n\t *\n\t * - `{Array.<Object>}` - route parameters extracted from the current\n\t * `$location.path()` by applying the current route\n\t *\n\t * - `templateUrl` `{string=|function()=}` path or function that returns a path to an html\n\t * template that should be used by {@link ngRoute.directive:ngView ngView}.\n\t *\n\t * If `templateUrl` is a function, it will be called with the following parameters:\n\t *\n\t * - `{Array.<Object>}` - route parameters extracted from the current\n\t * `$location.path()` by applying the current route\n\t *\n\t * - `resolve` - `{Object.<string, function>=}` - An optional map of dependencies which should\n\t * be injected into the controller. If any of these dependencies are promises, the router\n\t * will wait for them all to be resolved or one to be rejected before the controller is\n\t * instantiated.\n\t * If all the promises are resolved successfully, the values of the resolved promises are\n\t * injected and {@link ngRoute.$route#$routeChangeSuccess $routeChangeSuccess} event is\n\t * fired. If any of the promises are rejected the\n\t * {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired. The map object\n\t * is:\n\t *\n\t * - `key` `{string}`: a name of a dependency to be injected into the controller.\n\t * - `factory` - `{string|function}`: If `string` then it is an alias for a service.\n\t * Otherwise if function, then it is {@link auto.$injector#invoke injected}\n\t * and the return value is treated as the dependency. If the result is a promise, it is\n\t * resolved before its value is injected into the controller. Be aware that\n\t * `ngRoute.$routeParams` will still refer to the previous route within these resolve\n\t * functions. Use `$route.current.params` to access the new route parameters, instead.\n\t *\n\t * - `redirectTo` {(string|function())=} value to update\n\t * {@link ng.$location $location} path with and trigger route redirection.\n\t *\n\t * If `redirectTo` is a function, it will be called with the following parameters:\n\t *\n\t * - `{Object.<string>}` - route parameters extracted from the current\n\t * `$location.path()` by applying the current route templateUrl.\n\t * - `{string}` - current `$location.path()`\n\t * - `{Object}` - current `$location.search()`\n\t *\n\t * The custom `redirectTo` function is expected to return a string which will be used\n\t * to update `$location.path()` and `$location.search()`.\n\t *\n\t * - `[reloadOnSearch=true]` - {boolean=} - reload route when only `$location.search()`\n\t * or `$location.hash()` changes.\n\t *\n\t * If the option is set to `false` and url in the browser changes, then\n\t * `$routeUpdate` event is broadcasted on the root scope.\n\t *\n\t * - `[caseInsensitiveMatch=false]` - {boolean=} - match routes without being case sensitive\n\t *\n\t * If the option is set to `true`, then the particular route can be matched without being\n\t * case sensitive\n\t *\n\t * @returns {Object} self\n\t *\n\t * @description\n\t * Adds a new route definition to the `$route` service.\n\t */\n\t this.when = function(path, route) {\n\t //copy original route object to preserve params inherited from proto chain\n\t var routeCopy = angular.copy(route);\n\t if (angular.isUndefined(routeCopy.reloadOnSearch)) {\n\t routeCopy.reloadOnSearch = true;\n\t }\n\t if (angular.isUndefined(routeCopy.caseInsensitiveMatch)) {\n\t routeCopy.caseInsensitiveMatch = this.caseInsensitiveMatch;\n\t }\n\t routes[path] = angular.extend(\n\t routeCopy,\n\t path && pathRegExp(path, routeCopy)\n\t );\n\t\n\t // create redirection for trailing slashes\n\t if (path) {\n\t var redirectPath = (path[path.length - 1] == '/')\n\t ? path.substr(0, path.length - 1)\n\t : path + '/';\n\t\n\t routes[redirectPath] = angular.extend(\n\t {redirectTo: path},\n\t pathRegExp(redirectPath, routeCopy)\n\t );\n\t }\n\t\n\t return this;\n\t };\n\t\n\t /**\n\t * @ngdoc property\n\t * @name $routeProvider#caseInsensitiveMatch\n\t * @description\n\t *\n\t * A boolean property indicating if routes defined\n\t * using this provider should be matched using a case insensitive\n\t * algorithm. Defaults to `false`.\n\t */\n\t this.caseInsensitiveMatch = false;\n\t\n\t /**\n\t * @param path {string} path\n\t * @param opts {Object} options\n\t * @return {?Object}\n\t *\n\t * @description\n\t * Normalizes the given path, returning a regular expression\n\t * and the original path.\n\t *\n\t * Inspired by pathRexp in visionmedia/express/lib/utils.js.\n\t */\n\t function pathRegExp(path, opts) {\n\t var insensitive = opts.caseInsensitiveMatch,\n\t ret = {\n\t originalPath: path,\n\t regexp: path\n\t },\n\t keys = ret.keys = [];\n\t\n\t path = path\n\t .replace(/([().])/g, '\\\\$1')\n\t .replace(/(\\/)?:(\\w+)(\\*\\?|[\\?\\*])?/g, function(_, slash, key, option) {\n\t var optional = (option === '?' || option === '*?') ? '?' : null;\n\t var star = (option === '*' || option === '*?') ? '*' : null;\n\t keys.push({ name: key, optional: !!optional });\n\t slash = slash || '';\n\t return ''\n\t + (optional ? '' : slash)\n\t + '(?:'\n\t + (optional ? slash : '')\n\t + (star && '(.+?)' || '([^/]+)')\n\t + (optional || '')\n\t + ')'\n\t + (optional || '');\n\t })\n\t .replace(/([\\/$\\*])/g, '\\\\$1');\n\t\n\t ret.regexp = new RegExp('^' + path + '$', insensitive ? 'i' : '');\n\t return ret;\n\t }\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $routeProvider#otherwise\n\t *\n\t * @description\n\t * Sets route definition that will be used on route change when no other route definition\n\t * is matched.\n\t *\n\t * @param {Object|string} params Mapping information to be assigned to `$route.current`.\n\t * If called with a string, the value maps to `redirectTo`.\n\t * @returns {Object} self\n\t */\n\t this.otherwise = function(params) {\n\t if (typeof params === 'string') {\n\t params = {redirectTo: params};\n\t }\n\t this.when(null, params);\n\t return this;\n\t };\n\t\n\t\n\t this.$get = ['$rootScope',\n\t '$location',\n\t '$routeParams',\n\t '$q',\n\t '$injector',\n\t '$templateRequest',\n\t '$sce',\n\t function($rootScope, $location, $routeParams, $q, $injector, $templateRequest, $sce) {\n\t\n\t /**\n\t * @ngdoc service\n\t * @name $route\n\t * @requires $location\n\t * @requires $routeParams\n\t *\n\t * @property {Object} current Reference to the current route definition.\n\t * The route definition contains:\n\t *\n\t * - `controller`: The controller constructor as define in route definition.\n\t * - `locals`: A map of locals which is used by {@link ng.$controller $controller} service for\n\t * controller instantiation. The `locals` contain\n\t * the resolved values of the `resolve` map. Additionally the `locals` also contain:\n\t *\n\t * - `$scope` - The current route scope.\n\t * - `$template` - The current route template HTML.\n\t *\n\t * @property {Object} routes Object with all route configuration Objects as its properties.\n\t *\n\t * @description\n\t * `$route` is used for deep-linking URLs to controllers and views (HTML partials).\n\t * It watches `$location.url()` and tries to map the path to an existing route definition.\n\t *\n\t * Requires the {@link ngRoute `ngRoute`} module to be installed.\n\t *\n\t * You can define routes through {@link ngRoute.$routeProvider $routeProvider}'s API.\n\t *\n\t * The `$route` service is typically used in conjunction with the\n\t * {@link ngRoute.directive:ngView `ngView`} directive and the\n\t * {@link ngRoute.$routeParams `$routeParams`} service.\n\t *\n\t * @example\n\t * This example shows how changing the URL hash causes the `$route` to match a route against the\n\t * URL, and the `ngView` pulls in the partial.\n\t *\n\t * <example name=\"$route-service\" module=\"ngRouteExample\"\n\t * deps=\"angular-route.js\" fixBase=\"true\">\n\t * <file name=\"index.html\">\n\t * <div ng-controller=\"MainController\">\n\t * Choose:\n\t * <a href=\"Book/Moby\">Moby</a> |\n\t * <a href=\"Book/Moby/ch/1\">Moby: Ch1</a> |\n\t * <a href=\"Book/Gatsby\">Gatsby</a> |\n\t * <a href=\"Book/Gatsby/ch/4?key=value\">Gatsby: Ch4</a> |\n\t * <a href=\"Book/Scarlet\">Scarlet Letter</a><br/>\n\t *\n\t * <div ng-view></div>\n\t *\n\t * <hr />\n\t *\n\t * <pre>$location.path() = {{$location.path()}}</pre>\n\t * <pre>$route.current.templateUrl = {{$route.current.templateUrl}}</pre>\n\t * <pre>$route.current.params = {{$route.current.params}}</pre>\n\t * <pre>$route.current.scope.name = {{$route.current.scope.name}}</pre>\n\t * <pre>$routeParams = {{$routeParams}}</pre>\n\t * </div>\n\t * </file>\n\t *\n\t * <file name=\"book.html\">\n\t * controller: {{name}}<br />\n\t * Book Id: {{params.bookId}}<br />\n\t * </file>\n\t *\n\t * <file name=\"chapter.html\">\n\t * controller: {{name}}<br />\n\t * Book Id: {{params.bookId}}<br />\n\t * Chapter Id: {{params.chapterId}}\n\t * </file>\n\t *\n\t * <file name=\"script.js\">\n\t * angular.module('ngRouteExample', ['ngRoute'])\n\t *\n\t * .controller('MainController', function($scope, $route, $routeParams, $location) {\n\t * $scope.$route = $route;\n\t * $scope.$location = $location;\n\t * $scope.$routeParams = $routeParams;\n\t * })\n\t *\n\t * .controller('BookController', function($scope, $routeParams) {\n\t * $scope.name = \"BookController\";\n\t * $scope.params = $routeParams;\n\t * })\n\t *\n\t * .controller('ChapterController', function($scope, $routeParams) {\n\t * $scope.name = \"ChapterController\";\n\t * $scope.params = $routeParams;\n\t * })\n\t *\n\t * .config(function($routeProvider, $locationProvider) {\n\t * $routeProvider\n\t * .when('/Book/:bookId', {\n\t * templateUrl: 'book.html',\n\t * controller: 'BookController',\n\t * resolve: {\n\t * // I will cause a 1 second delay\n\t * delay: function($q, $timeout) {\n\t * var delay = $q.defer();\n\t * $timeout(delay.resolve, 1000);\n\t * return delay.promise;\n\t * }\n\t * }\n\t * })\n\t * .when('/Book/:bookId/ch/:chapterId', {\n\t * templateUrl: 'chapter.html',\n\t * controller: 'ChapterController'\n\t * });\n\t *\n\t * // configure html5 to get links working on jsfiddle\n\t * $locationProvider.html5Mode(true);\n\t * });\n\t *\n\t * </file>\n\t *\n\t * <file name=\"protractor.js\" type=\"protractor\">\n\t * it('should load and compile correct template', function() {\n\t * element(by.linkText('Moby: Ch1')).click();\n\t * var content = element(by.css('[ng-view]')).getText();\n\t * expect(content).toMatch(/controller\\: ChapterController/);\n\t * expect(content).toMatch(/Book Id\\: Moby/);\n\t * expect(content).toMatch(/Chapter Id\\: 1/);\n\t *\n\t * element(by.partialLinkText('Scarlet')).click();\n\t *\n\t * content = element(by.css('[ng-view]')).getText();\n\t * expect(content).toMatch(/controller\\: BookController/);\n\t * expect(content).toMatch(/Book Id\\: Scarlet/);\n\t * });\n\t * </file>\n\t * </example>\n\t */\n\t\n\t /**\n\t * @ngdoc event\n\t * @name $route#$routeChangeStart\n\t * @eventType broadcast on root scope\n\t * @description\n\t * Broadcasted before a route change. At this point the route services starts\n\t * resolving all of the dependencies needed for the route change to occur.\n\t * Typically this involves fetching the view template as well as any dependencies\n\t * defined in `resolve` route property. Once all of the dependencies are resolved\n\t * `$routeChangeSuccess` is fired.\n\t *\n\t * The route change (and the `$location` change that triggered it) can be prevented\n\t * by calling `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on}\n\t * for more details about event object.\n\t *\n\t * @param {Object} angularEvent Synthetic event object.\n\t * @param {Route} next Future route information.\n\t * @param {Route} current Current route information.\n\t */\n\t\n\t /**\n\t * @ngdoc event\n\t * @name $route#$routeChangeSuccess\n\t * @eventType broadcast on root scope\n\t * @description\n\t * Broadcasted after a route change has happened successfully.\n\t * The `resolve` dependencies are now available in the `current.locals` property.\n\t *\n\t * {@link ngRoute.directive:ngView ngView} listens for the directive\n\t * to instantiate the controller and render the view.\n\t *\n\t * @param {Object} angularEvent Synthetic event object.\n\t * @param {Route} current Current route information.\n\t * @param {Route|Undefined} previous Previous route information, or undefined if current is\n\t * first route entered.\n\t */\n\t\n\t /**\n\t * @ngdoc event\n\t * @name $route#$routeChangeError\n\t * @eventType broadcast on root scope\n\t * @description\n\t * Broadcasted if any of the resolve promises are rejected.\n\t *\n\t * @param {Object} angularEvent Synthetic event object\n\t * @param {Route} current Current route information.\n\t * @param {Route} previous Previous route information.\n\t * @param {Route} rejection Rejection of the promise. Usually the error of the failed promise.\n\t */\n\t\n\t /**\n\t * @ngdoc event\n\t * @name $route#$routeUpdate\n\t * @eventType broadcast on root scope\n\t * @description\n\t * The `reloadOnSearch` property has been set to false, and we are reusing the same\n\t * instance of the Controller.\n\t *\n\t * @param {Object} angularEvent Synthetic event object\n\t * @param {Route} current Current/previous route information.\n\t */\n\t\n\t var forceReload = false,\n\t preparedRoute,\n\t preparedRouteIsUpdateOnly,\n\t $route = {\n\t routes: routes,\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $route#reload\n\t *\n\t * @description\n\t * Causes `$route` service to reload the current route even if\n\t * {@link ng.$location $location} hasn't changed.\n\t *\n\t * As a result of that, {@link ngRoute.directive:ngView ngView}\n\t * creates new scope and reinstantiates the controller.\n\t */\n\t reload: function() {\n\t forceReload = true;\n\t\n\t var fakeLocationEvent = {\n\t defaultPrevented: false,\n\t preventDefault: function fakePreventDefault() {\n\t this.defaultPrevented = true;\n\t forceReload = false;\n\t }\n\t };\n\t\n\t $rootScope.$evalAsync(function() {\n\t prepareRoute(fakeLocationEvent);\n\t if (!fakeLocationEvent.defaultPrevented) commitRoute();\n\t });\n\t },\n\t\n\t /**\n\t * @ngdoc method\n\t * @name $route#updateParams\n\t *\n\t * @description\n\t * Causes `$route` service to update the current URL, replacing\n\t * current route parameters with those specified in `newParams`.\n\t * Provided property names that match the route's path segment\n\t * definitions will be interpolated into the location's path, while\n\t * remaining properties will be treated as query params.\n\t *\n\t * @param {!Object<string, string>} newParams mapping of URL parameter names to values\n\t */\n\t updateParams: function(newParams) {\n\t if (this.current && this.current.$$route) {\n\t newParams = angular.extend({}, this.current.params, newParams);\n\t $location.path(interpolate(this.current.$$route.originalPath, newParams));\n\t // interpolate modifies newParams, only query params are left\n\t $location.search(newParams);\n\t } else {\n\t throw $routeMinErr('norout', 'Tried updating route when with no current route');\n\t }\n\t }\n\t };\n\t\n\t $rootScope.$on('$locationChangeStart', prepareRoute);\n\t $rootScope.$on('$locationChangeSuccess', commitRoute);\n\t\n\t return $route;\n\t\n\t /////////////////////////////////////////////////////\n\t\n\t /**\n\t * @param on {string} current url\n\t * @param route {Object} route regexp to match the url against\n\t * @return {?Object}\n\t *\n\t * @description\n\t * Check if the route matches the current url.\n\t *\n\t * Inspired by match in\n\t * visionmedia/express/lib/router/router.js.\n\t */\n\t function switchRouteMatcher(on, route) {\n\t var keys = route.keys,\n\t params = {};\n\t\n\t if (!route.regexp) return null;\n\t\n\t var m = route.regexp.exec(on);\n\t if (!m) return null;\n\t\n\t for (var i = 1, len = m.length; i < len; ++i) {\n\t var key = keys[i - 1];\n\t\n\t var val = m[i];\n\t\n\t if (key && val) {\n\t params[key.name] = val;\n\t }\n\t }\n\t return params;\n\t }\n\t\n\t function prepareRoute($locationEvent) {\n\t var lastRoute = $route.current;\n\t\n\t preparedRoute = parseRoute();\n\t preparedRouteIsUpdateOnly = preparedRoute && lastRoute && preparedRoute.$$route === lastRoute.$$route\n\t && angular.equals(preparedRoute.pathParams, lastRoute.pathParams)\n\t && !preparedRoute.reloadOnSearch && !forceReload;\n\t\n\t if (!preparedRouteIsUpdateOnly && (lastRoute || preparedRoute)) {\n\t if ($rootScope.$broadcast('$routeChangeStart', preparedRoute, lastRoute).defaultPrevented) {\n\t if ($locationEvent) {\n\t $locationEvent.preventDefault();\n\t }\n\t }\n\t }\n\t }\n\t\n\t function commitRoute() {\n\t var lastRoute = $route.current;\n\t var nextRoute = preparedRoute;\n\t\n\t if (preparedRouteIsUpdateOnly) {\n\t lastRoute.params = nextRoute.params;\n\t angular.copy(lastRoute.params, $routeParams);\n\t $rootScope.$broadcast('$routeUpdate', lastRoute);\n\t } else if (nextRoute || lastRoute) {\n\t forceReload = false;\n\t $route.current = nextRoute;\n\t if (nextRoute) {\n\t if (nextRoute.redirectTo) {\n\t if (angular.isString(nextRoute.redirectTo)) {\n\t $location.path(interpolate(nextRoute.redirectTo, nextRoute.params)).search(nextRoute.params)\n\t .replace();\n\t } else {\n\t $location.url(nextRoute.redirectTo(nextRoute.pathParams, $location.path(), $location.search()))\n\t .replace();\n\t }\n\t }\n\t }\n\t\n\t $q.when(nextRoute).\n\t then(function() {\n\t if (nextRoute) {\n\t var locals = angular.extend({}, nextRoute.resolve),\n\t template, templateUrl;\n\t\n\t angular.forEach(locals, function(value, key) {\n\t locals[key] = angular.isString(value) ?\n\t $injector.get(value) : $injector.invoke(value, null, null, key);\n\t });\n\t\n\t if (angular.isDefined(template = nextRoute.template)) {\n\t if (angular.isFunction(template)) {\n\t template = template(nextRoute.params);\n\t }\n\t } else if (angular.isDefined(templateUrl = nextRoute.templateUrl)) {\n\t if (angular.isFunction(templateUrl)) {\n\t templateUrl = templateUrl(nextRoute.params);\n\t }\n\t if (angular.isDefined(templateUrl)) {\n\t nextRoute.loadedTemplateUrl = $sce.valueOf(templateUrl);\n\t template = $templateRequest(templateUrl);\n\t }\n\t }\n\t if (angular.isDefined(template)) {\n\t locals['$template'] = template;\n\t }\n\t return $q.all(locals);\n\t }\n\t }).\n\t then(function(locals) {\n\t // after route change\n\t if (nextRoute == $route.current) {\n\t if (nextRoute) {\n\t nextRoute.locals = locals;\n\t angular.copy(nextRoute.params, $routeParams);\n\t }\n\t $rootScope.$broadcast('$routeChangeSuccess', nextRoute, lastRoute);\n\t }\n\t }, function(error) {\n\t if (nextRoute == $route.current) {\n\t $rootScope.$broadcast('$routeChangeError', nextRoute, lastRoute, error);\n\t }\n\t });\n\t }\n\t }\n\t\n\t\n\t /**\n\t * @returns {Object} the current active route, by matching it against the URL\n\t */\n\t function parseRoute() {\n\t // Match a route\n\t var params, match;\n\t angular.forEach(routes, function(route, path) {\n\t if (!match && (params = switchRouteMatcher($location.path(), route))) {\n\t match = inherit(route, {\n\t params: angular.extend({}, $location.search(), params),\n\t pathParams: params});\n\t match.$$route = route;\n\t }\n\t });\n\t // No route matched; fallback to \"otherwise\" route\n\t return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}});\n\t }\n\t\n\t /**\n\t * @returns {string} interpolation of the redirect path with the parameters\n\t */\n\t function interpolate(string, params) {\n\t var result = [];\n\t angular.forEach((string || '').split(':'), function(segment, i) {\n\t if (i === 0) {\n\t result.push(segment);\n\t } else {\n\t var segmentMatch = segment.match(/(\\w+)(?:[?*])?(.*)/);\n\t var key = segmentMatch[1];\n\t result.push(params[key]);\n\t result.push(segmentMatch[2] || '');\n\t delete params[key];\n\t }\n\t });\n\t return result.join('');\n\t }\n\t }];\n\t}\n\t\n\tngRouteModule.provider('$routeParams', $RouteParamsProvider);\n\t\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $routeParams\n\t * @requires $route\n\t *\n\t * @description\n\t * The `$routeParams` service allows you to retrieve the current set of route parameters.\n\t *\n\t * Requires the {@link ngRoute `ngRoute`} module to be installed.\n\t *\n\t * The route parameters are a combination of {@link ng.$location `$location`}'s\n\t * {@link ng.$location#search `search()`} and {@link ng.$location#path `path()`}.\n\t * The `path` parameters are extracted when the {@link ngRoute.$route `$route`} path is matched.\n\t *\n\t * In case of parameter name collision, `path` params take precedence over `search` params.\n\t *\n\t * The service guarantees that the identity of the `$routeParams` object will remain unchanged\n\t * (but its properties will likely change) even when a route change occurs.\n\t *\n\t * Note that the `$routeParams` are only updated *after* a route change completes successfully.\n\t * This means that you cannot rely on `$routeParams` being correct in route resolve functions.\n\t * Instead you can use `$route.current.params` to access the new route's parameters.\n\t *\n\t * @example\n\t * ```js\n\t * // Given:\n\t * // URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby\n\t * // Route: /Chapter/:chapterId/Section/:sectionId\n\t * //\n\t * // Then\n\t * $routeParams ==> {chapterId:'1', sectionId:'2', search:'moby'}\n\t * ```\n\t */\n\tfunction $RouteParamsProvider() {\n\t this.$get = function() { return {}; };\n\t}\n\t\n\tngRouteModule.directive('ngView', ngViewFactory);\n\tngRouteModule.directive('ngView', ngViewFillContentFactory);\n\t\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngView\n\t * @restrict ECA\n\t *\n\t * @description\n\t * # Overview\n\t * `ngView` is a directive that complements the {@link ngRoute.$route $route} service by\n\t * including the rendered template of the current route into the main layout (`index.html`) file.\n\t * Every time the current route changes, the included view changes with it according to the\n\t * configuration of the `$route` service.\n\t *\n\t * Requires the {@link ngRoute `ngRoute`} module to be installed.\n\t *\n\t * @animations\n\t * enter - animation is used to bring new content into the browser.\n\t * leave - animation is used to animate existing content away.\n\t *\n\t * The enter and leave animation occur concurrently.\n\t *\n\t * @scope\n\t * @priority 400\n\t * @param {string=} onload Expression to evaluate whenever the view updates.\n\t *\n\t * @param {string=} autoscroll Whether `ngView` should call {@link ng.$anchorScroll\n\t * $anchorScroll} to scroll the viewport after the view is updated.\n\t *\n\t * - If the attribute is not set, disable scrolling.\n\t * - If the attribute is set without value, enable scrolling.\n\t * - Otherwise enable scrolling only if the `autoscroll` attribute value evaluated\n\t * as an expression yields a truthy value.\n\t * @example\n\t <example name=\"ngView-directive\" module=\"ngViewExample\"\n\t deps=\"angular-route.js;angular-animate.js\"\n\t animations=\"true\" fixBase=\"true\">\n\t <file name=\"index.html\">\n\t <div ng-controller=\"MainCtrl as main\">\n\t Choose:\n\t <a href=\"Book/Moby\">Moby</a> |\n\t <a href=\"Book/Moby/ch/1\">Moby: Ch1</a> |\n\t <a href=\"Book/Gatsby\">Gatsby</a> |\n\t <a href=\"Book/Gatsby/ch/4?key=value\">Gatsby: Ch4</a> |\n\t <a href=\"Book/Scarlet\">Scarlet Letter</a><br/>\n\t\n\t <div class=\"view-animate-container\">\n\t <div ng-view class=\"view-animate\"></div>\n\t </div>\n\t <hr />\n\t\n\t <pre>$location.path() = {{main.$location.path()}}</pre>\n\t <pre>$route.current.templateUrl = {{main.$route.current.templateUrl}}</pre>\n\t <pre>$route.current.params = {{main.$route.current.params}}</pre>\n\t <pre>$routeParams = {{main.$routeParams}}</pre>\n\t </div>\n\t </file>\n\t\n\t <file name=\"book.html\">\n\t <div>\n\t controller: {{book.name}}<br />\n\t Book Id: {{book.params.bookId}}<br />\n\t </div>\n\t </file>\n\t\n\t <file name=\"chapter.html\">\n\t <div>\n\t controller: {{chapter.name}}<br />\n\t Book Id: {{chapter.params.bookId}}<br />\n\t Chapter Id: {{chapter.params.chapterId}}\n\t </div>\n\t </file>\n\t\n\t <file name=\"animations.css\">\n\t .view-animate-container {\n\t position:relative;\n\t height:100px!important;\n\t background:white;\n\t border:1px solid black;\n\t height:40px;\n\t overflow:hidden;\n\t }\n\t\n\t .view-animate {\n\t padding:10px;\n\t }\n\t\n\t .view-animate.ng-enter, .view-animate.ng-leave {\n\t transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;\n\t\n\t display:block;\n\t width:100%;\n\t border-left:1px solid black;\n\t\n\t position:absolute;\n\t top:0;\n\t left:0;\n\t right:0;\n\t bottom:0;\n\t padding:10px;\n\t }\n\t\n\t .view-animate.ng-enter {\n\t left:100%;\n\t }\n\t .view-animate.ng-enter.ng-enter-active {\n\t left:0;\n\t }\n\t .view-animate.ng-leave.ng-leave-active {\n\t left:-100%;\n\t }\n\t </file>\n\t\n\t <file name=\"script.js\">\n\t angular.module('ngViewExample', ['ngRoute', 'ngAnimate'])\n\t .config(['$routeProvider', '$locationProvider',\n\t function($routeProvider, $locationProvider) {\n\t $routeProvider\n\t .when('/Book/:bookId', {\n\t templateUrl: 'book.html',\n\t controller: 'BookCtrl',\n\t controllerAs: 'book'\n\t })\n\t .when('/Book/:bookId/ch/:chapterId', {\n\t templateUrl: 'chapter.html',\n\t controller: 'ChapterCtrl',\n\t controllerAs: 'chapter'\n\t });\n\t\n\t $locationProvider.html5Mode(true);\n\t }])\n\t .controller('MainCtrl', ['$route', '$routeParams', '$location',\n\t function($route, $routeParams, $location) {\n\t this.$route = $route;\n\t this.$location = $location;\n\t this.$routeParams = $routeParams;\n\t }])\n\t .controller('BookCtrl', ['$routeParams', function($routeParams) {\n\t this.name = \"BookCtrl\";\n\t this.params = $routeParams;\n\t }])\n\t .controller('ChapterCtrl', ['$routeParams', function($routeParams) {\n\t this.name = \"ChapterCtrl\";\n\t this.params = $routeParams;\n\t }]);\n\t\n\t </file>\n\t\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should load and compile correct template', function() {\n\t element(by.linkText('Moby: Ch1')).click();\n\t var content = element(by.css('[ng-view]')).getText();\n\t expect(content).toMatch(/controller\\: ChapterCtrl/);\n\t expect(content).toMatch(/Book Id\\: Moby/);\n\t expect(content).toMatch(/Chapter Id\\: 1/);\n\t\n\t element(by.partialLinkText('Scarlet')).click();\n\t\n\t content = element(by.css('[ng-view]')).getText();\n\t expect(content).toMatch(/controller\\: BookCtrl/);\n\t expect(content).toMatch(/Book Id\\: Scarlet/);\n\t });\n\t </file>\n\t </example>\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc event\n\t * @name ngView#$viewContentLoaded\n\t * @eventType emit on the current ngView scope\n\t * @description\n\t * Emitted every time the ngView content is reloaded.\n\t */\n\tngViewFactory.$inject = ['$route', '$anchorScroll', '$animate'];\n\tfunction ngViewFactory($route, $anchorScroll, $animate) {\n\t return {\n\t restrict: 'ECA',\n\t terminal: true,\n\t priority: 400,\n\t transclude: 'element',\n\t link: function(scope, $element, attr, ctrl, $transclude) {\n\t var currentScope,\n\t currentElement,\n\t previousLeaveAnimation,\n\t autoScrollExp = attr.autoscroll,\n\t onloadExp = attr.onload || '';\n\t\n\t scope.$on('$routeChangeSuccess', update);\n\t update();\n\t\n\t function cleanupLastView() {\n\t if (previousLeaveAnimation) {\n\t $animate.cancel(previousLeaveAnimation);\n\t previousLeaveAnimation = null;\n\t }\n\t\n\t if (currentScope) {\n\t currentScope.$destroy();\n\t currentScope = null;\n\t }\n\t if (currentElement) {\n\t previousLeaveAnimation = $animate.leave(currentElement);\n\t previousLeaveAnimation.then(function() {\n\t previousLeaveAnimation = null;\n\t });\n\t currentElement = null;\n\t }\n\t }\n\t\n\t function update() {\n\t var locals = $route.current && $route.current.locals,\n\t template = locals && locals.$template;\n\t\n\t if (angular.isDefined(template)) {\n\t var newScope = scope.$new();\n\t var current = $route.current;\n\t\n\t // Note: This will also link all children of ng-view that were contained in the original\n\t // html. If that content contains controllers, ... they could pollute/change the scope.\n\t // However, using ng-view on an element with additional content does not make sense...\n\t // Note: We can't remove them in the cloneAttchFn of $transclude as that\n\t // function is called before linking the content, which would apply child\n\t // directives to non existing elements.\n\t var clone = $transclude(newScope, function(clone) {\n\t $animate.enter(clone, null, currentElement || $element).then(function onNgViewEnter() {\n\t if (angular.isDefined(autoScrollExp)\n\t && (!autoScrollExp || scope.$eval(autoScrollExp))) {\n\t $anchorScroll();\n\t }\n\t });\n\t cleanupLastView();\n\t });\n\t\n\t currentElement = clone;\n\t currentScope = current.scope = newScope;\n\t currentScope.$emit('$viewContentLoaded');\n\t currentScope.$eval(onloadExp);\n\t } else {\n\t cleanupLastView();\n\t }\n\t }\n\t }\n\t };\n\t}\n\t\n\t// This directive is called during the $transclude call of the first `ngView` directive.\n\t// It will replace and compile the content of the element with the loaded template.\n\t// We need this directive so that the element content is already filled when\n\t// the link function of another directive on the same element as ngView\n\t// is called.\n\tngViewFillContentFactory.$inject = ['$compile', '$controller', '$route'];\n\tfunction ngViewFillContentFactory($compile, $controller, $route) {\n\t return {\n\t restrict: 'ECA',\n\t priority: -400,\n\t link: function(scope, $element) {\n\t var current = $route.current,\n\t locals = current.locals;\n\t\n\t $element.html(locals.$template);\n\t\n\t var link = $compile($element.contents());\n\t\n\t if (current.controller) {\n\t locals.$scope = scope;\n\t var controller = $controller(current.controller, locals);\n\t if (current.controllerAs) {\n\t scope[current.controllerAs] = controller;\n\t }\n\t $element.data('$ngControllerController', controller);\n\t $element.children().data('$ngControllerController', controller);\n\t }\n\t\n\t link(scope);\n\t }\n\t };\n\t}\n\t\n\t\n\t})(window, window.angular);\n\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(7);\n\tmodule.exports = 'ngSanitize';\n\n\n/***/ },\n/* 7 */\n/***/ function(module, exports) {\n\n\t/**\n\t * @license AngularJS v1.4.14\n\t * (c) 2010-2015 Google, Inc. http://angularjs.org\n\t * License: MIT\n\t */\n\t(function(window, angular, undefined) {'use strict';\n\t\n\t/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\t * Any commits to this file should be reviewed with security in mind. *\n\t * Changes to this file can potentially create security vulnerabilities. *\n\t * An approval from 2 Core members with history of modifying *\n\t * this file is required. *\n\t * *\n\t * Does the change somehow allow for arbitrary javascript to be executed? *\n\t * Or allows for someone to change the prototype of built-in objects? *\n\t * Or gives undesired access to variables likes document or window? *\n\t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\t\n\tvar $sanitizeMinErr = angular.$$minErr('$sanitize');\n\t\n\t/**\n\t * @ngdoc module\n\t * @name ngSanitize\n\t * @description\n\t *\n\t * # ngSanitize\n\t *\n\t * The `ngSanitize` module provides functionality to sanitize HTML.\n\t *\n\t *\n\t * <div doc-module-components=\"ngSanitize\"></div>\n\t *\n\t * See {@link ngSanitize.$sanitize `$sanitize`} for usage.\n\t */\n\t\n\t/*\n\t * HTML Parser By Misko Hevery (misko@hevery.com)\n\t * based on: HTML Parser By John Resig (ejohn.org)\n\t * Original code by Erik Arvidsson, Mozilla Public License\n\t * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js\n\t *\n\t * // Use like so:\n\t * htmlParser(htmlString, {\n\t * start: function(tag, attrs, unary) {},\n\t * end: function(tag) {},\n\t * chars: function(text) {},\n\t * comment: function(text) {}\n\t * });\n\t *\n\t */\n\t\n\t\n\t/**\n\t * @ngdoc service\n\t * @name $sanitize\n\t * @kind function\n\t *\n\t * @description\n\t * The input is sanitized by parsing the HTML into tokens. All safe tokens (from a whitelist) are\n\t * then serialized back to properly escaped html string. This means that no unsafe input can make\n\t * it into the returned string, however, since our parser is more strict than a typical browser\n\t * parser, it's possible that some obscure input, which would be recognized as valid HTML by a\n\t * browser, won't make it through the sanitizer. The input may also contain SVG markup.\n\t * The whitelist is configured using the functions `aHrefSanitizationWhitelist` and\n\t * `imgSrcSanitizationWhitelist` of {@link ng.$compileProvider `$compileProvider`}.\n\t *\n\t * @param {string} html HTML input.\n\t * @returns {string} Sanitized HTML.\n\t *\n\t * @example\n\t <example module=\"sanitizeExample\" deps=\"angular-sanitize.js\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('sanitizeExample', ['ngSanitize'])\n\t .controller('ExampleController', ['$scope', '$sce', function($scope, $sce) {\n\t $scope.snippet =\n\t '<p style=\"color:blue\">an html\\n' +\n\t '<em onmouseover=\"this.textContent=\\'PWN3D!\\'\">click here</em>\\n' +\n\t 'snippet</p>';\n\t $scope.deliberatelyTrustDangerousSnippet = function() {\n\t return $sce.trustAsHtml($scope.snippet);\n\t };\n\t }]);\n\t </script>\n\t <div ng-controller=\"ExampleController\">\n\t Snippet: <textarea ng-model=\"snippet\" cols=\"60\" rows=\"3\"></textarea>\n\t <table>\n\t <tr>\n\t <td>Directive</td>\n\t <td>How</td>\n\t <td>Source</td>\n\t <td>Rendered</td>\n\t </tr>\n\t <tr id=\"bind-html-with-sanitize\">\n\t <td>ng-bind-html</td>\n\t <td>Automatically uses $sanitize</td>\n\t <td><pre>&lt;div ng-bind-html=\"snippet\"&gt;<br/>&lt;/div&gt;</pre></td>\n\t <td><div ng-bind-html=\"snippet\"></div></td>\n\t </tr>\n\t <tr id=\"bind-html-with-trust\">\n\t <td>ng-bind-html</td>\n\t <td>Bypass $sanitize by explicitly trusting the dangerous value</td>\n\t <td>\n\t <pre>&lt;div ng-bind-html=\"deliberatelyTrustDangerousSnippet()\"&gt;\n\t&lt;/div&gt;</pre>\n\t </td>\n\t <td><div ng-bind-html=\"deliberatelyTrustDangerousSnippet()\"></div></td>\n\t </tr>\n\t <tr id=\"bind-default\">\n\t <td>ng-bind</td>\n\t <td>Automatically escapes</td>\n\t <td><pre>&lt;div ng-bind=\"snippet\"&gt;<br/>&lt;/div&gt;</pre></td>\n\t <td><div ng-bind=\"snippet\"></div></td>\n\t </tr>\n\t </table>\n\t </div>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should sanitize the html snippet by default', function() {\n\t expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).\n\t toBe('<p>an html\\n<em>click here</em>\\nsnippet</p>');\n\t });\n\t\n\t it('should inline raw snippet if bound to a trusted value', function() {\n\t expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).\n\t toBe(\"<p style=\\\"color:blue\\\">an html\\n\" +\n\t \"<em onmouseover=\\\"this.textContent='PWN3D!'\\\">click here</em>\\n\" +\n\t \"snippet</p>\");\n\t });\n\t\n\t it('should escape snippet without any filter', function() {\n\t expect(element(by.css('#bind-default div')).getInnerHtml()).\n\t toBe(\"&lt;p style=\\\"color:blue\\\"&gt;an html\\n\" +\n\t \"&lt;em onmouseover=\\\"this.textContent='PWN3D!'\\\"&gt;click here&lt;/em&gt;\\n\" +\n\t \"snippet&lt;/p&gt;\");\n\t });\n\t\n\t it('should update', function() {\n\t element(by.model('snippet')).clear();\n\t element(by.model('snippet')).sendKeys('new <b onclick=\"alert(1)\">text</b>');\n\t expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).\n\t toBe('new <b>text</b>');\n\t expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).toBe(\n\t 'new <b onclick=\"alert(1)\">text</b>');\n\t expect(element(by.css('#bind-default div')).getInnerHtml()).toBe(\n\t \"new &lt;b onclick=\\\"alert(1)\\\"&gt;text&lt;/b&gt;\");\n\t });\n\t </file>\n\t </example>\n\t */\n\tfunction $SanitizeProvider() {\n\t this.$get = ['$$sanitizeUri', function($$sanitizeUri) {\n\t return function(html) {\n\t var buf = [];\n\t htmlParser(html, htmlSanitizeWriter(buf, function(uri, isImage) {\n\t return !/^unsafe/.test($$sanitizeUri(uri, isImage));\n\t }));\n\t return buf.join('');\n\t };\n\t }];\n\t}\n\t\n\tfunction sanitizeText(chars) {\n\t var buf = [];\n\t var writer = htmlSanitizeWriter(buf, angular.noop);\n\t writer.chars(chars);\n\t return buf.join('');\n\t}\n\t\n\t\n\t// Regular Expressions for parsing tags and attributes\n\tvar START_TAG_REGEXP =\n\t /^<((?:[a-zA-Z])[\\w:-]*)((?:\\s+[\\w:-]+(?:\\s*=\\s*(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>\\s]+))?)*)\\s*(\\/?)\\s*(>?)/,\n\t END_TAG_REGEXP = /^<\\/\\s*([\\w:-]+)[^>]*>/,\n\t ATTR_REGEXP = /([\\w:-]+)(?:\\s*=\\s*(?:(?:\"((?:[^\"])*)\")|(?:'((?:[^'])*)')|([^>\\s]+)))?/g,\n\t BEGIN_TAG_REGEXP = /^</,\n\t BEGING_END_TAGE_REGEXP = /^<\\//,\n\t COMMENT_REGEXP = /<!--(.*?)-->/g,\n\t DOCTYPE_REGEXP = /<!DOCTYPE([^>]*?)>/i,\n\t CDATA_REGEXP = /<!\\[CDATA\\[(.*?)]]>/g,\n\t SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g,\n\t // Match everything outside of normal chars and \" (quote character)\n\t NON_ALPHANUMERIC_REGEXP = /([^\\#-~| |!])/g;\n\t\n\t\n\t// Good source of info about elements and attributes\n\t// http://dev.w3.org/html5/spec/Overview.html#semantics\n\t// http://simon.html5.org/html-elements\n\t\n\t// Safe Void Elements - HTML5\n\t// http://dev.w3.org/html5/spec/Overview.html#void-elements\n\tvar voidElements = makeMap(\"area,br,col,hr,img,wbr\");\n\t\n\t// Elements that you can, intentionally, leave open (and which close themselves)\n\t// http://dev.w3.org/html5/spec/Overview.html#optional-tags\n\tvar optionalEndTagBlockElements = makeMap(\"colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr\"),\n\t optionalEndTagInlineElements = makeMap(\"rp,rt\"),\n\t optionalEndTagElements = angular.extend({},\n\t optionalEndTagInlineElements,\n\t optionalEndTagBlockElements);\n\t\n\t// Safe Block Elements - HTML5\n\tvar blockElements = angular.extend({}, optionalEndTagBlockElements, makeMap(\"address,article,\" +\n\t \"aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,\" +\n\t \"h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul\"));\n\t\n\t// Inline Elements - HTML5\n\tvar inlineElements = angular.extend({}, optionalEndTagInlineElements, makeMap(\"a,abbr,acronym,b,\" +\n\t \"bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,\" +\n\t \"samp,small,span,strike,strong,sub,sup,time,tt,u,var\"));\n\t\n\t// SVG Elements\n\t// https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Elements\n\t// Note: the elements animate,animateColor,animateMotion,animateTransform,set are intentionally omitted.\n\t// They can potentially allow for arbitrary javascript to be executed. See #11290\n\tvar svgElements = makeMap(\"circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,\" +\n\t \"hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,\" +\n\t \"radialGradient,rect,stop,svg,switch,text,title,tspan,use\");\n\t\n\t// Special Elements (can contain anything)\n\tvar specialElements = makeMap(\"script,style\");\n\t\n\tvar validElements = angular.extend({},\n\t voidElements,\n\t blockElements,\n\t inlineElements,\n\t optionalEndTagElements,\n\t svgElements);\n\t\n\t//Attributes that have href and hence need to be sanitized\n\tvar uriAttrs = makeMap(\"background,cite,href,longdesc,src,usemap,xlink:href\");\n\t\n\tvar htmlAttrs = makeMap('abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,' +\n\t 'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,' +\n\t 'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,' +\n\t 'scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,' +\n\t 'valign,value,vspace,width');\n\t\n\t// SVG attributes (without \"id\" and \"name\" attributes)\n\t// https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Attributes\n\tvar svgAttrs = makeMap('accent-height,accumulate,additive,alphabetic,arabic-form,ascent,' +\n\t 'baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,' +\n\t 'cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,' +\n\t 'font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,' +\n\t 'height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,' +\n\t 'marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,' +\n\t 'max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,' +\n\t 'path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,' +\n\t 'requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,' +\n\t 'stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,' +\n\t 'stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,' +\n\t 'stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,' +\n\t 'underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,' +\n\t 'width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,' +\n\t 'xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan', true);\n\t\n\tvar validAttrs = angular.extend({},\n\t uriAttrs,\n\t svgAttrs,\n\t htmlAttrs);\n\t\n\tfunction makeMap(str, lowercaseKeys) {\n\t var obj = {}, items = str.split(','), i;\n\t for (i = 0; i < items.length; i++) {\n\t obj[lowercaseKeys ? angular.lowercase(items[i]) : items[i]] = true;\n\t }\n\t return obj;\n\t}\n\t\n\t\n\t/**\n\t * @example\n\t * htmlParser(htmlString, {\n\t * start: function(tag, attrs, unary) {},\n\t * end: function(tag) {},\n\t * chars: function(text) {},\n\t * comment: function(text) {}\n\t * });\n\t *\n\t * @param {string} html string\n\t * @param {object} handler\n\t */\n\tfunction htmlParser(html, handler) {\n\t if (typeof html !== 'string') {\n\t if (html === null || typeof html === 'undefined') {\n\t html = '';\n\t } else {\n\t html = '' + html;\n\t }\n\t }\n\t var index, chars, match, stack = [], last = html, text;\n\t stack.last = function() { return stack[stack.length - 1]; };\n\t\n\t while (html) {\n\t text = '';\n\t chars = true;\n\t\n\t // Make sure we're not in a script or style element\n\t if (!stack.last() || !specialElements[stack.last()]) {\n\t\n\t // Comment\n\t if (html.indexOf(\"<!--\") === 0) {\n\t // comments containing -- are not allowed unless they terminate the comment\n\t index = html.indexOf(\"--\", 4);\n\t\n\t if (index >= 0 && html.lastIndexOf(\"-->\", index) === index) {\n\t if (handler.comment) handler.comment(html.substring(4, index));\n\t html = html.substring(index + 3);\n\t chars = false;\n\t }\n\t // DOCTYPE\n\t } else if (DOCTYPE_REGEXP.test(html)) {\n\t match = html.match(DOCTYPE_REGEXP);\n\t\n\t if (match) {\n\t html = html.replace(match[0], '');\n\t chars = false;\n\t }\n\t // end tag\n\t } else if (BEGING_END_TAGE_REGEXP.test(html)) {\n\t match = html.match(END_TAG_REGEXP);\n\t\n\t if (match) {\n\t html = html.substring(match[0].length);\n\t match[0].replace(END_TAG_REGEXP, parseEndTag);\n\t chars = false;\n\t }\n\t\n\t // start tag\n\t } else if (BEGIN_TAG_REGEXP.test(html)) {\n\t match = html.match(START_TAG_REGEXP);\n\t\n\t if (match) {\n\t // We only have a valid start-tag if there is a '>'.\n\t if (match[4]) {\n\t html = html.substring(match[0].length);\n\t match[0].replace(START_TAG_REGEXP, parseStartTag);\n\t }\n\t chars = false;\n\t } else {\n\t // no ending tag found --- this piece should be encoded as an entity.\n\t text += '<';\n\t html = html.substring(1);\n\t }\n\t }\n\t\n\t if (chars) {\n\t index = html.indexOf(\"<\");\n\t\n\t text += index < 0 ? html : html.substring(0, index);\n\t html = index < 0 ? \"\" : html.substring(index);\n\t\n\t if (handler.chars) handler.chars(decodeEntities(text));\n\t }\n\t\n\t } else {\n\t // IE versions 9 and 10 do not understand the regex '[^]', so using a workaround with [\\W\\w].\n\t html = html.replace(new RegExp(\"([\\\\W\\\\w]*)<\\\\s*\\\\/\\\\s*\" + stack.last() + \"[^>]*>\", 'i'),\n\t function(all, text) {\n\t text = text.replace(COMMENT_REGEXP, \"$1\").replace(CDATA_REGEXP, \"$1\");\n\t\n\t if (handler.chars) handler.chars(decodeEntities(text));\n\t\n\t return \"\";\n\t });\n\t\n\t parseEndTag(\"\", stack.last());\n\t }\n\t\n\t if (html == last) {\n\t throw $sanitizeMinErr('badparse', \"The sanitizer was unable to parse the following block \" +\n\t \"of html: {0}\", html);\n\t }\n\t last = html;\n\t }\n\t\n\t // Clean up any remaining tags\n\t parseEndTag();\n\t\n\t function parseStartTag(tag, tagName, rest, unary) {\n\t tagName = angular.lowercase(tagName);\n\t if (blockElements[tagName]) {\n\t while (stack.last() && inlineElements[stack.last()]) {\n\t parseEndTag(\"\", stack.last());\n\t }\n\t }\n\t\n\t if (optionalEndTagElements[tagName] && stack.last() == tagName) {\n\t parseEndTag(\"\", tagName);\n\t }\n\t\n\t unary = voidElements[tagName] || !!unary;\n\t\n\t if (!unary) {\n\t stack.push(tagName);\n\t }\n\t\n\t var attrs = {};\n\t\n\t rest.replace(ATTR_REGEXP,\n\t function(match, name, doubleQuotedValue, singleQuotedValue, unquotedValue) {\n\t var value = doubleQuotedValue\n\t || singleQuotedValue\n\t || unquotedValue\n\t || '';\n\t\n\t attrs[name] = decodeEntities(value);\n\t });\n\t if (handler.start) handler.start(tagName, attrs, unary);\n\t }\n\t\n\t function parseEndTag(tag, tagName) {\n\t var pos = 0, i;\n\t tagName = angular.lowercase(tagName);\n\t if (tagName) {\n\t // Find the closest opened tag of the same type\n\t for (pos = stack.length - 1; pos >= 0; pos--) {\n\t if (stack[pos] == tagName) break;\n\t }\n\t }\n\t\n\t if (pos >= 0) {\n\t // Close all the open elements, up the stack\n\t for (i = stack.length - 1; i >= pos; i--)\n\t if (handler.end) handler.end(stack[i]);\n\t\n\t // Remove the open elements from the stack\n\t stack.length = pos;\n\t }\n\t }\n\t}\n\t\n\tvar hiddenPre=document.createElement(\"pre\");\n\t/**\n\t * decodes all entities into regular string\n\t * @param value\n\t * @returns {string} A string with decoded entities.\n\t */\n\tfunction decodeEntities(value) {\n\t if (!value) { return ''; }\n\t\n\t hiddenPre.innerHTML = value.replace(/</g,\"&lt;\");\n\t // innerText depends on styling as it doesn't display hidden elements.\n\t // Therefore, it's better to use textContent not to cause unnecessary reflows.\n\t return hiddenPre.textContent;\n\t}\n\t\n\t/**\n\t * Escapes all potentially dangerous characters, so that the\n\t * resulting string can be safely inserted into attribute or\n\t * element text.\n\t * @param value\n\t * @returns {string} escaped text\n\t */\n\tfunction encodeEntities(value) {\n\t return value.\n\t replace(/&/g, '&amp;').\n\t replace(SURROGATE_PAIR_REGEXP, function(value) {\n\t var hi = value.charCodeAt(0);\n\t var low = value.charCodeAt(1);\n\t return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\n\t }).\n\t replace(NON_ALPHANUMERIC_REGEXP, function(value) {\n\t return '&#' + value.charCodeAt(0) + ';';\n\t }).\n\t replace(/</g, '&lt;').\n\t replace(/>/g, '&gt;');\n\t}\n\t\n\t/**\n\t * create an HTML/XML writer which writes to buffer\n\t * @param {Array} buf use buf.jain('') to get out sanitized html string\n\t * @returns {object} in the form of {\n\t * start: function(tag, attrs, unary) {},\n\t * end: function(tag) {},\n\t * chars: function(text) {},\n\t * comment: function(text) {}\n\t * }\n\t */\n\tfunction htmlSanitizeWriter(buf, uriValidator) {\n\t var ignore = false;\n\t var out = angular.bind(buf, buf.push);\n\t return {\n\t start: function(tag, attrs, unary) {\n\t tag = angular.lowercase(tag);\n\t if (!ignore && specialElements[tag]) {\n\t ignore = tag;\n\t }\n\t if (!ignore && validElements[tag] === true) {\n\t out('<');\n\t out(tag);\n\t angular.forEach(attrs, function(value, key) {\n\t var lkey=angular.lowercase(key);\n\t var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background');\n\t if (validAttrs[lkey] === true &&\n\t (uriAttrs[lkey] !== true || uriValidator(value, isImage))) {\n\t out(' ');\n\t out(key);\n\t out('=\"');\n\t out(encodeEntities(value));\n\t out('\"');\n\t }\n\t });\n\t out(unary ? '/>' : '>');\n\t }\n\t },\n\t end: function(tag) {\n\t tag = angular.lowercase(tag);\n\t if (!ignore && validElements[tag] === true) {\n\t out('</');\n\t out(tag);\n\t out('>');\n\t }\n\t if (tag == ignore) {\n\t ignore = false;\n\t }\n\t },\n\t chars: function(chars) {\n\t if (!ignore) {\n\t out(encodeEntities(chars));\n\t }\n\t }\n\t };\n\t}\n\t\n\t\n\t// define ngSanitize module and register $sanitize service\n\tangular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider);\n\t\n\t/* global sanitizeText: false */\n\t\n\t/**\n\t * @ngdoc filter\n\t * @name linky\n\t * @kind function\n\t *\n\t * @description\n\t * Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and\n\t * plain email address links.\n\t *\n\t * Requires the {@link ngSanitize `ngSanitize`} module to be installed.\n\t *\n\t * @param {string} text Input text.\n\t * @param {string} target Window (_blank|_self|_parent|_top) or named frame to open links in.\n\t * @returns {string} Html-linkified text.\n\t *\n\t * @usage\n\t <span ng-bind-html=\"linky_expression | linky\"></span>\n\t *\n\t * @example\n\t <example module=\"linkyExample\" deps=\"angular-sanitize.js\">\n\t <file name=\"index.html\">\n\t <script>\n\t angular.module('linkyExample', ['ngSanitize'])\n\t .controller('ExampleController', ['$scope', function($scope) {\n\t $scope.snippet =\n\t 'Pretty text with some links:\\n'+\n\t 'http://angularjs.org/,\\n'+\n\t 'mailto:us@somewhere.org,\\n'+\n\t 'another@somewhere.org,\\n'+\n\t 'and one more: ftp://127.0.0.1/.';\n\t $scope.snippetWithTarget = 'http://angularjs.org/';\n\t }]);\n\t </script>\n\t <div ng-controller=\"ExampleController\">\n\t Snippet: <textarea ng-model=\"snippet\" cols=\"60\" rows=\"3\"></textarea>\n\t <table>\n\t <tr>\n\t <td>Filter</td>\n\t <td>Source</td>\n\t <td>Rendered</td>\n\t </tr>\n\t <tr id=\"linky-filter\">\n\t <td>linky filter</td>\n\t <td>\n\t <pre>&lt;div ng-bind-html=\"snippet | linky\"&gt;<br>&lt;/div&gt;</pre>\n\t </td>\n\t <td>\n\t <div ng-bind-html=\"snippet | linky\"></div>\n\t </td>\n\t </tr>\n\t <tr id=\"linky-target\">\n\t <td>linky target</td>\n\t <td>\n\t <pre>&lt;div ng-bind-html=\"snippetWithTarget | linky:'_blank'\"&gt;<br>&lt;/div&gt;</pre>\n\t </td>\n\t <td>\n\t <div ng-bind-html=\"snippetWithTarget | linky:'_blank'\"></div>\n\t </td>\n\t </tr>\n\t <tr id=\"escaped-html\">\n\t <td>no filter</td>\n\t <td><pre>&lt;div ng-bind=\"snippet\"&gt;<br>&lt;/div&gt;</pre></td>\n\t <td><div ng-bind=\"snippet\"></div></td>\n\t </tr>\n\t </table>\n\t </file>\n\t <file name=\"protractor.js\" type=\"protractor\">\n\t it('should linkify the snippet with urls', function() {\n\t expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).\n\t toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' +\n\t 'another@somewhere.org, and one more: ftp://127.0.0.1/.');\n\t expect(element.all(by.css('#linky-filter a')).count()).toEqual(4);\n\t });\n\t\n\t it('should not linkify snippet without the linky filter', function() {\n\t expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()).\n\t toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' +\n\t 'another@somewhere.org, and one more: ftp://127.0.0.1/.');\n\t expect(element.all(by.css('#escaped-html a')).count()).toEqual(0);\n\t });\n\t\n\t it('should update', function() {\n\t element(by.model('snippet')).clear();\n\t element(by.model('snippet')).sendKeys('new http://link.');\n\t expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).\n\t toBe('new http://link.');\n\t expect(element.all(by.css('#linky-filter a')).count()).toEqual(1);\n\t expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText())\n\t .toBe('new http://link.');\n\t });\n\t\n\t it('should work with the target property', function() {\n\t expect(element(by.id('linky-target')).\n\t element(by.binding(\"snippetWithTarget | linky:'_blank'\")).getText()).\n\t toBe('http://angularjs.org/');\n\t expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank');\n\t });\n\t </file>\n\t </example>\n\t */\n\tangular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) {\n\t var LINKY_URL_REGEXP =\n\t /((ftp|https?):\\/\\/|(www\\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\\S*[^\\s.;,(){}<>\"\\u201d\\u2019]/i,\n\t MAILTO_REGEXP = /^mailto:/i;\n\t\n\t return function(text, target) {\n\t if (!text) return text;\n\t var match;\n\t var raw = text;\n\t var html = [];\n\t var url;\n\t var i;\n\t while ((match = raw.match(LINKY_URL_REGEXP))) {\n\t // We can not end in these as they are sometimes found at the end of the sentence\n\t url = match[0];\n\t // if we did not match ftp/http/www/mailto then assume mailto\n\t if (!match[2] && !match[4]) {\n\t url = (match[3] ? 'http://' : 'mailto:') + url;\n\t }\n\t i = match.index;\n\t addText(raw.substr(0, i));\n\t addLink(url, match[0].replace(MAILTO_REGEXP, ''));\n\t raw = raw.substring(i + match[0].length);\n\t }\n\t addText(raw);\n\t return $sanitize(html.join(''));\n\t\n\t function addText(text) {\n\t if (!text) {\n\t return;\n\t }\n\t html.push(sanitizeText(text));\n\t }\n\t\n\t function addLink(url, text) {\n\t html.push('<a ');\n\t if (angular.isDefined(target)) {\n\t html.push('target=\"',\n\t target,\n\t '\" ');\n\t }\n\t html.push('href=\"',\n\t url.replace(/\"/g, '&quot;'),\n\t '\">');\n\t addText(text);\n\t html.push('</a>');\n\t }\n\t };\n\t}]);\n\t\n\t\n\t})(window, window.angular);\n\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(9);\n\tmodule.exports = 'ngTouch';\n\n\n/***/ },\n/* 9 */\n/***/ function(module, exports) {\n\n\t/**\n\t * @license AngularJS v1.4.14\n\t * (c) 2010-2015 Google, Inc. http://angularjs.org\n\t * License: MIT\n\t */\n\t(function(window, angular, undefined) {'use strict';\n\t\n\t/**\n\t * @ngdoc module\n\t * @name ngTouch\n\t * @description\n\t *\n\t * # ngTouch\n\t *\n\t * The `ngTouch` module provides touch events and other helpers for touch-enabled devices.\n\t * The implementation is based on jQuery Mobile touch event handling\n\t * ([jquerymobile.com](http://jquerymobile.com/)).\n\t *\n\t *\n\t * See {@link ngTouch.$swipe `$swipe`} for usage.\n\t *\n\t * <div doc-module-components=\"ngTouch\"></div>\n\t *\n\t */\n\t\n\t// define ngTouch module\n\t/* global -ngTouch */\n\tvar ngTouch = angular.module('ngTouch', []);\n\t\n\tfunction nodeName_(element) {\n\t return angular.lowercase(element.nodeName || (element[0] && element[0].nodeName));\n\t}\n\t\n\t/* global ngTouch: false */\n\t\n\t /**\n\t * @ngdoc service\n\t * @name $swipe\n\t *\n\t * @description\n\t * The `$swipe` service is a service that abstracts the messier details of hold-and-drag swipe\n\t * behavior, to make implementing swipe-related directives more convenient.\n\t *\n\t * Requires the {@link ngTouch `ngTouch`} module to be installed.\n\t *\n\t * `$swipe` is used by the `ngSwipeLeft` and `ngSwipeRight` directives in `ngTouch`.\n\t *\n\t * # Usage\n\t * The `$swipe` service is an object with a single method: `bind`. `bind` takes an element\n\t * which is to be watched for swipes, and an object with four handler functions. See the\n\t * documentation for `bind` below.\n\t */\n\t\n\tngTouch.factory('$swipe', [function() {\n\t // The total distance in any direction before we make the call on swipe vs. scroll.\n\t var MOVE_BUFFER_RADIUS = 10;\n\t\n\t var POINTER_EVENTS = {\n\t 'mouse': {\n\t start: 'mousedown',\n\t move: 'mousemove',\n\t end: 'mouseup'\n\t },\n\t 'touch': {\n\t start: 'touchstart',\n\t move: 'touchmove',\n\t end: 'touchend',\n\t cancel: 'touchcancel'\n\t }\n\t };\n\t\n\t function getCoordinates(event) {\n\t var originalEvent = event.originalEvent || event;\n\t var touches = originalEvent.touches && originalEvent.touches.length ? originalEvent.touches : [originalEvent];\n\t var e = (originalEvent.changedTouches && originalEvent.changedTouches[0]) || touches[0];\n\t\n\t return {\n\t x: e.clientX,\n\t y: e.clientY\n\t };\n\t }\n\t\n\t function getEvents(pointerTypes, eventType) {\n\t var res = [];\n\t angular.forEach(pointerTypes, function(pointerType) {\n\t var eventName = POINTER_EVENTS[pointerType][eventType];\n\t if (eventName) {\n\t res.push(eventName);\n\t }\n\t });\n\t return res.join(' ');\n\t }\n\t\n\t return {\n\t /**\n\t * @ngdoc method\n\t * @name $swipe#bind\n\t *\n\t * @description\n\t * The main method of `$swipe`. It takes an element to be watched for swipe motions, and an\n\t * object containing event handlers.\n\t * The pointer types that should be used can be specified via the optional\n\t * third argument, which is an array of strings `'mouse'` and `'touch'`. By default,\n\t * `$swipe` will listen for `mouse` and `touch` events.\n\t *\n\t * The four events are `start`, `move`, `end`, and `cancel`. `start`, `move`, and `end`\n\t * receive as a parameter a coordinates object of the form `{ x: 150, y: 310 }` and the raw\n\t * `event`. `cancel` receives the raw `event` as its single parameter.\n\t *\n\t * `start` is called on either `mousedown` or `touchstart`. After this event, `$swipe` is\n\t * watching for `touchmove` or `mousemove` events. These events are ignored until the total\n\t * distance moved in either dimension exceeds a small threshold.\n\t *\n\t * Once this threshold is exceeded, either the horizontal or vertical delta is greater.\n\t * - If the horizontal distance is greater, this is a swipe and `move` and `end` events follow.\n\t * - If the vertical distance is greater, this is a scroll, and we let the browser take over.\n\t * A `cancel` event is sent.\n\t *\n\t * `move` is called on `mousemove` and `touchmove` after the above logic has determined that\n\t * a swipe is in progress.\n\t *\n\t * `end` is called when a swipe is successfully completed with a `touchend` or `mouseup`.\n\t *\n\t * `cancel` is called either on a `touchcancel` from the browser, or when we begin scrolling\n\t * as described above.\n\t *\n\t */\n\t bind: function(element, eventHandlers, pointerTypes) {\n\t // Absolute total movement, used to control swipe vs. scroll.\n\t var totalX, totalY;\n\t // Coordinates of the start position.\n\t var startCoords;\n\t // Last event's position.\n\t var lastPos;\n\t // Whether a swipe is active.\n\t var active = false;\n\t\n\t pointerTypes = pointerTypes || ['mouse', 'touch'];\n\t element.on(getEvents(pointerTypes, 'start'), function(event) {\n\t startCoords = getCoordinates(event);\n\t active = true;\n\t totalX = 0;\n\t totalY = 0;\n\t lastPos = startCoords;\n\t eventHandlers['start'] && eventHandlers['start'](startCoords, event);\n\t });\n\t var events = getEvents(pointerTypes, 'cancel');\n\t if (events) {\n\t element.on(events, function(event) {\n\t active = false;\n\t eventHandlers['cancel'] && eventHandlers['cancel'](event);\n\t });\n\t }\n\t\n\t element.on(getEvents(pointerTypes, 'move'), function(event) {\n\t if (!active) return;\n\t\n\t // Android will send a touchcancel if it thinks we're starting to scroll.\n\t // So when the total distance (+ or - or both) exceeds 10px in either direction,\n\t // we either:\n\t // - On totalX > totalY, we send preventDefault() and treat this as a swipe.\n\t // - On totalY > totalX, we let the browser handle it as a scroll.\n\t\n\t if (!startCoords) return;\n\t var coords = getCoordinates(event);\n\t\n\t totalX += Math.abs(coords.x - lastPos.x);\n\t totalY += Math.abs(coords.y - lastPos.y);\n\t\n\t lastPos = coords;\n\t\n\t if (totalX < MOVE_BUFFER_RADIUS && totalY < MOVE_BUFFER_RADIUS) {\n\t return;\n\t }\n\t\n\t // One of totalX or totalY has exceeded the buffer, so decide on swipe vs. scroll.\n\t if (totalY > totalX) {\n\t // Allow native scrolling to take over.\n\t active = false;\n\t eventHandlers['cancel'] && eventHandlers['cancel'](event);\n\t return;\n\t } else {\n\t // Prevent the browser from scrolling.\n\t event.preventDefault();\n\t eventHandlers['move'] && eventHandlers['move'](coords, event);\n\t }\n\t });\n\t\n\t element.on(getEvents(pointerTypes, 'end'), function(event) {\n\t if (!active) return;\n\t active = false;\n\t eventHandlers['end'] && eventHandlers['end'](getCoordinates(event), event);\n\t });\n\t }\n\t };\n\t}]);\n\t\n\t/* global ngTouch: false,\n\t nodeName_: false\n\t*/\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngClick\n\t *\n\t * @description\n\t * A more powerful replacement for the default ngClick designed to be used on touchscreen\n\t * devices. Most mobile browsers wait about 300ms after a tap-and-release before sending\n\t * the click event. This version handles them immediately, and then prevents the\n\t * following click event from propagating.\n\t *\n\t * Requires the {@link ngTouch `ngTouch`} module to be installed.\n\t *\n\t * This directive can fall back to using an ordinary click event, and so works on desktop\n\t * browsers as well as mobile.\n\t *\n\t * This directive also sets the CSS class `ng-click-active` while the element is being held\n\t * down (by a mouse click or touch) so you can restyle the depressed element if you wish.\n\t *\n\t * @element ANY\n\t * @param {expression} ngClick {@link guide/expression Expression} to evaluate\n\t * upon tap. (Event object is available as `$event`)\n\t *\n\t * @example\n\t <example module=\"ngClickExample\" deps=\"angular-touch.js\">\n\t <file name=\"index.html\">\n\t <button ng-click=\"count = count + 1\" ng-init=\"count=0\">\n\t Increment\n\t </button>\n\t count: {{ count }}\n\t </file>\n\t <file name=\"script.js\">\n\t angular.module('ngClickExample', ['ngTouch']);\n\t </file>\n\t </example>\n\t */\n\t\n\tngTouch.config(['$provide', function($provide) {\n\t $provide.decorator('ngClickDirective', ['$delegate', function($delegate) {\n\t // drop the default ngClick directive\n\t $delegate.shift();\n\t return $delegate;\n\t }]);\n\t}]);\n\t\n\tngTouch.directive('ngClick', ['$parse', '$timeout', '$rootElement',\n\t function($parse, $timeout, $rootElement) {\n\t var TAP_DURATION = 750; // Shorter than 750ms is a tap, longer is a taphold or drag.\n\t var MOVE_TOLERANCE = 12; // 12px seems to work in most mobile browsers.\n\t var PREVENT_DURATION = 2500; // 2.5 seconds maximum from preventGhostClick call to click\n\t var CLICKBUSTER_THRESHOLD = 25; // 25 pixels in any dimension is the limit for busting clicks.\n\t\n\t var ACTIVE_CLASS_NAME = 'ng-click-active';\n\t var lastPreventedTime;\n\t var touchCoordinates;\n\t var lastLabelClickCoordinates;\n\t\n\t\n\t // TAP EVENTS AND GHOST CLICKS\n\t //\n\t // Why tap events?\n\t // Mobile browsers detect a tap, then wait a moment (usually ~300ms) to see if you're\n\t // double-tapping, and then fire a click event.\n\t //\n\t // This delay sucks and makes mobile apps feel unresponsive.\n\t // So we detect touchstart, touchcancel and touchend ourselves and determine when\n\t // the user has tapped on something.\n\t //\n\t // What happens when the browser then generates a click event?\n\t // The browser, of course, also detects the tap and fires a click after a delay. This results in\n\t // tapping/clicking twice. We do \"clickbusting\" to prevent it.\n\t //\n\t // How does it work?\n\t // We attach global touchstart and click handlers, that run during the capture (early) phase.\n\t // So the sequence for a tap is:\n\t // - global touchstart: Sets an \"allowable region\" at the point touched.\n\t // - element's touchstart: Starts a touch\n\t // (- touchcancel ends the touch, no click follows)\n\t // - element's touchend: Determines if the tap is valid (didn't move too far away, didn't hold\n\t // too long) and fires the user's tap handler. The touchend also calls preventGhostClick().\n\t // - preventGhostClick() removes the allowable region the global touchstart created.\n\t // - The browser generates a click event.\n\t // - The global click handler catches the click, and checks whether it was in an allowable region.\n\t // - If preventGhostClick was called, the region will have been removed, the click is busted.\n\t // - If the region is still there, the click proceeds normally. Therefore clicks on links and\n\t // other elements without ngTap on them work normally.\n\t //\n\t // This is an ugly, terrible hack!\n\t // Yeah, tell me about it. The alternatives are using the slow click events, or making our users\n\t // deal with the ghost clicks, so I consider this the least of evils. Fortunately Angular\n\t // encapsulates this ugly logic away from the user.\n\t //\n\t // Why not just put click handlers on the element?\n\t // We do that too, just to be sure. If the tap event caused the DOM to change,\n\t // it is possible another element is now in that position. To take account for these possibly\n\t // distinct elements, the handlers are global and care only about coordinates.\n\t\n\t // Checks if the coordinates are close enough to be within the region.\n\t function hit(x1, y1, x2, y2) {\n\t return Math.abs(x1 - x2) < CLICKBUSTER_THRESHOLD && Math.abs(y1 - y2) < CLICKBUSTER_THRESHOLD;\n\t }\n\t\n\t // Checks a list of allowable regions against a click location.\n\t // Returns true if the click should be allowed.\n\t // Splices out the allowable region from the list after it has been used.\n\t function checkAllowableRegions(touchCoordinates, x, y) {\n\t for (var i = 0; i < touchCoordinates.length; i += 2) {\n\t if (hit(touchCoordinates[i], touchCoordinates[i + 1], x, y)) {\n\t touchCoordinates.splice(i, i + 2);\n\t return true; // allowable region\n\t }\n\t }\n\t return false; // No allowable region; bust it.\n\t }\n\t\n\t // Global click handler that prevents the click if it's in a bustable zone and preventGhostClick\n\t // was called recently.\n\t function onClick(event) {\n\t if (Date.now() - lastPreventedTime > PREVENT_DURATION) {\n\t return; // Too old.\n\t }\n\t\n\t var touches = event.touches && event.touches.length ? event.touches : [event];\n\t var x = touches[0].clientX;\n\t var y = touches[0].clientY;\n\t // Work around desktop Webkit quirk where clicking a label will fire two clicks (on the label\n\t // and on the input element). Depending on the exact browser, this second click we don't want\n\t // to bust has either (0,0), negative coordinates, or coordinates equal to triggering label\n\t // click event\n\t if (x < 1 && y < 1) {\n\t return; // offscreen\n\t }\n\t if (lastLabelClickCoordinates &&\n\t lastLabelClickCoordinates[0] === x && lastLabelClickCoordinates[1] === y) {\n\t return; // input click triggered by label click\n\t }\n\t // reset label click coordinates on first subsequent click\n\t if (lastLabelClickCoordinates) {\n\t lastLabelClickCoordinates = null;\n\t }\n\t // remember label click coordinates to prevent click busting of trigger click event on input\n\t if (nodeName_(event.target) === 'label') {\n\t lastLabelClickCoordinates = [x, y];\n\t }\n\t\n\t // Look for an allowable region containing this click.\n\t // If we find one, that means it was created by touchstart and not removed by\n\t // preventGhostClick, so we don't bust it.\n\t if (checkAllowableRegions(touchCoordinates, x, y)) {\n\t return;\n\t }\n\t\n\t // If we didn't find an allowable region, bust the click.\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t // Blur focused form elements\n\t event.target && event.target.blur && event.target.blur();\n\t }\n\t\n\t\n\t // Global touchstart handler that creates an allowable region for a click event.\n\t // This allowable region can be removed by preventGhostClick if we want to bust it.\n\t function onTouchStart(event) {\n\t var touches = event.touches && event.touches.length ? event.touches : [event];\n\t var x = touches[0].clientX;\n\t var y = touches[0].clientY;\n\t touchCoordinates.push(x, y);\n\t\n\t $timeout(function() {\n\t // Remove the allowable region.\n\t for (var i = 0; i < touchCoordinates.length; i += 2) {\n\t if (touchCoordinates[i] == x && touchCoordinates[i + 1] == y) {\n\t touchCoordinates.splice(i, i + 2);\n\t return;\n\t }\n\t }\n\t }, PREVENT_DURATION, false);\n\t }\n\t\n\t // On the first call, attaches some event handlers. Then whenever it gets called, it creates a\n\t // zone around the touchstart where clicks will get busted.\n\t function preventGhostClick(x, y) {\n\t if (!touchCoordinates) {\n\t $rootElement[0].addEventListener('click', onClick, true);\n\t $rootElement[0].addEventListener('touchstart', onTouchStart, true);\n\t touchCoordinates = [];\n\t }\n\t\n\t lastPreventedTime = Date.now();\n\t\n\t checkAllowableRegions(touchCoordinates, x, y);\n\t }\n\t\n\t // Actual linking function.\n\t return function(scope, element, attr) {\n\t var clickHandler = $parse(attr.ngClick),\n\t tapping = false,\n\t tapElement, // Used to blur the element after a tap.\n\t startTime, // Used to check if the tap was held too long.\n\t touchStartX,\n\t touchStartY;\n\t\n\t function resetState() {\n\t tapping = false;\n\t element.removeClass(ACTIVE_CLASS_NAME);\n\t }\n\t\n\t element.on('touchstart', function(event) {\n\t tapping = true;\n\t tapElement = event.target ? event.target : event.srcElement; // IE uses srcElement.\n\t // Hack for Safari, which can target text nodes instead of containers.\n\t if (tapElement.nodeType == 3) {\n\t tapElement = tapElement.parentNode;\n\t }\n\t\n\t element.addClass(ACTIVE_CLASS_NAME);\n\t\n\t startTime = Date.now();\n\t\n\t // Use jQuery originalEvent\n\t var originalEvent = event.originalEvent || event;\n\t var touches = originalEvent.touches && originalEvent.touches.length ? originalEvent.touches : [originalEvent];\n\t var e = touches[0];\n\t touchStartX = e.clientX;\n\t touchStartY = e.clientY;\n\t });\n\t\n\t element.on('touchcancel', function(event) {\n\t resetState();\n\t });\n\t\n\t element.on('touchend', function(event) {\n\t var diff = Date.now() - startTime;\n\t\n\t // Use jQuery originalEvent\n\t var originalEvent = event.originalEvent || event;\n\t var touches = (originalEvent.changedTouches && originalEvent.changedTouches.length) ?\n\t originalEvent.changedTouches :\n\t ((originalEvent.touches && originalEvent.touches.length) ? originalEvent.touches : [originalEvent]);\n\t var e = touches[0];\n\t var x = e.clientX;\n\t var y = e.clientY;\n\t var dist = Math.sqrt(Math.pow(x - touchStartX, 2) + Math.pow(y - touchStartY, 2));\n\t\n\t if (tapping && diff < TAP_DURATION && dist < MOVE_TOLERANCE) {\n\t // Call preventGhostClick so the clickbuster will catch the corresponding click.\n\t preventGhostClick(x, y);\n\t\n\t // Blur the focused element (the button, probably) before firing the callback.\n\t // This doesn't work perfectly on Android Chrome, but seems to work elsewhere.\n\t // I couldn't get anything to work reliably on Android Chrome.\n\t if (tapElement) {\n\t tapElement.blur();\n\t }\n\t\n\t if (!angular.isDefined(attr.disabled) || attr.disabled === false) {\n\t element.triggerHandler('click', [event]);\n\t }\n\t }\n\t\n\t resetState();\n\t });\n\t\n\t // Hack for iOS Safari's benefit. It goes searching for onclick handlers and is liable to click\n\t // something else nearby.\n\t element.onclick = function(event) { };\n\t\n\t // Actual click handler.\n\t // There are three different kinds of clicks, only two of which reach this point.\n\t // - On desktop browsers without touch events, their clicks will always come here.\n\t // - On mobile browsers, the simulated \"fast\" click will call this.\n\t // - But the browser's follow-up slow click will be \"busted\" before it reaches this handler.\n\t // Therefore it's safe to use this directive on both mobile and desktop.\n\t element.on('click', function(event, touchend) {\n\t scope.$apply(function() {\n\t clickHandler(scope, {$event: (touchend || event)});\n\t });\n\t });\n\t\n\t element.on('mousedown', function(event) {\n\t element.addClass(ACTIVE_CLASS_NAME);\n\t });\n\t\n\t element.on('mousemove mouseup', function(event) {\n\t element.removeClass(ACTIVE_CLASS_NAME);\n\t });\n\t\n\t };\n\t}]);\n\t\n\t/* global ngTouch: false */\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngSwipeLeft\n\t *\n\t * @description\n\t * Specify custom behavior when an element is swiped to the left on a touchscreen device.\n\t * A leftward swipe is a quick, right-to-left slide of the finger.\n\t * Though ngSwipeLeft is designed for touch-based devices, it will work with a mouse click and drag\n\t * too.\n\t *\n\t * To disable the mouse click and drag functionality, add `ng-swipe-disable-mouse` to\n\t * the `ng-swipe-left` or `ng-swipe-right` DOM Element.\n\t *\n\t * Requires the {@link ngTouch `ngTouch`} module to be installed.\n\t *\n\t * @element ANY\n\t * @param {expression} ngSwipeLeft {@link guide/expression Expression} to evaluate\n\t * upon left swipe. (Event object is available as `$event`)\n\t *\n\t * @example\n\t <example module=\"ngSwipeLeftExample\" deps=\"angular-touch.js\">\n\t <file name=\"index.html\">\n\t <div ng-show=\"!showActions\" ng-swipe-left=\"showActions = true\">\n\t Some list content, like an email in the inbox\n\t </div>\n\t <div ng-show=\"showActions\" ng-swipe-right=\"showActions = false\">\n\t <button ng-click=\"reply()\">Reply</button>\n\t <button ng-click=\"delete()\">Delete</button>\n\t </div>\n\t </file>\n\t <file name=\"script.js\">\n\t angular.module('ngSwipeLeftExample', ['ngTouch']);\n\t </file>\n\t </example>\n\t */\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name ngSwipeRight\n\t *\n\t * @description\n\t * Specify custom behavior when an element is swiped to the right on a touchscreen device.\n\t * A rightward swipe is a quick, left-to-right slide of the finger.\n\t * Though ngSwipeRight is designed for touch-based devices, it will work with a mouse click and drag\n\t * too.\n\t *\n\t * Requires the {@link ngTouch `ngTouch`} module to be installed.\n\t *\n\t * @element ANY\n\t * @param {expression} ngSwipeRight {@link guide/expression Expression} to evaluate\n\t * upon right swipe. (Event object is available as `$event`)\n\t *\n\t * @example\n\t <example module=\"ngSwipeRightExample\" deps=\"angular-touch.js\">\n\t <file name=\"index.html\">\n\t <div ng-show=\"!showActions\" ng-swipe-left=\"showActions = true\">\n\t Some list content, like an email in the inbox\n\t </div>\n\t <div ng-show=\"showActions\" ng-swipe-right=\"showActions = false\">\n\t <button ng-click=\"reply()\">Reply</button>\n\t <button ng-click=\"delete()\">Delete</button>\n\t </div>\n\t </file>\n\t <file name=\"script.js\">\n\t angular.module('ngSwipeRightExample', ['ngTouch']);\n\t </file>\n\t </example>\n\t */\n\t\n\tfunction makeSwipeDirective(directiveName, direction, eventName) {\n\t ngTouch.directive(directiveName, ['$parse', '$swipe', function($parse, $swipe) {\n\t // The maximum vertical delta for a swipe should be less than 75px.\n\t var MAX_VERTICAL_DISTANCE = 75;\n\t // Vertical distance should not be more than a fraction of the horizontal distance.\n\t var MAX_VERTICAL_RATIO = 0.3;\n\t // At least a 30px lateral motion is necessary for a swipe.\n\t var MIN_HORIZONTAL_DISTANCE = 30;\n\t\n\t return function(scope, element, attr) {\n\t var swipeHandler = $parse(attr[directiveName]);\n\t\n\t var startCoords, valid;\n\t\n\t function validSwipe(coords) {\n\t // Check that it's within the coordinates.\n\t // Absolute vertical distance must be within tolerances.\n\t // Horizontal distance, we take the current X - the starting X.\n\t // This is negative for leftward swipes and positive for rightward swipes.\n\t // After multiplying by the direction (-1 for left, +1 for right), legal swipes\n\t // (ie. same direction as the directive wants) will have a positive delta and\n\t // illegal ones a negative delta.\n\t // Therefore this delta must be positive, and larger than the minimum.\n\t if (!startCoords) return false;\n\t var deltaY = Math.abs(coords.y - startCoords.y);\n\t var deltaX = (coords.x - startCoords.x) * direction;\n\t return valid && // Short circuit for already-invalidated swipes.\n\t deltaY < MAX_VERTICAL_DISTANCE &&\n\t deltaX > 0 &&\n\t deltaX > MIN_HORIZONTAL_DISTANCE &&\n\t deltaY / deltaX < MAX_VERTICAL_RATIO;\n\t }\n\t\n\t var pointerTypes = ['touch'];\n\t if (!angular.isDefined(attr['ngSwipeDisableMouse'])) {\n\t pointerTypes.push('mouse');\n\t }\n\t $swipe.bind(element, {\n\t 'start': function(coords, event) {\n\t startCoords = coords;\n\t valid = true;\n\t },\n\t 'cancel': function(event) {\n\t valid = false;\n\t },\n\t 'end': function(coords, event) {\n\t if (validSwipe(coords)) {\n\t scope.$apply(function() {\n\t element.triggerHandler(eventName);\n\t swipeHandler(scope, {$event: event});\n\t });\n\t }\n\t }\n\t }, pointerTypes);\n\t };\n\t }]);\n\t}\n\t\n\t// Left is negative X-coordinate, right is positive.\n\tmakeSwipeDirective('ngSwipeLeft', -1, 'swipeleft');\n\tmakeSwipeDirective('ngSwipeRight', 1, 'swiperight');\n\t\n\t\n\t\n\t})(window, window.angular);\n\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar angular = __webpack_require__(11);\n\t\n\tangular\n\t .module(\"bsDisconnect\", [])\n\t .directive(\"disconnectElem\", function () {\n\t return {\n\t restrict: \"E\",\n\t scope: {},\n\t template: '<section bs-overlay ng-class=\"{\\'active\\': ui.visible}\">\\n <p><icon icon=\"block\"></icon></p>\\n <h1>{{ui.heading}} {{ui.message}}</h1>\\n <p>Possible reasons are:</p>\\n <ul bs-list>\\n <li>1. Your process was exited by another tool</li>\\n </ul>\\n <p>You should check your terminal window to see what happened. <br/>(Or simply try reloading this page.)</p>\\n</section>', // jshint:ignore\n\t controller: [\"$scope\", \"$rootScope\", \"$window\", disconnectController]\n\t };\n\t });\n\t\n\t/**\n\t * Disconnect\n\t * @param $scope\n\t * @param $rootScope\n\t * @param $window\n\t */\n\tfunction disconnectController($scope, $rootScope, $window) {\n\t\n\t /**\n\t * Default settings\n\t */\n\t const DEFAULT_HEADING = \"Browsersync\";\n\t const DEFAULT_MESSAGE = \"Disconnected\";\n\t\n\t $scope._disconnected = false;\n\t\n\t /**\n\t * Default state\n\t * @type {{visible: boolean, status: string, heading: string, text: string}}\n\t */\n\t $scope.ui = {\n\t visible: false,\n\t heading: DEFAULT_HEADING,\n\t message: DEFAULT_MESSAGE\n\t };\n\t\n\t /**\n\t * @type {{connection: Function, disconnect: Function}}\n\t */\n\t $scope.socketEvents = {\n\t connection: function () {\n\t if ($scope._disconnected) {\n\t $window.location.reload(true);\n\t }\n\t $scope.ui.visible = false;\n\t $scope.$digest();\n\t },\n\t disconnect: function () {\n\t $scope._disconnected = true;\n\t $scope.ui.visible = true;\n\t $scope.$digest();\n\t }\n\t };\n\t\n\t $rootScope.$on(\"ui:connection\", $scope.socketEvents.connection);\n\t $rootScope.$on(\"ui:disconnect\", $scope.socketEvents.disconnect);\n\t}\n\t\n\t\n\n\n/***/ },\n/* 11 */\n/***/ function(module, exports) {\n\n\t/**\n\t * @type {angular}\n\t */\n\tmodule.exports = window.angular;\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar angular = __webpack_require__(11);\n\t\n\tangular\n\t .module('bsNotify', [])\n\t .directive(\"notifyElem\", function () {\n\t return {\n\t restrict: \"E\",\n\t scope: {},\n\t template: \"<div bs-notify ng-class=\\\"{\\'active\\': ui.visible}\\\">\\n <p class=\\\"notification__text\\\">{{ui.heading}} <span class=\\\"color--lime\\\">{{ui.message}}</span></p>\\n</div>\",\n\t controller: [\"$scope\", \"$rootScope\", notifyController]\n\t };\n\t });\n\t\n\t/**\n\t * Notify\n\t * @param $scope\n\t * @param $rootScope\n\t */\n\tfunction notifyController($scope, $rootScope) {\n\t\n\t /**\n\t * Default settings\n\t */\n\t var DEFAULT_STATUS = \"info\";\n\t var DEFAULT_HEADING = \"Browsersync:\";\n\t var DEFAULT_MESSAGE = \"Welcome to Browsersync\";\n\t var DEFAULT_TIMEOUT = 2000;\n\t\n\t /**\n\t * Default state\n\t * @type {{visible: boolean, status: string, heading: string, text: string}}\n\t */\n\t $scope.ui = {\n\t status: DEFAULT_STATUS,\n\t heading: DEFAULT_HEADING,\n\t message: DEFAULT_MESSAGE\n\t };\n\t\n\t /**\n\t * @param evt\n\t * @param data\n\t */\n\t $scope.show = function (evt, data) {\n\t\n\t data = data || {};\n\t\n\t /**\n\t *\n\t * Clear any previous timers\n\t *\n\t */\n\t if ($scope._timer) {\n\t clearTimeout($scope._timer);\n\t }\n\t\n\t /**\n\t *\n\t * Set a reset timer\n\t *\n\t */\n\t $scope._timer = window.setTimeout($scope.reset, data.timeout || DEFAULT_TIMEOUT);\n\t\n\t /**\n\t *\n\t * Set UI flags\n\t *\n\t */\n\t $scope.ui.visible = true;\n\t $scope.ui.status = data.status || DEFAULT_STATUS;\n\t $scope.ui.heading = data.heading || DEFAULT_HEADING;\n\t $scope.ui.message = data.message || DEFAULT_HEADING;\n\t };\n\t\n\t /**\n\t * Reset the UI\n\t */\n\t $scope.reset = function () {\n\t $scope.ui.visible = false;\n\t $scope.$digest();\n\t };\n\t\n\t /**\n\t * Listen to events on the $rootScope\n\t */\n\t $rootScope.$on(\"notify:flash\", $scope.show);\n\t}\n\n\n/***/ },\n/* 13 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar angular = __webpack_require__(11);\n\t\n\tangular\n\t .module(\"bsHistory\", [\"bsSocket\"])\n\t .service(\"History\", [\"Socket\", HistoryService]);\n\t\n\tfunction HistoryService(Socket) {\n\t\n\t var visited = [];\n\t var updateStack = [];\n\t\n\t /**\n\t * Add a single socket event and call all callbacks listening to it.\n\t */\n\t Socket.on(\"ui:history:update\", function (items) {\n\t updateStack.forEach(function (fn) {\n\t fn(items);\n\t });\n\t });\n\t\n\t return {\n\t visited: visited,\n\t updateHistory: function (urls) {\n\t visited = urls;\n\t },\n\t get: function () {\n\t return Socket.getData(\"visited\");\n\t },\n\t remove: function (data) {\n\t Socket.emit(\"ui\", {\n\t namespace: \"history\",\n\t event: \"remove\",\n\t data: data\n\t });\n\t },\n\t clear: function () {\n\t Socket.emit(\"ui\", {\n\t namespace: \"history\",\n\t event: \"clear\"\n\t });\n\t },\n\t on: function (event, fn) {\n\t updateStack.push(fn);\n\t },\n\t off: function (fn) {\n\t var index = updateStack.indexOf(fn);\n\t if (index > -1) {\n\t updateStack = updateStack.splice(index, 1);\n\t }\n\t }\n\t };\n\t}\n\n\n/***/ },\n/* 14 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar angular = __webpack_require__(11);\n\t\n\tangular\n\t .module(\"bsClients\", [\"bsSocket\"])\n\t .service(\"Clients\", [\"Socket\", ClientsService]);\n\t\n\t/**\n\t * @param Socket\n\t * @returns {{reloadAll: Function, sendAllTo: Function, scrollAllTo: Function, highlight: Function}}\n\t * @constructor\n\t */\n\tfunction ClientsService(Socket) {\n\t\n\t var api = {\n\t reloadAll: function () {\n\t Socket.clientEvent(\"browser:reload\");\n\t },\n\t sendAllTo: function (path) {\n\t Socket.emit(\"ui\", {\n\t namespace: \"history\",\n\t event: \"sendAllTo\",\n\t data: {\n\t path: path\n\t }\n\t });\n\t },\n\t scrollAllTo: function () {\n\t Socket.clientEvent(\"scroll\", {\n\t position: {\n\t raw: 0,\n\t proportional: 0\n\t },\n\t override: true\n\t });\n\t },\n\t highlight: function (connection) {\n\t Socket.emit(\"ui:highlight\", connection);\n\t }\n\t };\n\t\n\t return api;\n\t}\n\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar angular = __webpack_require__(11);\n\tvar socket = __webpack_require__(16);\n\tvar socketConfig = window.___browserSync___.socketConfig;\n\tvar socketUrl = window.___browserSync___.socketUrl;\n\tvar io = socket(socketUrl, socketConfig);\n\t\n\tangular\n\t .module(\"bsSocket\", [])\n\t .service(\"Socket\", [\"$q\", \"$rootScope\", SocketService]);\n\t\n\tfunction SocketService($q, $rootScope) {\n\t\n\t var deferred = $q.defer();\n\t var session;\n\t\n\t io.on(\"connection\", function (out) {\n\t session = out.session;\n\t $rootScope.$emit(\"ui:connection\", out);\n\t\n\t deferred.resolve(out, this);\n\t\n\t if (window.name === '') {\n\t window.name = JSON.stringify({id: socket.id});\n\t } else {\n\t var prev = JSON.parse(window.name);\n\t //console.log(prev, socket);\n\t if (prev.id !== socket.id) {\n\t //console.log('new session');\n\t } else {\n\t //console.log('page reload');\n\t }\n\t //console.log(JSON.parse(window.name));\n\t }\n\t });\n\t\n\t io.on(\"disconnect\", function () {\n\t $rootScope.$emit(\"ui:disconnect\");\n\t });\n\t\n\t var publicApi = {\n\t on: function (name, callback) {\n\t io.on(name, callback);\n\t },\n\t off: function (name, callback) {\n\t io.off(name, callback);\n\t },\n\t removeEvent: function (name, callback) {\n\t io.removeListener(name, callback);\n\t },\n\t emit: function (name, data) {\n\t io.emit(name, data || {});\n\t },\n\t /**\n\t * Proxy client events\n\t * @param name\n\t * @param data\n\t */\n\t clientEvent: function (name, data) {\n\t io.emit(\"ui:client:proxy\", {\n\t event: name,\n\t data: data\n\t });\n\t },\n\t options: function () {\n\t return deferred.promise;\n\t },\n\t getData: function (name) {\n\t var deferred = $q.defer();\n\t io.on(\"ui:receive:\" + name, function (data) {\n\t deferred.resolve(data);\n\t });\n\t io.emit(\"ui:get:\" + name);\n\t return deferred.promise;\n\t },\n\t uiEvent: function (evt) {\n\t io.emit(\"ui\", evt);\n\t },\n\t newSession: function () {\n\t\n\t }\n\t };\n\t\n\t Object.defineProperty(publicApi, 'sessionId', {\n\t get: function () {\n\t return session\n\t }\n\t });\n\t\n\t return publicApi;\n\t}\n\n\n/***/ },\n/* 16 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\n\t/**\n\t * Module dependencies.\n\t */\n\t\n\tvar url = __webpack_require__(17);\n\tvar parser = __webpack_require__(23);\n\tvar Manager = __webpack_require__(30);\n\tvar debug = __webpack_require__(19)('socket.io-client');\n\t\n\t/**\n\t * Module exports.\n\t */\n\t\n\tmodule.exports = exports = lookup;\n\t\n\t/**\n\t * Managers cache.\n\t */\n\t\n\tvar cache = exports.managers = {};\n\t\n\t/**\n\t * Looks up an existing `Manager` for multiplexing.\n\t * If the user summons:\n\t *\n\t * `io('http://localhost/a');`\n\t * `io('http://localhost/b');`\n\t *\n\t * We reuse the existing instance based on same scheme/port/host,\n\t * and we initialize sockets for each namespace.\n\t *\n\t * @api public\n\t */\n\t\n\tfunction lookup (uri, opts) {\n\t if (typeof uri === 'object') {\n\t opts = uri;\n\t uri = undefined;\n\t }\n\t\n\t opts = opts || {};\n\t\n\t var parsed = url(uri);\n\t var source = parsed.source;\n\t var id = parsed.id;\n\t var path = parsed.path;\n\t var sameNamespace = cache[id] && path in cache[id].nsps;\n\t var newConnection = opts.forceNew || opts['force new connection'] ||\n\t false === opts.multiplex || sameNamespace;\n\t\n\t var io;\n\t\n\t if (newConnection) {\n\t debug('ignoring socket cache for %s', source);\n\t io = Manager(source, opts);\n\t } else {\n\t if (!cache[id]) {\n\t debug('new io instance for %s', source);\n\t cache[id] = Manager(source, opts);\n\t }\n\t io = cache[id];\n\t }\n\t if (parsed.query && !opts.query) {\n\t opts.query = parsed.query;\n\t }\n\t return io.socket(parsed.path, opts);\n\t}\n\t\n\t/**\n\t * Protocol version.\n\t *\n\t * @api public\n\t */\n\t\n\texports.protocol = parser.protocol;\n\t\n\t/**\n\t * `connect`.\n\t *\n\t * @param {String} uri\n\t * @api public\n\t */\n\t\n\texports.connect = lookup;\n\t\n\t/**\n\t * Expose constructors for standalone build.\n\t *\n\t * @api public\n\t */\n\t\n\texports.Manager = __webpack_require__(30);\n\texports.Socket = __webpack_require__(58);\n\n\n/***/ },\n/* 17 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\n\t/**\n\t * Module dependencies.\n\t */\n\t\n\tvar parseuri = __webpack_require__(18);\n\tvar debug = __webpack_require__(19)('socket.io-client:url');\n\t\n\t/**\n\t * Module exports.\n\t */\n\t\n\tmodule.exports = url;\n\t\n\t/**\n\t * URL parser.\n\t *\n\t * @param {String} url\n\t * @param {Object} An object meant to mimic window.location.\n\t * Defaults to window.location.\n\t * @api public\n\t */\n\t\n\tfunction url (uri, loc) {\n\t var obj = uri;\n\t\n\t // default to window.location\n\t loc = loc || global.location;\n\t if (null == uri) uri = loc.protocol + '//' + loc.host;\n\t\n\t // relative path support\n\t if ('string' === typeof uri) {\n\t if ('/' === uri.charAt(0)) {\n\t if ('/' === uri.charAt(1)) {\n\t uri = loc.protocol + uri;\n\t } else {\n\t uri = loc.host + uri;\n\t }\n\t }\n\t\n\t if (!/^(https?|wss?):\\/\\//.test(uri)) {\n\t debug('protocol-less url %s', uri);\n\t if ('undefined' !== typeof loc) {\n\t uri = loc.protocol + '//' + uri;\n\t } else {\n\t uri = 'https://' + uri;\n\t }\n\t }\n\t\n\t // parse\n\t debug('parse %s', uri);\n\t obj = parseuri(uri);\n\t }\n\t\n\t // make sure we treat `localhost:80` and `localhost` equally\n\t if (!obj.port) {\n\t if (/^(http|ws)$/.test(obj.protocol)) {\n\t obj.port = '80';\n\t } else if (/^(http|ws)s$/.test(obj.protocol)) {\n\t obj.port = '443';\n\t }\n\t }\n\t\n\t obj.path = obj.path || '/';\n\t\n\t var ipv6 = obj.host.indexOf(':') !== -1;\n\t var host = ipv6 ? '[' + obj.host + ']' : obj.host;\n\t\n\t // define unique id\n\t obj.id = obj.protocol + '://' + host + ':' + obj.port;\n\t // define href\n\t obj.href = obj.protocol + '://' + host + (loc && loc.port === obj.port ? '' : (':' + obj.port));\n\t\n\t return obj;\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 18 */\n/***/ function(module, exports) {\n\n\t/**\r\n\t * Parses an URI\r\n\t *\r\n\t * @author Steven Levithan <stevenlevithan.com> (MIT license)\r\n\t * @api private\r\n\t */\r\n\t\r\n\tvar re = /^(?:(?![^:@]+:[^:@\\/]*@)(http|https|ws|wss):\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/;\r\n\t\r\n\tvar parts = [\r\n\t 'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'\r\n\t];\r\n\t\r\n\tmodule.exports = function parseuri(str) {\r\n\t var src = str,\r\n\t b = str.indexOf('['),\r\n\t e = str.indexOf(']');\r\n\t\r\n\t if (b != -1 && e != -1) {\r\n\t str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length);\r\n\t }\r\n\t\r\n\t var m = re.exec(str || ''),\r\n\t uri = {},\r\n\t i = 14;\r\n\t\r\n\t while (i--) {\r\n\t uri[parts[i]] = m[i] || '';\r\n\t }\r\n\t\r\n\t if (b != -1 && e != -1) {\r\n\t uri.source = src;\r\n\t uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':');\r\n\t uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':');\r\n\t uri.ipv6uri = true;\r\n\t }\r\n\t\r\n\t return uri;\r\n\t};\r\n\n\n/***/ },\n/* 19 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {/**\n\t * This is the web browser implementation of `debug()`.\n\t *\n\t * Expose `debug()` as the module.\n\t */\n\t\n\texports = module.exports = __webpack_require__(21);\n\texports.log = log;\n\texports.formatArgs = formatArgs;\n\texports.save = save;\n\texports.load = load;\n\texports.useColors = useColors;\n\texports.storage = 'undefined' != typeof chrome\n\t && 'undefined' != typeof chrome.storage\n\t ? chrome.storage.local\n\t : localstorage();\n\t\n\t/**\n\t * Colors.\n\t */\n\t\n\texports.colors = [\n\t 'lightseagreen',\n\t 'forestgreen',\n\t 'goldenrod',\n\t 'dodgerblue',\n\t 'darkorchid',\n\t 'crimson'\n\t];\n\t\n\t/**\n\t * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n\t * and the Firebug extension (any Firefox version) are known\n\t * to support \"%c\" CSS customizations.\n\t *\n\t * TODO: add a `localStorage` variable to explicitly enable/disable colors\n\t */\n\t\n\tfunction useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n\t return true;\n\t }\n\t\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t // double check webkit in userAgent just in case we are in a worker\n\t (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n\t}\n\t\n\t/**\n\t * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n\t */\n\t\n\texports.formatters.j = function(v) {\n\t try {\n\t return JSON.stringify(v);\n\t } catch (err) {\n\t return '[UnexpectedJSONParseError]: ' + err.message;\n\t }\n\t};\n\t\n\t\n\t/**\n\t * Colorize log arguments if enabled.\n\t *\n\t * @api public\n\t */\n\t\n\tfunction formatArgs(args) {\n\t var useColors = this.useColors;\n\t\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\t\n\t if (!useColors) return;\n\t\n\t var c = 'color: ' + this.color;\n\t args.splice(1, 0, c, 'color: inherit')\n\t\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-zA-Z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t\n\t args.splice(lastC, 0, c);\n\t}\n\t\n\t/**\n\t * Invokes `console.log()` when available.\n\t * No-op when `console.log` is not a \"function\".\n\t *\n\t * @api public\n\t */\n\t\n\tfunction log() {\n\t // this hackery is required for IE8/9, where\n\t // the `console.log` function doesn't have 'apply'\n\t return 'object' === typeof console\n\t && console.log\n\t && Function.prototype.apply.call(console.log, console, arguments);\n\t}\n\t\n\t/**\n\t * Save `namespaces`.\n\t *\n\t * @param {String} namespaces\n\t * @api private\n\t */\n\t\n\tfunction save(namespaces) {\n\t try {\n\t if (null == namespaces) {\n\t exports.storage.removeItem('debug');\n\t } else {\n\t exports.storage.debug = namespaces;\n\t }\n\t } catch(e) {}\n\t}\n\t\n\t/**\n\t * Load `namespaces`.\n\t *\n\t * @return {String} returns the previously persisted debug modes\n\t * @api private\n\t */\n\t\n\tfunction load() {\n\t var r;\n\t try {\n\t r = exports.storage.debug;\n\t } catch(e) {}\n\t\n\t // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\t if (!r && typeof process !== 'undefined' && 'env' in process) {\n\t r = process.env.DEBUG;\n\t }\n\t\n\t return r;\n\t}\n\t\n\t/**\n\t * Enable namespaces listed in `localStorage.debug` initially.\n\t */\n\t\n\texports.enable(load());\n\t\n\t/**\n\t * Localstorage attempts to return the localstorage.\n\t *\n\t * This is necessary because safari throws\n\t * when a user disables cookies/localstorage\n\t * and you attempt to access it.\n\t *\n\t * @return {LocalStorage}\n\t * @api private\n\t */\n\t\n\tfunction localstorage() {\n\t try {\n\t return window.localStorage;\n\t } catch (e) {}\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(20)))\n\n/***/ },\n/* 20 */\n/***/ function(module, exports) {\n\n\t// shim for using process in browser\n\tvar process = module.exports = {};\n\t\n\t// cached from whatever global is present so that test runners that stub it\n\t// don't break things. But we need to wrap it in a try catch in case it is\n\t// wrapped in strict mode code which doesn't define any globals. It's inside a\n\t// function because try/catches deoptimize in certain engines.\n\t\n\tvar cachedSetTimeout;\n\tvar cachedClearTimeout;\n\t\n\tfunction defaultSetTimout() {\n\t throw new Error('setTimeout has not been defined');\n\t}\n\tfunction defaultClearTimeout () {\n\t throw new Error('clearTimeout has not been defined');\n\t}\n\t(function () {\n\t try {\n\t if (typeof setTimeout === 'function') {\n\t cachedSetTimeout = setTimeout;\n\t } else {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t } catch (e) {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t try {\n\t if (typeof clearTimeout === 'function') {\n\t cachedClearTimeout = clearTimeout;\n\t } else {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t } catch (e) {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t} ())\n\tfunction runTimeout(fun) {\n\t if (cachedSetTimeout === setTimeout) {\n\t //normal enviroments in sane situations\n\t return setTimeout(fun, 0);\n\t }\n\t // if setTimeout wasn't available but was latter defined\n\t if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n\t cachedSetTimeout = setTimeout;\n\t return setTimeout(fun, 0);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedSetTimeout(fun, 0);\n\t } catch(e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedSetTimeout.call(null, fun, 0);\n\t } catch(e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n\t return cachedSetTimeout.call(this, fun, 0);\n\t }\n\t }\n\t\n\t\n\t}\n\tfunction runClearTimeout(marker) {\n\t if (cachedClearTimeout === clearTimeout) {\n\t //normal enviroments in sane situations\n\t return clearTimeout(marker);\n\t }\n\t // if clearTimeout wasn't available but was latter defined\n\t if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n\t cachedClearTimeout = clearTimeout;\n\t return clearTimeout(marker);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedClearTimeout(marker);\n\t } catch (e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedClearTimeout.call(null, marker);\n\t } catch (e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n\t // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n\t return cachedClearTimeout.call(this, marker);\n\t }\n\t }\n\t\n\t\n\t\n\t}\n\tvar queue = [];\n\tvar draining = false;\n\tvar currentQueue;\n\tvar queueIndex = -1;\n\t\n\tfunction cleanUpNextTick() {\n\t if (!draining || !currentQueue) {\n\t return;\n\t }\n\t draining = false;\n\t if (currentQueue.length) {\n\t queue = currentQueue.concat(queue);\n\t } else {\n\t queueIndex = -1;\n\t }\n\t if (queue.length) {\n\t drainQueue();\n\t }\n\t}\n\t\n\tfunction drainQueue() {\n\t if (draining) {\n\t return;\n\t }\n\t var timeout = runTimeout(cleanUpNextTick);\n\t draining = true;\n\t\n\t var len = queue.length;\n\t while(len) {\n\t currentQueue = queue;\n\t queue = [];\n\t while (++queueIndex < len) {\n\t if (currentQueue) {\n\t currentQueue[queueIndex].run();\n\t }\n\t }\n\t queueIndex = -1;\n\t len = queue.length;\n\t }\n\t currentQueue = null;\n\t draining = false;\n\t runClearTimeout(timeout);\n\t}\n\t\n\tprocess.nextTick = function (fun) {\n\t var args = new Array(arguments.length - 1);\n\t if (arguments.length > 1) {\n\t for (var i = 1; i < arguments.length; i++) {\n\t args[i - 1] = arguments[i];\n\t }\n\t }\n\t queue.push(new Item(fun, args));\n\t if (queue.length === 1 && !draining) {\n\t runTimeout(drainQueue);\n\t }\n\t};\n\t\n\t// v8 likes predictible objects\n\tfunction Item(fun, array) {\n\t this.fun = fun;\n\t this.array = array;\n\t}\n\tItem.prototype.run = function () {\n\t this.fun.apply(null, this.array);\n\t};\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\tprocess.version = ''; // empty string to avoid regexp issues\n\tprocess.versions = {};\n\t\n\tfunction noop() {}\n\t\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\t\n\tprocess.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t};\n\t\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t};\n\tprocess.umask = function() { return 0; };\n\n\n/***/ },\n/* 21 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\n\t/**\n\t * This is the common logic for both the Node.js and web browser\n\t * implementations of `debug()`.\n\t *\n\t * Expose `debug()` as the module.\n\t */\n\t\n\texports = module.exports = createDebug.debug = createDebug['default'] = createDebug;\n\texports.coerce = coerce;\n\texports.disable = disable;\n\texports.enable = enable;\n\texports.enabled = enabled;\n\texports.humanize = __webpack_require__(22);\n\t\n\t/**\n\t * The currently active debug mode names, and names to skip.\n\t */\n\t\n\texports.names = [];\n\texports.skips = [];\n\t\n\t/**\n\t * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t *\n\t * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t */\n\t\n\texports.formatters = {};\n\t\n\t/**\n\t * Previous log timestamp.\n\t */\n\t\n\tvar prevTime;\n\t\n\t/**\n\t * Select a color.\n\t * @param {String} namespace\n\t * @return {Number}\n\t * @api private\n\t */\n\t\n\tfunction selectColor(namespace) {\n\t var hash = 0, i;\n\t\n\t for (i in namespace) {\n\t hash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t hash |= 0; // Convert to 32bit integer\n\t }\n\t\n\t return exports.colors[Math.abs(hash) % exports.colors.length];\n\t}\n\t\n\t/**\n\t * Create a debugger with the given `namespace`.\n\t *\n\t * @param {String} namespace\n\t * @return {Function}\n\t * @api public\n\t */\n\t\n\tfunction createDebug(namespace) {\n\t\n\t function debug() {\n\t // disabled?\n\t if (!debug.enabled) return;\n\t\n\t var self = debug;\n\t\n\t // set `diff` timestamp\n\t var curr = +new Date();\n\t var ms = curr - (prevTime || curr);\n\t self.diff = ms;\n\t self.prev = prevTime;\n\t self.curr = curr;\n\t prevTime = curr;\n\t\n\t // turn the `arguments` into a proper Array\n\t var args = new Array(arguments.length);\n\t for (var i = 0; i < args.length; i++) {\n\t args[i] = arguments[i];\n\t }\n\t\n\t args[0] = exports.coerce(args[0]);\n\t\n\t if ('string' !== typeof args[0]) {\n\t // anything else let's inspect with %O\n\t args.unshift('%O');\n\t }\n\t\n\t // apply any `formatters` transformations\n\t var index = 0;\n\t args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {\n\t // if we encounter an escaped % then don't increase the array index\n\t if (match === '%%') return match;\n\t index++;\n\t var formatter = exports.formatters[format];\n\t if ('function' === typeof formatter) {\n\t var val = args[index];\n\t match = formatter.call(self, val);\n\t\n\t // now we need to remove `args[index]` since it's inlined in the `format`\n\t args.splice(index, 1);\n\t index--;\n\t }\n\t return match;\n\t });\n\t\n\t // apply env-specific formatting (colors, etc.)\n\t exports.formatArgs.call(self, args);\n\t\n\t var logFn = debug.log || exports.log || console.log.bind(console);\n\t logFn.apply(self, args);\n\t }\n\t\n\t debug.namespace = namespace;\n\t debug.enabled = exports.enabled(namespace);\n\t debug.useColors = exports.useColors();\n\t debug.color = selectColor(namespace);\n\t\n\t // env-specific initialization logic for debug instances\n\t if ('function' === typeof exports.init) {\n\t exports.init(debug);\n\t }\n\t\n\t return debug;\n\t}\n\t\n\t/**\n\t * Enables a debug mode by namespaces. This can include modes\n\t * separated by a colon and wildcards.\n\t *\n\t * @param {String} namespaces\n\t * @api public\n\t */\n\t\n\tfunction enable(namespaces) {\n\t exports.save(namespaces);\n\t\n\t exports.names = [];\n\t exports.skips = [];\n\t\n\t var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t var len = split.length;\n\t\n\t for (var i = 0; i < len; i++) {\n\t if (!split[i]) continue; // ignore empty strings\n\t namespaces = split[i].replace(/\\*/g, '.*?');\n\t if (namespaces[0] === '-') {\n\t exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t } else {\n\t exports.names.push(new RegExp('^' + namespaces + '$'));\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * Disable debug output.\n\t *\n\t * @api public\n\t */\n\t\n\tfunction disable() {\n\t exports.enable('');\n\t}\n\t\n\t/**\n\t * Returns true if the given mode name is enabled, false otherwise.\n\t *\n\t * @param {String} name\n\t * @return {Boolean}\n\t * @api public\n\t */\n\t\n\tfunction enabled(name) {\n\t var i, len;\n\t for (i = 0, len = exports.skips.length; i < len; i++) {\n\t if (exports.skips[i].test(name)) {\n\t return false;\n\t }\n\t }\n\t for (i = 0, len = exports.names.length; i < len; i++) {\n\t if (exports.names[i].test(name)) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t}\n\t\n\t/**\n\t * Coerce `val`.\n\t *\n\t * @param {Mixed} val\n\t * @return {Mixed}\n\t * @api private\n\t */\n\t\n\tfunction coerce(val) {\n\t if (val instanceof Error) return val.stack || val.message;\n\t return val;\n\t}\n\n\n/***/ },\n/* 22 */\n/***/ function(module, exports) {\n\n\t/**\n\t * Helpers.\n\t */\n\t\n\tvar s = 1000;\n\tvar m = s * 60;\n\tvar h = m * 60;\n\tvar d = h * 24;\n\tvar y = d * 365.25;\n\t\n\t/**\n\t * Parse or format the given `val`.\n\t *\n\t * Options:\n\t *\n\t * - `long` verbose formatting [false]\n\t *\n\t * @param {String|Number} val\n\t * @param {Object} [options]\n\t * @throws {Error} throw an error if val is not a non-empty string or a number\n\t * @return {String|Number}\n\t * @api public\n\t */\n\t\n\tmodule.exports = function(val, options) {\n\t options = options || {};\n\t var type = typeof val;\n\t if (type === 'string' && val.length > 0) {\n\t return parse(val);\n\t } else if (type === 'number' && isNaN(val) === false) {\n\t return options.long ? fmtLong(val) : fmtShort(val);\n\t }\n\t throw new Error(\n\t 'val is not a non-empty string or a valid number. val=' +\n\t JSON.stringify(val)\n\t );\n\t};\n\t\n\t/**\n\t * Parse the given `str` and return milliseconds.\n\t *\n\t * @param {String} str\n\t * @return {Number}\n\t * @api private\n\t */\n\t\n\tfunction parse(str) {\n\t str = String(str);\n\t if (str.length > 100) {\n\t return;\n\t }\n\t var match = /^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(\n\t str\n\t );\n\t if (!match) {\n\t return;\n\t }\n\t var n = parseFloat(match[1]);\n\t var type = (match[2] || 'ms').toLowerCase();\n\t switch (type) {\n\t case 'years':\n\t case 'year':\n\t case 'yrs':\n\t case 'yr':\n\t case 'y':\n\t return n * y;\n\t case 'days':\n\t case 'day':\n\t case 'd':\n\t return n * d;\n\t case 'hours':\n\t case 'hour':\n\t case 'hrs':\n\t case 'hr':\n\t case 'h':\n\t return n * h;\n\t case 'minutes':\n\t case 'minute':\n\t case 'mins':\n\t case 'min':\n\t case 'm':\n\t return n * m;\n\t case 'seconds':\n\t case 'second':\n\t case 'secs':\n\t case 'sec':\n\t case 's':\n\t return n * s;\n\t case 'milliseconds':\n\t case 'millisecond':\n\t case 'msecs':\n\t case 'msec':\n\t case 'ms':\n\t return n;\n\t default:\n\t return undefined;\n\t }\n\t}\n\t\n\t/**\n\t * Short format for `ms`.\n\t *\n\t * @param {Number} ms\n\t * @return {String}\n\t * @api private\n\t */\n\t\n\tfunction fmtShort(ms) {\n\t if (ms >= d) {\n\t return Math.round(ms / d) + 'd';\n\t }\n\t if (ms >= h) {\n\t return Math.round(ms / h) + 'h';\n\t }\n\t if (ms >= m) {\n\t return Math.round(ms / m) + 'm';\n\t }\n\t if (ms >= s) {\n\t return Math.round(ms / s) + 's';\n\t }\n\t return ms + 'ms';\n\t}\n\t\n\t/**\n\t * Long format for `ms`.\n\t *\n\t * @param {Number} ms\n\t * @return {String}\n\t * @api private\n\t */\n\t\n\tfunction fmtLong(ms) {\n\t return plural(ms, d, 'day') ||\n\t plural(ms, h, 'hour') ||\n\t plural(ms, m, 'minute') ||\n\t plural(ms, s, 'second') ||\n\t ms + ' ms';\n\t}\n\t\n\t/**\n\t * Pluralization helper.\n\t */\n\t\n\tfunction plural(ms, n, name) {\n\t if (ms < n) {\n\t return;\n\t }\n\t if (ms < n * 1.5) {\n\t return Math.floor(ms / n) + ' ' + name;\n\t }\n\t return Math.ceil(ms / n) + ' ' + name + 's';\n\t}\n\n\n/***/ },\n/* 23 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\n\t/**\n\t * Module dependencies.\n\t */\n\t\n\tvar debug = __webpack_require__(19)('socket.io-parser');\n\tvar Emitter = __webpack_require__(24);\n\tvar hasBin = __webpack_require__(25);\n\tvar binary = __webpack_require__(27);\n\tvar isBuf = __webpack_require__(29);\n\t\n\t/**\n\t * Protocol version.\n\t *\n\t * @api public\n\t */\n\t\n\texports.protocol = 4;\n\t\n\t/**\n\t * Packet types.\n\t *\n\t * @api public\n\t */\n\t\n\texports.types = [\n\t 'CONNECT',\n\t 'DISCONNECT',\n\t 'EVENT',\n\t 'ACK',\n\t 'ERROR',\n\t 'BINARY_EVENT',\n\t 'BINARY_ACK'\n\t];\n\t\n\t/**\n\t * Packet type `connect`.\n\t *\n\t * @api public\n\t */\n\t\n\texports.CONNECT = 0;\n\t\n\t/**\n\t * Packet type `disconnect`.\n\t *\n\t * @api public\n\t */\n\t\n\texports.DISCONNECT = 1;\n\t\n\t/**\n\t * Packet type `event`.\n\t *\n\t * @api public\n\t */\n\t\n\texports.EVENT = 2;\n\t\n\t/**\n\t * Packet type `ack`.\n\t *\n\t * @api public\n\t */\n\t\n\texports.ACK = 3;\n\t\n\t/**\n\t * Packet type `error`.\n\t *\n\t * @api public\n\t */\n\t\n\texports.ERROR = 4;\n\t\n\t/**\n\t * Packet type 'binary event'\n\t *\n\t * @api public\n\t */\n\t\n\texports.BINARY_EVENT = 5;\n\t\n\t/**\n\t * Packet type `binary ack`. For acks with binary arguments.\n\t *\n\t * @api public\n\t */\n\t\n\texports.BINARY_ACK = 6;\n\t\n\t/**\n\t * Encoder constructor.\n\t *\n\t * @api public\n\t */\n\t\n\texports.Encoder = Encoder;\n\t\n\t/**\n\t * Decoder constructor.\n\t *\n\t * @api public\n\t */\n\t\n\texports.Decoder = Decoder;\n\t\n\t/**\n\t * A socket.io Encoder instance\n\t *\n\t * @api public\n\t */\n\t\n\tfunction Encoder() {}\n\t\n\t/**\n\t * Encode a packet as a single string if non-binary, or as a\n\t * buffer sequence, depending on packet type.\n\t *\n\t * @param {Object} obj - packet object\n\t * @param {Function} callback - function to handle encodings (likely engine.write)\n\t * @return Calls callback with Array of encodings\n\t * @api public\n\t */\n\t\n\tEncoder.prototype.encode = function(obj, callback){\n\t if ((obj.type === exports.EVENT || obj.type === exports.ACK) && hasBin(obj.data)) {\n\t obj.type = obj.type === exports.EVENT ? exports.BINARY_EVENT : exports.BINARY_ACK;\n\t }\n\t\n\t debug('encoding packet %j', obj);\n\t\n\t if (exports.BINARY_EVENT === obj.type || exports.BINARY_ACK === obj.type) {\n\t encodeAsBinary(obj, callback);\n\t }\n\t else {\n\t var encoding = encodeAsString(obj);\n\t callback([encoding]);\n\t }\n\t};\n\t\n\t/**\n\t * Encode packet as string.\n\t *\n\t * @param {Object} packet\n\t * @return {String} encoded\n\t * @api private\n\t */\n\t\n\tfunction encodeAsString(obj) {\n\t\n\t // first is type\n\t var str = '' + obj.type;\n\t\n\t // attachments if we have them\n\t if (exports.BINARY_EVENT === obj.type || exports.BINARY_ACK === obj.type) {\n\t str += obj.attachments + '-';\n\t }\n\t\n\t // if we have a namespace other than `/`\n\t // we append it followed by a comma `,`\n\t if (obj.nsp && '/' !== obj.nsp) {\n\t str += obj.nsp + ',';\n\t }\n\t\n\t // immediately followed by the id\n\t if (null != obj.id) {\n\t str += obj.id;\n\t }\n\t\n\t // json data\n\t if (null != obj.data) {\n\t str += JSON.stringify(obj.data);\n\t }\n\t\n\t debug('encoded %j as %s', obj, str);\n\t return str;\n\t}\n\t\n\t/**\n\t * Encode packet as 'buffer sequence' by removing blobs, and\n\t * deconstructing packet into object with placeholders and\n\t * a list of buffers.\n\t *\n\t * @param {Object} packet\n\t * @return {Buffer} encoded\n\t * @api private\n\t */\n\t\n\tfunction encodeAsBinary(obj, callback) {\n\t\n\t function writeEncoding(bloblessData) {\n\t var deconstruction = binary.deconstructPacket(bloblessData);\n\t var pack = encodeAsString(deconstruction.packet);\n\t var buffers = deconstruction.buffers;\n\t\n\t buffers.unshift(pack); // add packet info to beginning of data list\n\t callback(buffers); // write all the buffers\n\t }\n\t\n\t binary.removeBlobs(obj, writeEncoding);\n\t}\n\t\n\t/**\n\t * A socket.io Decoder instance\n\t *\n\t * @return {Object} decoder\n\t * @api public\n\t */\n\t\n\tfunction Decoder() {\n\t this.reconstructor = null;\n\t}\n\t\n\t/**\n\t * Mix in `Emitter` with Decoder.\n\t */\n\t\n\tEmitter(Decoder.prototype);\n\t\n\t/**\n\t * Decodes an ecoded packet string into packet JSON.\n\t *\n\t * @param {String} obj - encoded packet\n\t * @return {Object} packet\n\t * @api public\n\t */\n\t\n\tDecoder.prototype.add = function(obj) {\n\t var packet;\n\t if (typeof obj === 'string') {\n\t packet = decodeString(obj);\n\t if (exports.BINARY_EVENT === packet.type || exports.BINARY_ACK === packet.type) { // binary packet's json\n\t this.reconstructor = new BinaryReconstructor(packet);\n\t\n\t // no attachments, labeled binary but no binary data to follow\n\t if (this.reconstructor.reconPack.attachments === 0) {\n\t this.emit('decoded', packet);\n\t }\n\t } else { // non-binary full packet\n\t this.emit('decoded', packet);\n\t }\n\t }\n\t else if (isBuf(obj) || obj.base64) { // raw binary data\n\t if (!this.reconstructor) {\n\t throw new Error('got binary data when not reconstructing a packet');\n\t } else {\n\t packet = this.reconstructor.takeBinaryData(obj);\n\t if (packet) { // received final buffer\n\t this.reconstructor = null;\n\t this.emit('decoded', packet);\n\t }\n\t }\n\t }\n\t else {\n\t throw new Error('Unknown type: ' + obj);\n\t }\n\t};\n\t\n\t/**\n\t * Decode a packet String (JSON data)\n\t *\n\t * @param {String} str\n\t * @return {Object} packet\n\t * @api private\n\t */\n\t\n\tfunction decodeString(str) {\n\t var i = 0;\n\t // look up type\n\t var p = {\n\t type: Number(str.charAt(0))\n\t };\n\t\n\t if (null == exports.types[p.type]) return error();\n\t\n\t // look up attachments if type binary\n\t if (exports.BINARY_EVENT === p.type || exports.BINARY_ACK === p.type) {\n\t var buf = '';\n\t while (str.charAt(++i) !== '-') {\n\t buf += str.charAt(i);\n\t if (i == str.length) break;\n\t }\n\t if (buf != Number(buf) || str.charAt(i) !== '-') {\n\t throw new Error('Illegal attachments');\n\t }\n\t p.attachments = Number(buf);\n\t }\n\t\n\t // look up namespace (if any)\n\t if ('/' === str.charAt(i + 1)) {\n\t p.nsp = '';\n\t while (++i) {\n\t var c = str.charAt(i);\n\t if (',' === c) break;\n\t p.nsp += c;\n\t if (i === str.length) break;\n\t }\n\t } else {\n\t p.nsp = '/';\n\t }\n\t\n\t // look up id\n\t var next = str.charAt(i + 1);\n\t if ('' !== next && Number(next) == next) {\n\t p.id = '';\n\t while (++i) {\n\t var c = str.charAt(i);\n\t if (null == c || Number(c) != c) {\n\t --i;\n\t break;\n\t }\n\t p.id += str.charAt(i);\n\t if (i === str.length) break;\n\t }\n\t p.id = Number(p.id);\n\t }\n\t\n\t // look up json data\n\t if (str.charAt(++i)) {\n\t p = tryParse(p, str.substr(i));\n\t }\n\t\n\t debug('decoded %s as %j', str, p);\n\t return p;\n\t}\n\t\n\tfunction tryParse(p, str) {\n\t try {\n\t p.data = JSON.parse(str);\n\t } catch(e){\n\t return error();\n\t }\n\t return p; \n\t}\n\t\n\t/**\n\t * Deallocates a parser's resources\n\t *\n\t * @api public\n\t */\n\t\n\tDecoder.prototype.destroy = function() {\n\t if (this.reconstructor) {\n\t this.reconstructor.finishedReconstruction();\n\t }\n\t};\n\t\n\t/**\n\t * A manager of a binary event's 'buffer sequence'. Should\n\t * be constructed whenever a packet of type BINARY_EVENT is\n\t * decoded.\n\t *\n\t * @param {Object} packet\n\t * @return {BinaryReconstructor} initialized reconstructor\n\t * @api private\n\t */\n\t\n\tfunction BinaryReconstructor(packet) {\n\t this.reconPack = packet;\n\t this.buffers = [];\n\t}\n\t\n\t/**\n\t * Method to be called when binary data received from connection\n\t * after a BINARY_EVENT packet.\n\t *\n\t * @param {Buffer | ArrayBuffer} binData - the raw binary data received\n\t * @return {null | Object} returns null if more binary data is expected or\n\t * a reconstructed packet object if all buffers have been received.\n\t * @api private\n\t */\n\t\n\tBinaryReconstructor.prototype.takeBinaryData = function(binData) {\n\t this.buffers.push(binData);\n\t if (this.buffers.length === this.reconPack.attachments) { // done with buffer list\n\t var packet = binary.reconstructPacket(this.reconPack, this.buffers);\n\t this.finishedReconstruction();\n\t return packet;\n\t }\n\t return null;\n\t};\n\t\n\t/**\n\t * Cleans up binary packet reconstruction variables.\n\t *\n\t * @api private\n\t */\n\t\n\tBinaryReconstructor.prototype.finishedReconstruction = function() {\n\t this.reconPack = null;\n\t this.buffers = [];\n\t};\n\t\n\tfunction error() {\n\t return {\n\t type: exports.ERROR,\n\t data: 'parser error'\n\t };\n\t}\n\n\n/***/ },\n/* 24 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\r\n\t/**\r\n\t * Expose `Emitter`.\r\n\t */\r\n\t\r\n\tif (true) {\r\n\t module.exports = Emitter;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Initialize a new `Emitter`.\r\n\t *\r\n\t * @api public\r\n\t */\r\n\t\r\n\tfunction Emitter(obj) {\r\n\t if (obj) return mixin(obj);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Mixin the emitter properties.\r\n\t *\r\n\t * @param {Object} obj\r\n\t * @return {Object}\r\n\t * @api private\r\n\t */\r\n\t\r\n\tfunction mixin(obj) {\r\n\t for (var key in Emitter.prototype) {\r\n\t obj[key] = Emitter.prototype[key];\r\n\t }\r\n\t return obj;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Listen on the given `event` with `fn`.\r\n\t *\r\n\t * @param {String} event\r\n\t * @param {Function} fn\r\n\t * @return {Emitter}\r\n\t * @api public\r\n\t */\r\n\t\r\n\tEmitter.prototype.on =\r\n\tEmitter.prototype.addEventListener = function(event, fn){\r\n\t this._callbacks = this._callbacks || {};\r\n\t (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n\t .push(fn);\r\n\t return this;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Adds an `event` listener that will be invoked a single\r\n\t * time then automatically removed.\r\n\t *\r\n\t * @param {String} event\r\n\t * @param {Function} fn\r\n\t * @return {Emitter}\r\n\t * @api public\r\n\t */\r\n\t\r\n\tEmitter.prototype.once = function(event, fn){\r\n\t function on() {\r\n\t this.off(event, on);\r\n\t fn.apply(this, arguments);\r\n\t }\r\n\t\r\n\t on.fn = fn;\r\n\t this.on(event, on);\r\n\t return this;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Remove the given callback for `event` or all\r\n\t * registered callbacks.\r\n\t *\r\n\t * @param {String} event\r\n\t * @param {Function} fn\r\n\t * @return {Emitter}\r\n\t * @api public\r\n\t */\r\n\t\r\n\tEmitter.prototype.off =\r\n\tEmitter.prototype.removeListener =\r\n\tEmitter.prototype.removeAllListeners =\r\n\tEmitter.prototype.removeEventListener = function(event, fn){\r\n\t this._callbacks = this._callbacks || {};\r\n\t\r\n\t // all\r\n\t if (0 == arguments.length) {\r\n\t this._callbacks = {};\r\n\t return this;\r\n\t }\r\n\t\r\n\t // specific event\r\n\t var callbacks = this._callbacks['$' + event];\r\n\t if (!callbacks) return this;\r\n\t\r\n\t // remove all handlers\r\n\t if (1 == arguments.length) {\r\n\t delete this._callbacks['$' + event];\r\n\t return this;\r\n\t }\r\n\t\r\n\t // remove specific handler\r\n\t var cb;\r\n\t for (var i = 0; i < callbacks.length; i++) {\r\n\t cb = callbacks[i];\r\n\t if (cb === fn || cb.fn === fn) {\r\n\t callbacks.splice(i, 1);\r\n\t break;\r\n\t }\r\n\t }\r\n\t return this;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Emit `event` with the given args.\r\n\t *\r\n\t * @param {String} event\r\n\t * @param {Mixed} ...\r\n\t * @return {Emitter}\r\n\t */\r\n\t\r\n\tEmitter.prototype.emit = function(event){\r\n\t this._callbacks = this._callbacks || {};\r\n\t var args = [].slice.call(arguments, 1)\r\n\t , callbacks = this._callbacks['$' + event];\r\n\t\r\n\t if (callbacks) {\r\n\t callbacks = callbacks.slice(0);\r\n\t for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n\t callbacks[i].apply(this, args);\r\n\t }\r\n\t }\r\n\t\r\n\t return this;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Return array of callbacks for `event`.\r\n\t *\r\n\t * @param {String} event\r\n\t * @return {Array}\r\n\t * @api public\r\n\t */\r\n\t\r\n\tEmitter.prototype.listeners = function(event){\r\n\t this._callbacks = this._callbacks || {};\r\n\t return this._callbacks['$' + event] || [];\r\n\t};\r\n\t\r\n\t/**\r\n\t * Check if this emitter has `event` handlers.\r\n\t *\r\n\t * @param {String} event\r\n\t * @return {Boolean}\r\n\t * @api public\r\n\t */\r\n\t\r\n\tEmitter.prototype.hasListeners = function(event){\r\n\t return !! this.listeners(event).length;\r\n\t};\r\n\n\n/***/ },\n/* 25 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {/* global Blob File */\n\t\n\t/*\n\t * Module requirements.\n\t */\n\t\n\tvar isArray = __webpack_require__(26);\n\t\n\tvar toString = Object.prototype.toString;\n\tvar withNativeBlob = typeof global.Blob === 'function' || toString.call(global.Blob) === '[object BlobConstructor]';\n\tvar withNativeFile = typeof global.File === 'function' || toString.call(global.File) === '[object FileConstructor]';\n\t\n\t/**\n\t * Module exports.\n\t */\n\t\n\tmodule.exports = hasBinary;\n\t\n\t/**\n\t * Checks for binary data.\n\t *\n\t * Supports Buffer, ArrayBuffer, Blob and File.\n\t *\n\t * @param {Object} anything\n\t * @api public\n\t */\n\t\n\tfunction hasBinary (obj) {\n\t if (!obj || typeof obj !== 'object') {\n\t return false;\n\t }\n\t\n\t if (isArray(obj)) {\n\t for (var i = 0, l = obj.length; i < l; i++) {\n\t if (hasBinary(obj[i])) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t }\n\t\n\t if ((typeof global.Buffer === 'function' && global.Buffer.isBuffer && global.Buffer.isBuffer(obj)) ||\n\t (typeof global.ArrayBuffer === 'function' && obj instanceof ArrayBuffer) ||\n\t (withNativeBlob && obj instanceof Blob) ||\n\t (withNativeFile && obj instanceof File)\n\t ) {\n\t return true;\n\t }\n\t\n\t // see: https://github.com/Automattic/has-binary/pull/4\n\t if (obj.toJSON && typeof obj.toJSON === 'function' && arguments.length === 1) {\n\t return hasBinary(obj.toJSON(), true);\n\t }\n\t\n\t for (var key in obj) {\n\t if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {\n\t return true;\n\t }\n\t }\n\t\n\t return false;\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 26 */\n/***/ function(module, exports) {\n\n\tvar toString = {}.toString;\n\t\n\tmodule.exports = Array.isArray || function (arr) {\n\t return toString.call(arr) == '[object Array]';\n\t};\n\n\n/***/ },\n/* 27 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {/*global Blob,File*/\n\t\n\t/**\n\t * Module requirements\n\t */\n\t\n\tvar isArray = __webpack_require__(28);\n\tvar isBuf = __webpack_require__(29);\n\tvar toString = Object.prototype.toString;\n\tvar withNativeBlob = typeof global.Blob === 'function' || toString.call(global.Blob) === '[object BlobConstructor]';\n\tvar withNativeFile = typeof global.File === 'function' || toString.call(global.File) === '[object FileConstructor]';\n\t\n\t/**\n\t * Replaces every Buffer | ArrayBuffer in packet with a numbered placeholder.\n\t * Anything with blobs or files should be fed through removeBlobs before coming\n\t * here.\n\t *\n\t * @param {Object} packet - socket.io event packet\n\t * @return {Object} with deconstructed packet and list of buffers\n\t * @api public\n\t */\n\t\n\texports.deconstructPacket = function(packet) {\n\t var buffers = [];\n\t var packetData = packet.data;\n\t var pack = packet;\n\t pack.data = _deconstructPacket(packetData, buffers);\n\t pack.attachments = buffers.length; // number of binary 'attachments'\n\t return {packet: pack, buffers: buffers};\n\t};\n\t\n\tfunction _deconstructPacket(data, buffers) {\n\t if (!data) return data;\n\t\n\t if (isBuf(data)) {\n\t var placeholder = { _placeholder: true, num: buffers.length };\n\t buffers.push(data);\n\t return placeholder;\n\t } else if (isArray(data)) {\n\t var newData = new Array(data.length);\n\t for (var i = 0; i < data.length; i++) {\n\t newData[i] = _deconstructPacket(data[i], buffers);\n\t }\n\t return newData;\n\t } else if (typeof data === 'object' && !(data instanceof Date)) {\n\t var newData = {};\n\t for (var key in data) {\n\t newData[key] = _deconstructPacket(data[key], buffers);\n\t }\n\t return newData;\n\t }\n\t return data;\n\t}\n\t\n\t/**\n\t * Reconstructs a binary packet from its placeholder packet and buffers\n\t *\n\t * @param {Object} packet - event packet with placeholders\n\t * @param {Array} buffers - binary buffers to put in placeholder positions\n\t * @return {Object} reconstructed packet\n\t * @api public\n\t */\n\t\n\texports.reconstructPacket = function(packet, buffers) {\n\t packet.data = _reconstructPacket(packet.data, buffers);\n\t packet.attachments = undefined; // no longer useful\n\t return packet;\n\t};\n\t\n\tfunction _reconstructPacket(data, buffers) {\n\t if (!data) return data;\n\t\n\t if (data && data._placeholder) {\n\t return buffers[data.num]; // appropriate buffer (should be natural order anyway)\n\t } else if (isArray(data)) {\n\t for (var i = 0; i < data.length; i++) {\n\t data[i] = _reconstructPacket(data[i], buffers);\n\t }\n\t } else if (typeof data === 'object') {\n\t for (var key in data) {\n\t data[key] = _reconstructPacket(data[key], buffers);\n\t }\n\t }\n\t\n\t return data;\n\t}\n\t\n\t/**\n\t * Asynchronously removes Blobs or Files from data via\n\t * FileReader's readAsArrayBuffer method. Used before encoding\n\t * data as msgpack. Calls callback with the blobless data.\n\t *\n\t * @param {Object} data\n\t * @param {Function} callback\n\t * @api private\n\t */\n\t\n\texports.removeBlobs = function(data, callback) {\n\t function _removeBlobs(obj, curKey, containingObject) {\n\t if (!obj) return obj;\n\t\n\t // convert any blob\n\t if ((withNativeBlob && obj instanceof Blob) ||\n\t (withNativeFile && obj instanceof File)) {\n\t pendingBlobs++;\n\t\n\t // async filereader\n\t var fileReader = new FileReader();\n\t fileReader.onload = function() { // this.result == arraybuffer\n\t if (containingObject) {\n\t containingObject[curKey] = this.result;\n\t }\n\t else {\n\t bloblessData = this.result;\n\t }\n\t\n\t // if nothing pending its callback time\n\t if(! --pendingBlobs) {\n\t callback(bloblessData);\n\t }\n\t };\n\t\n\t fileReader.readAsArrayBuffer(obj); // blob -> arraybuffer\n\t } else if (isArray(obj)) { // handle array\n\t for (var i = 0; i < obj.length; i++) {\n\t _removeBlobs(obj[i], i, obj);\n\t }\n\t } else if (typeof obj === 'object' && !isBuf(obj)) { // and object\n\t for (var key in obj) {\n\t _removeBlobs(obj[key], key, obj);\n\t }\n\t }\n\t }\n\t\n\t var pendingBlobs = 0;\n\t var bloblessData = data;\n\t _removeBlobs(bloblessData);\n\t if (!pendingBlobs) {\n\t callback(bloblessData);\n\t }\n\t};\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 28 */\n/***/ function(module, exports) {\n\n\tvar toString = {}.toString;\n\t\n\tmodule.exports = Array.isArray || function (arr) {\n\t return toString.call(arr) == '[object Array]';\n\t};\n\n\n/***/ },\n/* 29 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\n\tmodule.exports = isBuf;\n\t\n\t/**\n\t * Returns true if obj is a buffer or an arraybuffer.\n\t *\n\t * @api private\n\t */\n\t\n\tfunction isBuf(obj) {\n\t return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n\t (global.ArrayBuffer && obj instanceof ArrayBuffer);\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 30 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\n\t/**\n\t * Module dependencies.\n\t */\n\t\n\tvar eio = __webpack_require__(31);\n\tvar Socket = __webpack_require__(58);\n\tvar Emitter = __webpack_require__(24);\n\tvar parser = __webpack_require__(23);\n\tvar on = __webpack_require__(60);\n\tvar bind = __webpack_require__(61);\n\tvar debug = __webpack_require__(19)('socket.io-client:manager');\n\tvar indexOf = __webpack_require__(56);\n\tvar Backoff = __webpack_require__(62);\n\t\n\t/**\n\t * IE6+ hasOwnProperty\n\t */\n\t\n\tvar has = Object.prototype.hasOwnProperty;\n\t\n\t/**\n\t * Module exports\n\t */\n\t\n\tmodule.exports = Manager;\n\t\n\t/**\n\t * `Manager` constructor.\n\t *\n\t * @param {String} engine instance or engine uri/opts\n\t * @param {Object} options\n\t * @api public\n\t */\n\t\n\tfunction Manager (uri, opts) {\n\t if (!(this instanceof Manager)) return new Manager(uri, opts);\n\t if (uri && ('object' === typeof uri)) {\n\t opts = uri;\n\t uri = undefined;\n\t }\n\t opts = opts || {};\n\t\n\t opts.path = opts.path || '/socket.io';\n\t this.nsps = {};\n\t this.subs = [];\n\t this.opts = opts;\n\t this.reconnection(opts.reconnection !== false);\n\t this.reconnectionAttempts(opts.reconnectionAttempts || Infinity);\n\t this.reconnectionDelay(opts.reconnectionDelay || 1000);\n\t this.reconnectionDelayMax(opts.reconnectionDelayMax || 5000);\n\t this.randomizationFactor(opts.randomizationFactor || 0.5);\n\t this.backoff = new Backoff({\n\t min: this.reconnectionDelay(),\n\t max: this.reconnectionDelayMax(),\n\t jitter: this.randomizationFactor()\n\t });\n\t this.timeout(null == opts.timeout ? 20000 : opts.timeout);\n\t this.readyState = 'closed';\n\t this.uri = uri;\n\t this.connecting = [];\n\t this.lastPing = null;\n\t this.encoding = false;\n\t this.packetBuffer = [];\n\t var _parser = opts.parser || parser;\n\t this.encoder = new _parser.Encoder();\n\t this.decoder = new _parser.Decoder();\n\t this.autoConnect = opts.autoConnect !== false;\n\t if (this.autoConnect) this.open();\n\t}\n\t\n\t/**\n\t * Propagate given event to sockets and emit on `this`\n\t *\n\t * @api private\n\t */\n\t\n\tManager.prototype.emitAll = function () {\n\t this.emit.apply(this, arguments);\n\t for (var nsp in this.nsps) {\n\t if (has.call(this.nsps, nsp)) {\n\t this.nsps[nsp].emit.apply(this.nsps[nsp], arguments);\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Update `socket.id` of all sockets\n\t *\n\t * @api private\n\t */\n\t\n\tManager.prototype.updateSocketIds = function () {\n\t for (var nsp in this.nsps) {\n\t if (has.call(this.nsps, nsp)) {\n\t this.nsps[nsp].id = this.generateId(nsp);\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * generate `socket.id` for the given `nsp`\n\t *\n\t * @param {String} nsp\n\t * @return {String}\n\t * @api private\n\t */\n\t\n\tManager.prototype.generateId = function (nsp) {\n\t return (nsp === '/' ? '' : (nsp + '#')) + this.engine.id;\n\t};\n\t\n\t/**\n\t * Mix in `Emitter`.\n\t */\n\t\n\tEmitter(Manager.prototype);\n\t\n\t/**\n\t * Sets the `reconnection` config.\n\t *\n\t * @param {Boolean} true/false if it should automatically reconnect\n\t * @return {Manager} self or value\n\t * @api public\n\t */\n\t\n\tManager.prototype.reconnection = function (v) {\n\t if (!arguments.length) return this._reconnection;\n\t this._reconnection = !!v;\n\t return this;\n\t};\n\t\n\t/**\n\t * Sets the reconnection attempts config.\n\t *\n\t * @param {Number} max reconnection attempts before giving up\n\t * @return {Manager} self or value\n\t * @api public\n\t */\n\t\n\tManager.prototype.reconnectionAttempts = function (v) {\n\t if (!arguments.length) return this._reconnectionAttempts;\n\t this._reconnectionAttempts = v;\n\t return this;\n\t};\n\t\n\t/**\n\t * Sets the delay between reconnections.\n\t *\n\t * @param {Number} delay\n\t * @return {Manager} self or value\n\t * @api public\n\t */\n\t\n\tManager.prototype.reconnectionDelay = function (v) {\n\t if (!arguments.length) return this._reconnectionDelay;\n\t this._reconnectionDelay = v;\n\t this.backoff && this.backoff.setMin(v);\n\t return this;\n\t};\n\t\n\tManager.prototype.randomizationFactor = function (v) {\n\t if (!arguments.length) return this._randomizationFactor;\n\t this._randomizationFactor = v;\n\t this.backoff && this.backoff.setJitter(v);\n\t return this;\n\t};\n\t\n\t/**\n\t * Sets the maximum delay between reconnections.\n\t *\n\t * @param {Number} delay\n\t * @return {Manager} self or value\n\t * @api public\n\t */\n\t\n\tManager.prototype.reconnectionDelayMax = function (v) {\n\t if (!arguments.length) return this._reconnectionDelayMax;\n\t this._reconnectionDelayMax = v;\n\t this.backoff && this.backoff.setMax(v);\n\t return this;\n\t};\n\t\n\t/**\n\t * Sets the connection timeout. `false` to disable\n\t *\n\t * @return {Manager} self or value\n\t * @api public\n\t */\n\t\n\tManager.prototype.timeout = function (v) {\n\t if (!arguments.length) return this._timeout;\n\t this._timeout = v;\n\t return this;\n\t};\n\t\n\t/**\n\t * Starts trying to reconnect if reconnection is enabled and we have not\n\t * started reconnecting yet\n\t *\n\t * @api private\n\t */\n\t\n\tManager.prototype.maybeReconnectOnOpen = function () {\n\t // Only try to reconnect if it's the first time we're connecting\n\t if (!this.reconnecting && this._reconnection && this.backoff.attempts === 0) {\n\t // keeps reconnection from firing twice for the same reconnection loop\n\t this.reconnect();\n\t }\n\t};\n\t\n\t/**\n\t * Sets the current transport `socket`.\n\t *\n\t * @param {Function} optional, callback\n\t * @return {Manager} self\n\t * @api public\n\t */\n\t\n\tManager.prototype.open =\n\tManager.prototype.connect = function (fn, opts) {\n\t debug('readyState %s', this.readyState);\n\t if (~this.readyState.indexOf('open')) return this;\n\t\n\t debug('opening %s', this.uri);\n\t this.engine = eio(this.uri, this.opts);\n\t var socket = this.engine;\n\t var self = this;\n\t this.readyState = 'opening';\n\t this.skipReconnect = false;\n\t\n\t // emit `open`\n\t var openSub = on(socket, 'open', function () {\n\t self.onopen();\n\t fn && fn();\n\t });\n\t\n\t // emit `connect_error`\n\t var errorSub = on(socket, 'error', function (data) {\n\t debug('connect_error');\n\t self.cleanup();\n\t self.readyState = 'closed';\n\t self.emitAll('connect_error', data);\n\t if (fn) {\n\t var err = new Error('Connection error');\n\t err.data = data;\n\t fn(err);\n\t } else {\n\t // Only do this if there is no fn to handle the error\n\t self.maybeReconnectOnOpen();\n\t }\n\t });\n\t\n\t // emit `connect_timeout`\n\t if (false !== this._timeout) {\n\t var timeout = this._timeout;\n\t debug('connect attempt will timeout after %d', timeout);\n\t\n\t // set timer\n\t var timer = setTimeout(function () {\n\t debug('connect attempt timed out after %d', timeout);\n\t openSub.destroy();\n\t socket.close();\n\t socket.emit('error', 'timeout');\n\t self.emitAll('connect_timeout', timeout);\n\t }, timeout);\n\t\n\t this.subs.push({\n\t destroy: function () {\n\t clearTimeout(timer);\n\t }\n\t });\n\t }\n\t\n\t this.subs.push(openSub);\n\t this.subs.push(errorSub);\n\t\n\t return this;\n\t};\n\t\n\t/**\n\t * Called upon transport open.\n\t *\n\t * @api private\n\t */\n\t\n\tManager.prototype.onopen = function () {\n\t debug('open');\n\t\n\t // clear old subs\n\t this.cleanup();\n\t\n\t // mark as open\n\t this.readyState = 'open';\n\t this.emit('open');\n\t\n\t // add new subs\n\t var socket = this.engine;\n\t this.subs.push(on(socket, 'data', bind(this, 'ondata')));\n\t this.subs.push(on(socket, 'ping', bind(this, 'onping')));\n\t this.subs.push(on(socket, 'pong', bind(this, 'onpong')));\n\t this.subs.push(on(socket, 'error', bind(this, 'onerror')));\n\t this.subs.push(on(socket, 'close', bind(this, 'onclose')));\n\t this.subs.push(on(this.decoder, 'decoded', bind(this, 'ondecoded')));\n\t};\n\t\n\t/**\n\t * Called upon a ping.\n\t *\n\t * @api private\n\t */\n\t\n\tManager.prototype.onping = function () {\n\t this.lastPing = new Date();\n\t this.emitAll('ping');\n\t};\n\t\n\t/**\n\t * Called upon a packet.\n\t *\n\t * @api private\n\t */\n\t\n\tManager.prototype.onpong = function () {\n\t this.emitAll('pong', new Date() - this.lastPing);\n\t};\n\t\n\t/**\n\t * Called with data.\n\t *\n\t * @api private\n\t */\n\t\n\tManager.prototype.ondata = function (data) {\n\t this.decoder.add(data);\n\t};\n\t\n\t/**\n\t * Called when parser fully decodes a packet.\n\t *\n\t * @api private\n\t */\n\t\n\tManager.prototype.ondecoded = function (packet) {\n\t this.emit('packet', packet);\n\t};\n\t\n\t/**\n\t * Called upon socket error.\n\t *\n\t * @api private\n\t */\n\t\n\tManager.prototype.onerror = function (err) {\n\t debug('error', err);\n\t this.emitAll('error', err);\n\t};\n\t\n\t/**\n\t * Creates a new socket for the given `nsp`.\n\t *\n\t * @return {Socket}\n\t * @api public\n\t */\n\t\n\tManager.prototype.socket = function (nsp, opts) {\n\t var socket = this.nsps[nsp];\n\t if (!socket) {\n\t socket = new Socket(this, nsp, opts);\n\t this.nsps[nsp] = socket;\n\t var self = this;\n\t socket.on('connecting', onConnecting);\n\t socket.on('connect', function () {\n\t socket.id = self.generateId(nsp);\n\t });\n\t\n\t if (this.autoConnect) {\n\t // manually call here since connecting event is fired before listening\n\t onConnecting();\n\t }\n\t }\n\t\n\t function onConnecting () {\n\t if (!~indexOf(self.connecting, socket)) {\n\t self.connecting.push(socket);\n\t }\n\t }\n\t\n\t return socket;\n\t};\n\t\n\t/**\n\t * Called upon a socket close.\n\t *\n\t * @param {Socket} socket\n\t */\n\t\n\tManager.prototype.destroy = function (socket) {\n\t var index = indexOf(this.connecting, socket);\n\t if (~index) this.connecting.splice(index, 1);\n\t if (this.connecting.length) return;\n\t\n\t this.close();\n\t};\n\t\n\t/**\n\t * Writes a packet.\n\t *\n\t * @param {Object} packet\n\t * @api private\n\t */\n\t\n\tManager.prototype.packet = function (packet) {\n\t debug('writing packet %j', packet);\n\t var self = this;\n\t if (packet.query && packet.type === 0) packet.nsp += '?' + packet.query;\n\t\n\t if (!self.encoding) {\n\t // encode, then write to engine with result\n\t self.encoding = true;\n\t this.encoder.encode(packet, function (encodedPackets) {\n\t for (var i = 0; i < encodedPackets.length; i++) {\n\t self.engine.write(encodedPackets[i], packet.options);\n\t }\n\t self.encoding = false;\n\t self.processPacketQueue();\n\t });\n\t } else { // add packet to the queue\n\t self.packetBuffer.push(packet);\n\t }\n\t};\n\t\n\t/**\n\t * If packet buffer is non-empty, begins encoding the\n\t * next packet in line.\n\t *\n\t * @api private\n\t */\n\t\n\tManager.prototype.processPacketQueue = function () {\n\t if (this.packetBuffer.length > 0 && !this.encoding) {\n\t var pack = this.packetBuffer.shift();\n\t this.packet(pack);\n\t }\n\t};\n\t\n\t/**\n\t * Clean up transport subscriptions and packet buffer.\n\t *\n\t * @api private\n\t */\n\t\n\tManager.prototype.cleanup = function () {\n\t debug('cleanup');\n\t\n\t var subsLength = this.subs.length;\n\t for (var i = 0; i < subsLength; i++) {\n\t var sub = this.subs.shift();\n\t sub.destroy();\n\t }\n\t\n\t this.packetBuffer = [];\n\t this.encoding = false;\n\t this.lastPing = null;\n\t\n\t this.decoder.destroy();\n\t};\n\t\n\t/**\n\t * Close the current socket.\n\t *\n\t * @api private\n\t */\n\t\n\tManager.prototype.close =\n\tManager.prototype.disconnect = function () {\n\t debug('disconnect');\n\t this.skipReconnect = true;\n\t this.reconnecting = false;\n\t if ('opening' === this.readyState) {\n\t // `onclose` will not fire because\n\t // an open event never happened\n\t this.cleanup();\n\t }\n\t this.backoff.reset();\n\t this.readyState = 'closed';\n\t if (this.engine) this.engine.close();\n\t};\n\t\n\t/**\n\t * Called upon engine close.\n\t *\n\t * @api private\n\t */\n\t\n\tManager.prototype.onclose = function (reason) {\n\t debug('onclose');\n\t\n\t this.cleanup();\n\t this.backoff.reset();\n\t this.readyState = 'closed';\n\t this.emit('close', reason);\n\t\n\t if (this._reconnection && !this.skipReconnect) {\n\t this.reconnect();\n\t }\n\t};\n\t\n\t/**\n\t * Attempt a reconnection.\n\t *\n\t * @api private\n\t */\n\t\n\tManager.prototype.reconnect = function () {\n\t if (this.reconnecting || this.skipReconnect) return this;\n\t\n\t var self = this;\n\t\n\t if (this.backoff.attempts >= this._reconnectionAttempts) {\n\t debug('reconnect failed');\n\t this.backoff.reset();\n\t this.emitAll('reconnect_failed');\n\t this.reconnecting = false;\n\t } else {\n\t var delay = this.backoff.duration();\n\t debug('will wait %dms before reconnect attempt', delay);\n\t\n\t this.reconnecting = true;\n\t var timer = setTimeout(function () {\n\t if (self.skipReconnect) return;\n\t\n\t debug('attempting reconnect');\n\t self.emitAll('reconnect_attempt', self.backoff.attempts);\n\t self.emitAll('reconnecting', self.backoff.attempts);\n\t\n\t // check again for the case socket closed in above events\n\t if (self.skipReconnect) return;\n\t\n\t self.open(function (err) {\n\t if (err) {\n\t debug('reconnect attempt error');\n\t self.reconnecting = false;\n\t self.reconnect();\n\t self.emitAll('reconnect_error', err.data);\n\t } else {\n\t debug('reconnect success');\n\t self.onreconnect();\n\t }\n\t });\n\t }, delay);\n\t\n\t this.subs.push({\n\t destroy: function () {\n\t clearTimeout(timer);\n\t }\n\t });\n\t }\n\t};\n\t\n\t/**\n\t * Called upon successful reconnect.\n\t *\n\t * @api private\n\t */\n\t\n\tManager.prototype.onreconnect = function () {\n\t var attempt = this.backoff.attempts;\n\t this.reconnecting = false;\n\t this.backoff.reset();\n\t this.updateSocketIds();\n\t this.emitAll('reconnect', attempt);\n\t};\n\n\n/***/ },\n/* 31 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\n\tmodule.exports = __webpack_require__(32);\n\t\n\t/**\n\t * Exports parser\n\t *\n\t * @api public\n\t *\n\t */\n\tmodule.exports.parser = __webpack_require__(39);\n\n\n/***/ },\n/* 32 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {/**\n\t * Module dependencies.\n\t */\n\t\n\tvar transports = __webpack_require__(33);\n\tvar Emitter = __webpack_require__(24);\n\tvar debug = __webpack_require__(50)('engine.io-client:socket');\n\tvar index = __webpack_require__(56);\n\tvar parser = __webpack_require__(39);\n\tvar parseuri = __webpack_require__(57);\n\tvar parseqs = __webpack_require__(47);\n\t\n\t/**\n\t * Module exports.\n\t */\n\t\n\tmodule.exports = Socket;\n\t\n\t/**\n\t * Socket constructor.\n\t *\n\t * @param {String|Object} uri or options\n\t * @param {Object} options\n\t * @api public\n\t */\n\t\n\tfunction Socket (uri, opts) {\n\t if (!(this instanceof Socket)) return new Socket(uri, opts);\n\t\n\t opts = opts || {};\n\t\n\t if (uri && 'object' === typeof uri) {\n\t opts = uri;\n\t uri = null;\n\t }\n\t\n\t if (uri) {\n\t uri = parseuri(uri);\n\t opts.hostname = uri.host;\n\t opts.secure = uri.protocol === 'https' || uri.protocol === 'wss';\n\t opts.port = uri.port;\n\t if (uri.query) opts.query = uri.query;\n\t } else if (opts.host) {\n\t opts.hostname = parseuri(opts.host).host;\n\t }\n\t\n\t this.secure = null != opts.secure ? opts.secure\n\t : (global.location && 'https:' === location.protocol);\n\t\n\t if (opts.hostname && !opts.port) {\n\t // if no port is specified manually, use the protocol default\n\t opts.port = this.secure ? '443' : '80';\n\t }\n\t\n\t this.agent = opts.agent || false;\n\t this.hostname = opts.hostname ||\n\t (global.location ? location.hostname : 'localhost');\n\t this.port = opts.port || (global.location && location.port\n\t ? location.port\n\t : (this.secure ? 443 : 80));\n\t this.query = opts.query || {};\n\t if ('string' === typeof this.query) this.query = parseqs.decode(this.query);\n\t this.upgrade = false !== opts.upgrade;\n\t this.path = (opts.path || '/engine.io').replace(/\\/$/, '') + '/';\n\t this.forceJSONP = !!opts.forceJSONP;\n\t this.jsonp = false !== opts.jsonp;\n\t this.forceBase64 = !!opts.forceBase64;\n\t this.enablesXDR = !!opts.enablesXDR;\n\t this.timestampParam = opts.timestampParam || 't';\n\t this.timestampRequests = opts.timestampRequests;\n\t this.transports = opts.transports || ['polling', 'websocket'];\n\t this.transportOptions = opts.transportOptions || {};\n\t this.readyState = '';\n\t this.writeBuffer = [];\n\t this.prevBufferLen = 0;\n\t this.policyPort = opts.policyPort || 843;\n\t this.rememberUpgrade = opts.rememberUpgrade || false;\n\t this.binaryType = null;\n\t this.onlyBinaryUpgrades = opts.onlyBinaryUpgrades;\n\t this.perMessageDeflate = false !== opts.perMessageDeflate ? (opts.perMessageDeflate || {}) : false;\n\t\n\t if (true === this.perMessageDeflate) this.perMessageDeflate = {};\n\t if (this.perMessageDeflate && null == this.perMessageDeflate.threshold) {\n\t this.perMessageDeflate.threshold = 1024;\n\t }\n\t\n\t // SSL options for Node.js client\n\t this.pfx = opts.pfx || null;\n\t this.key = opts.key || null;\n\t this.passphrase = opts.passphrase || null;\n\t this.cert = opts.cert || null;\n\t this.ca = opts.ca || null;\n\t this.ciphers = opts.ciphers || null;\n\t this.rejectUnauthorized = opts.rejectUnauthorized === undefined ? true : opts.rejectUnauthorized;\n\t this.forceNode = !!opts.forceNode;\n\t\n\t // other options for Node.js client\n\t var freeGlobal = typeof global === 'object' && global;\n\t if (freeGlobal.global === freeGlobal) {\n\t if (opts.extraHeaders && Object.keys(opts.extraHeaders).length > 0) {\n\t this.extraHeaders = opts.extraHeaders;\n\t }\n\t\n\t if (opts.localAddress) {\n\t this.localAddress = opts.localAddress;\n\t }\n\t }\n\t\n\t // set on handshake\n\t this.id = null;\n\t this.upgrades = null;\n\t this.pingInterval = null;\n\t this.pingTimeout = null;\n\t\n\t // set on heartbeat\n\t this.pingIntervalTimer = null;\n\t this.pingTimeoutTimer = null;\n\t\n\t this.open();\n\t}\n\t\n\tSocket.priorWebsocketSuccess = false;\n\t\n\t/**\n\t * Mix in `Emitter`.\n\t */\n\t\n\tEmitter(Socket.prototype);\n\t\n\t/**\n\t * Protocol version.\n\t *\n\t * @api public\n\t */\n\t\n\tSocket.protocol = parser.protocol; // this is an int\n\t\n\t/**\n\t * Expose deps for legacy compatibility\n\t * and standalone browser access.\n\t */\n\t\n\tSocket.Socket = Socket;\n\tSocket.Transport = __webpack_require__(38);\n\tSocket.transports = __webpack_require__(33);\n\tSocket.parser = __webpack_require__(39);\n\t\n\t/**\n\t * Creates transport of the given type.\n\t *\n\t * @param {String} transport name\n\t * @return {Transport}\n\t * @api private\n\t */\n\t\n\tSocket.prototype.createTransport = function (name) {\n\t debug('creating transport \"%s\"', name);\n\t var query = clone(this.query);\n\t\n\t // append engine.io protocol identifier\n\t query.EIO = parser.protocol;\n\t\n\t // transport name\n\t query.transport = name;\n\t\n\t // per-transport options\n\t var options = this.transportOptions[name] || {};\n\t\n\t // session id if we already have one\n\t if (this.id) query.sid = this.id;\n\t\n\t var transport = new transports[name]({\n\t query: query,\n\t socket: this,\n\t agent: options.agent || this.agent,\n\t hostname: options.hostname || this.hostname,\n\t port: options.port || this.port,\n\t secure: options.secure || this.secure,\n\t path: options.path || this.path,\n\t forceJSONP: options.forceJSONP || this.forceJSONP,\n\t jsonp: options.jsonp || this.jsonp,\n\t forceBase64: options.forceBase64 || this.forceBase64,\n\t enablesXDR: options.enablesXDR || this.enablesXDR,\n\t timestampRequests: options.timestampRequests || this.timestampRequests,\n\t timestampParam: options.timestampParam || this.timestampParam,\n\t policyPort: options.policyPort || this.policyPort,\n\t pfx: options.pfx || this.pfx,\n\t key: options.key || this.key,\n\t passphrase: options.passphrase || this.passphrase,\n\t cert: options.cert || this.cert,\n\t ca: options.ca || this.ca,\n\t ciphers: options.ciphers || this.ciphers,\n\t rejectUnauthorized: options.rejectUnauthorized || this.rejectUnauthorized,\n\t perMessageDeflate: options.perMessageDeflate || this.perMessageDeflate,\n\t extraHeaders: options.extraHeaders || this.extraHeaders,\n\t forceNode: options.forceNode || this.forceNode,\n\t localAddress: options.localAddress || this.localAddress,\n\t requestTimeout: options.requestTimeout || this.requestTimeout,\n\t protocols: options.protocols || void (0)\n\t });\n\t\n\t return transport;\n\t};\n\t\n\tfunction clone (obj) {\n\t var o = {};\n\t for (var i in obj) {\n\t if (obj.hasOwnProperty(i)) {\n\t o[i] = obj[i];\n\t }\n\t }\n\t return o;\n\t}\n\t\n\t/**\n\t * Initializes transport to use and starts probe.\n\t *\n\t * @api private\n\t */\n\tSocket.prototype.open = function () {\n\t var transport;\n\t if (this.rememberUpgrade && Socket.priorWebsocketSuccess && this.transports.indexOf('websocket') !== -1) {\n\t transport = 'websocket';\n\t } else if (0 === this.transports.length) {\n\t // Emit error on next tick so it can be listened to\n\t var self = this;\n\t setTimeout(function () {\n\t self.emit('error', 'No transports available');\n\t }, 0);\n\t return;\n\t } else {\n\t transport = this.transports[0];\n\t }\n\t this.readyState = 'opening';\n\t\n\t // Retry with the next transport if the transport is disabled (jsonp: false)\n\t try {\n\t transport = this.createTransport(transport);\n\t } catch (e) {\n\t this.transports.shift();\n\t this.open();\n\t return;\n\t }\n\t\n\t transport.open();\n\t this.setTransport(transport);\n\t};\n\t\n\t/**\n\t * Sets the current transport. Disables the existing one (if any).\n\t *\n\t * @api private\n\t */\n\t\n\tSocket.prototype.setTransport = function (transport) {\n\t debug('setting transport %s', transport.name);\n\t var self = this;\n\t\n\t if (this.transport) {\n\t debug('clearing existing transport %s', this.transport.name);\n\t this.transport.removeAllListeners();\n\t }\n\t\n\t // set up transport\n\t this.transport = transport;\n\t\n\t // set up transport listeners\n\t transport\n\t .on('drain', function () {\n\t self.onDrain();\n\t })\n\t .on('packet', function (packet) {\n\t self.onPacket(packet);\n\t })\n\t .on('error', function (e) {\n\t self.onError(e);\n\t })\n\t .on('close', function () {\n\t self.onClose('transport close');\n\t });\n\t};\n\t\n\t/**\n\t * Probes a transport.\n\t *\n\t * @param {String} transport name\n\t * @api private\n\t */\n\t\n\tSocket.prototype.probe = function (name) {\n\t debug('probing transport \"%s\"', name);\n\t var transport = this.createTransport(name, { probe: 1 });\n\t var failed = false;\n\t var self = this;\n\t\n\t Socket.priorWebsocketSuccess = false;\n\t\n\t function onTransportOpen () {\n\t if (self.onlyBinaryUpgrades) {\n\t var upgradeLosesBinary = !this.supportsBinary && self.transport.supportsBinary;\n\t failed = failed || upgradeLosesBinary;\n\t }\n\t if (failed) return;\n\t\n\t debug('probe transport \"%s\" opened', name);\n\t transport.send([{ type: 'ping', data: 'probe' }]);\n\t transport.once('packet', function (msg) {\n\t if (failed) return;\n\t if ('pong' === msg.type && 'probe' === msg.data) {\n\t debug('probe transport \"%s\" pong', name);\n\t self.upgrading = true;\n\t self.emit('upgrading', transport);\n\t if (!transport) return;\n\t Socket.priorWebsocketSuccess = 'websocket' === transport.name;\n\t\n\t debug('pausing current transport \"%s\"', self.transport.name);\n\t self.transport.pause(function () {\n\t if (failed) return;\n\t if ('closed' === self.readyState) return;\n\t debug('changing transport and sending upgrade packet');\n\t\n\t cleanup();\n\t\n\t self.setTransport(transport);\n\t transport.send([{ type: 'upgrade' }]);\n\t self.emit('upgrade', transport);\n\t transport = null;\n\t self.upgrading = false;\n\t self.flush();\n\t });\n\t } else {\n\t debug('probe transport \"%s\" failed', name);\n\t var err = new Error('probe error');\n\t err.transport = transport.name;\n\t self.emit('upgradeError', err);\n\t }\n\t });\n\t }\n\t\n\t function freezeTransport () {\n\t if (failed) return;\n\t\n\t // Any callback called by transport should be ignored since now\n\t failed = true;\n\t\n\t cleanup();\n\t\n\t transport.close();\n\t transport = null;\n\t }\n\t\n\t // Handle any error that happens while probing\n\t function onerror (err) {\n\t var error = new Error('probe error: ' + err);\n\t error.transport = transport.name;\n\t\n\t freezeTransport();\n\t\n\t debug('probe transport \"%s\" failed because of error: %s', name, err);\n\t\n\t self.emit('upgradeError', error);\n\t }\n\t\n\t function onTransportClose () {\n\t onerror('transport closed');\n\t }\n\t\n\t // When the socket is closed while we're probing\n\t function onclose () {\n\t onerror('socket closed');\n\t }\n\t\n\t // When the socket is upgraded while we're probing\n\t function onupgrade (to) {\n\t if (transport && to.name !== transport.name) {\n\t debug('\"%s\" works - aborting \"%s\"', to.name, transport.name);\n\t freezeTransport();\n\t }\n\t }\n\t\n\t // Remove all listeners on the transport and on self\n\t function cleanup () {\n\t transport.removeListener('open', onTransportOpen);\n\t transport.removeListener('error', onerror);\n\t transport.removeListener('close', onTransportClose);\n\t self.removeListener('close', onclose);\n\t self.removeListener('upgrading', onupgrade);\n\t }\n\t\n\t transport.once('open', onTransportOpen);\n\t transport.once('error', onerror);\n\t transport.once('close', onTransportClose);\n\t\n\t this.once('close', onclose);\n\t this.once('upgrading', onupgrade);\n\t\n\t transport.open();\n\t};\n\t\n\t/**\n\t * Called when connection is deemed open.\n\t *\n\t * @api public\n\t */\n\t\n\tSocket.prototype.onOpen = function () {\n\t debug('socket open');\n\t this.readyState = 'open';\n\t Socket.priorWebsocketSuccess = 'websocket' === this.transport.name;\n\t this.emit('open');\n\t this.flush();\n\t\n\t // we check for `readyState` in case an `open`\n\t // listener already closed the socket\n\t if ('open' === this.readyState && this.upgrade && this.transport.pause) {\n\t debug('starting upgrade probes');\n\t for (var i = 0, l = this.upgrades.length; i < l; i++) {\n\t this.probe(this.upgrades[i]);\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Handles a packet.\n\t *\n\t * @api private\n\t */\n\t\n\tSocket.prototype.onPacket = function (packet) {\n\t if ('opening' === this.readyState || 'open' === this.readyState ||\n\t 'closing' === this.readyState) {\n\t debug('socket receive: type \"%s\", data \"%s\"', packet.type, packet.data);\n\t\n\t this.emit('packet', packet);\n\t\n\t // Socket is live - any packet counts\n\t this.emit('heartbeat');\n\t\n\t switch (packet.type) {\n\t case 'open':\n\t this.onHandshake(JSON.parse(packet.data));\n\t break;\n\t\n\t case 'pong':\n\t this.setPing();\n\t this.emit('pong');\n\t break;\n\t\n\t case 'error':\n\t var err = new Error('server error');\n\t err.code = packet.data;\n\t this.onError(err);\n\t break;\n\t\n\t case 'message':\n\t this.emit('data', packet.data);\n\t this.emit('message', packet.data);\n\t break;\n\t }\n\t } else {\n\t debug('packet received with socket readyState \"%s\"', this.readyState);\n\t }\n\t};\n\t\n\t/**\n\t * Called upon handshake completion.\n\t *\n\t * @param {Object} handshake obj\n\t * @api private\n\t */\n\t\n\tSocket.prototype.onHandshake = function (data) {\n\t this.emit('handshake', data);\n\t this.id = data.sid;\n\t this.transport.query.sid = data.sid;\n\t this.upgrades = this.filterUpgrades(data.upgrades);\n\t this.pingInterval = data.pingInterval;\n\t this.pingTimeout = data.pingTimeout;\n\t this.onOpen();\n\t // In case open handler closes socket\n\t if ('closed' === this.readyState) return;\n\t this.setPing();\n\t\n\t // Prolong liveness of socket on heartbeat\n\t this.removeListener('heartbeat', this.onHeartbeat);\n\t this.on('heartbeat', this.onHeartbeat);\n\t};\n\t\n\t/**\n\t * Resets ping timeout.\n\t *\n\t * @api private\n\t */\n\t\n\tSocket.prototype.onHeartbeat = function (timeout) {\n\t clearTimeout(this.pingTimeoutTimer);\n\t var self = this;\n\t self.pingTimeoutTimer = setTimeout(function () {\n\t if ('closed' === self.readyState) return;\n\t self.onClose('ping timeout');\n\t }, timeout || (self.pingInterval + self.pingTimeout));\n\t};\n\t\n\t/**\n\t * Pings server every `this.pingInterval` and expects response\n\t * within `this.pingTimeout` or closes connection.\n\t *\n\t * @api private\n\t */\n\t\n\tSocket.prototype.setPing = function () {\n\t var self = this;\n\t clearTimeout(self.pingIntervalTimer);\n\t self.pingIntervalTimer = setTimeout(function () {\n\t debug('writing ping packet - expecting pong within %sms', self.pingTimeout);\n\t self.ping();\n\t self.onHeartbeat(self.pingTimeout);\n\t }, self.pingInterval);\n\t};\n\t\n\t/**\n\t* Sends a ping packet.\n\t*\n\t* @api private\n\t*/\n\t\n\tSocket.prototype.ping = function () {\n\t var self = this;\n\t this.sendPacket('ping', function () {\n\t self.emit('ping');\n\t });\n\t};\n\t\n\t/**\n\t * Called on `drain` event\n\t *\n\t * @api private\n\t */\n\t\n\tSocket.prototype.onDrain = function () {\n\t this.writeBuffer.splice(0, this.prevBufferLen);\n\t\n\t // setting prevBufferLen = 0 is very important\n\t // for example, when upgrading, upgrade packet is sent over,\n\t // and a nonzero prevBufferLen could cause problems on `drain`\n\t this.prevBufferLen = 0;\n\t\n\t if (0 === this.writeBuffer.length) {\n\t this.emit('drain');\n\t } else {\n\t this.flush();\n\t }\n\t};\n\t\n\t/**\n\t * Flush write buffers.\n\t *\n\t * @api private\n\t */\n\t\n\tSocket.prototype.flush = function () {\n\t if ('closed' !== this.readyState && this.transport.writable &&\n\t !this.upgrading && this.writeBuffer.length) {\n\t debug('flushing %d packets in socket', this.writeBuffer.length);\n\t this.transport.send(this.writeBuffer);\n\t // keep track of current length of writeBuffer\n\t // splice writeBuffer and callbackBuffer on `drain`\n\t this.prevBufferLen = this.writeBuffer.length;\n\t this.emit('flush');\n\t }\n\t};\n\t\n\t/**\n\t * Sends a message.\n\t *\n\t * @param {String} message.\n\t * @param {Function} callback function.\n\t * @param {Object} options.\n\t * @return {Socket} for chaining.\n\t * @api public\n\t */\n\t\n\tSocket.prototype.write =\n\tSocket.prototype.send = function (msg, options, fn) {\n\t this.sendPacket('message', msg, options, fn);\n\t return this;\n\t};\n\t\n\t/**\n\t * Sends a packet.\n\t *\n\t * @param {String} packet type.\n\t * @param {String} data.\n\t * @param {Object} options.\n\t * @param {Function} callback function.\n\t * @api private\n\t */\n\t\n\tSocket.prototype.sendPacket = function (type, data, options, fn) {\n\t if ('function' === typeof data) {\n\t fn = data;\n\t data = undefined;\n\t }\n\t\n\t if ('function' === typeof options) {\n\t fn = options;\n\t options = null;\n\t }\n\t\n\t if ('closing' === this.readyState || 'closed' === this.readyState) {\n\t return;\n\t }\n\t\n\t options = options || {};\n\t options.compress = false !== options.compress;\n\t\n\t var packet = {\n\t type: type,\n\t data: data,\n\t options: options\n\t };\n\t this.emit('packetCreate', packet);\n\t this.writeBuffer.push(packet);\n\t if (fn) this.once('flush', fn);\n\t this.flush();\n\t};\n\t\n\t/**\n\t * Closes the connection.\n\t *\n\t * @api private\n\t */\n\t\n\tSocket.prototype.close = function () {\n\t if ('opening' === this.readyState || 'open' === this.readyState) {\n\t this.readyState = 'closing';\n\t\n\t var self = this;\n\t\n\t if (this.writeBuffer.length) {\n\t this.once('drain', function () {\n\t if (this.upgrading) {\n\t waitForUpgrade();\n\t } else {\n\t close();\n\t }\n\t });\n\t } else if (this.upgrading) {\n\t waitForUpgrade();\n\t } else {\n\t close();\n\t }\n\t }\n\t\n\t function close () {\n\t self.onClose('forced close');\n\t debug('socket closing - telling transport to close');\n\t self.transport.close();\n\t }\n\t\n\t function cleanupAndClose () {\n\t self.removeListener('upgrade', cleanupAndClose);\n\t self.removeListener('upgradeError', cleanupAndClose);\n\t close();\n\t }\n\t\n\t function waitForUpgrade () {\n\t // wait for upgrade to finish since we can't send packets while pausing a transport\n\t self.once('upgrade', cleanupAndClose);\n\t self.once('upgradeError', cleanupAndClose);\n\t }\n\t\n\t return this;\n\t};\n\t\n\t/**\n\t * Called upon transport error\n\t *\n\t * @api private\n\t */\n\t\n\tSocket.prototype.onError = function (err) {\n\t debug('socket error %j', err);\n\t Socket.priorWebsocketSuccess = false;\n\t this.emit('error', err);\n\t this.onClose('transport error', err);\n\t};\n\t\n\t/**\n\t * Called upon transport close.\n\t *\n\t * @api private\n\t */\n\t\n\tSocket.prototype.onClose = function (reason, desc) {\n\t if ('opening' === this.readyState || 'open' === this.readyState || 'closing' === this.readyState) {\n\t debug('socket close with reason: \"%s\"', reason);\n\t var self = this;\n\t\n\t // clear timers\n\t clearTimeout(this.pingIntervalTimer);\n\t clearTimeout(this.pingTimeoutTimer);\n\t\n\t // stop event from firing again for transport\n\t this.transport.removeAllListeners('close');\n\t\n\t // ensure transport won't stay open\n\t this.transport.close();\n\t\n\t // ignore further transport communication\n\t this.transport.removeAllListeners();\n\t\n\t // set ready state\n\t this.readyState = 'closed';\n\t\n\t // clear session id\n\t this.id = null;\n\t\n\t // emit close event\n\t this.emit('close', reason, desc);\n\t\n\t // clean buffers after, so users can still\n\t // grab the buffers on `close` event\n\t self.writeBuffer = [];\n\t self.prevBufferLen = 0;\n\t }\n\t};\n\t\n\t/**\n\t * Filters upgrades, returning only those matching client transports.\n\t *\n\t * @param {Array} server upgrades\n\t * @api private\n\t *\n\t */\n\t\n\tSocket.prototype.filterUpgrades = function (upgrades) {\n\t var filteredUpgrades = [];\n\t for (var i = 0, j = upgrades.length; i < j; i++) {\n\t if (~index(this.transports, upgrades[i])) filteredUpgrades.push(upgrades[i]);\n\t }\n\t return filteredUpgrades;\n\t};\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 33 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {/**\n\t * Module dependencies\n\t */\n\t\n\tvar XMLHttpRequest = __webpack_require__(34);\n\tvar XHR = __webpack_require__(36);\n\tvar JSONP = __webpack_require__(53);\n\tvar websocket = __webpack_require__(54);\n\t\n\t/**\n\t * Export transports.\n\t */\n\t\n\texports.polling = polling;\n\texports.websocket = websocket;\n\t\n\t/**\n\t * Polling transport polymorphic constructor.\n\t * Decides on xhr vs jsonp based on feature detection.\n\t *\n\t * @api private\n\t */\n\t\n\tfunction polling (opts) {\n\t var xhr;\n\t var xd = false;\n\t var xs = false;\n\t var jsonp = false !== opts.jsonp;\n\t\n\t if (global.location) {\n\t var isSSL = 'https:' === location.protocol;\n\t var port = location.port;\n\t\n\t // some user agents have empty `location.port`\n\t if (!port) {\n\t port = isSSL ? 443 : 80;\n\t }\n\t\n\t xd = opts.hostname !== location.hostname || port !== opts.port;\n\t xs = opts.secure !== isSSL;\n\t }\n\t\n\t opts.xdomain = xd;\n\t opts.xscheme = xs;\n\t xhr = new XMLHttpRequest(opts);\n\t\n\t if ('open' in xhr && !opts.forceJSONP) {\n\t return new XHR(opts);\n\t } else {\n\t if (!jsonp) throw new Error('JSONP disabled');\n\t return new JSONP(opts);\n\t }\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 34 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {// browser shim for xmlhttprequest module\n\t\n\tvar hasCORS = __webpack_require__(35);\n\t\n\tmodule.exports = function (opts) {\n\t var xdomain = opts.xdomain;\n\t\n\t // scheme must be same when usign XDomainRequest\n\t // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\t var xscheme = opts.xscheme;\n\t\n\t // XDomainRequest has a flow of not sending cookie, therefore it should be disabled as a default.\n\t // https://github.com/Automattic/engine.io-client/pull/217\n\t var enablesXDR = opts.enablesXDR;\n\t\n\t // XMLHttpRequest can be disabled on IE\n\t try {\n\t if ('undefined' !== typeof XMLHttpRequest && (!xdomain || hasCORS)) {\n\t return new XMLHttpRequest();\n\t }\n\t } catch (e) { }\n\t\n\t // Use XDomainRequest for IE8 if enablesXDR is true\n\t // because loading bar keeps flashing when using jsonp-polling\n\t // https://github.com/yujiosaka/socke.io-ie8-loading-example\n\t try {\n\t if ('undefined' !== typeof XDomainRequest && !xscheme && enablesXDR) {\n\t return new XDomainRequest();\n\t }\n\t } catch (e) { }\n\t\n\t if (!xdomain) {\n\t try {\n\t return new global[['Active'].concat('Object').join('X')]('Microsoft.XMLHTTP');\n\t } catch (e) { }\n\t }\n\t};\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 35 */\n/***/ function(module, exports) {\n\n\t\n\t/**\n\t * Module exports.\n\t *\n\t * Logic borrowed from Modernizr:\n\t *\n\t * - https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cors.js\n\t */\n\t\n\ttry {\n\t module.exports = typeof XMLHttpRequest !== 'undefined' &&\n\t 'withCredentials' in new XMLHttpRequest();\n\t} catch (err) {\n\t // if XMLHttp support is disabled in IE then it will throw\n\t // when trying to create\n\t module.exports = false;\n\t}\n\n\n/***/ },\n/* 36 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {/**\n\t * Module requirements.\n\t */\n\t\n\tvar XMLHttpRequest = __webpack_require__(34);\n\tvar Polling = __webpack_require__(37);\n\tvar Emitter = __webpack_require__(24);\n\tvar inherit = __webpack_require__(48);\n\tvar debug = __webpack_require__(50)('engine.io-client:polling-xhr');\n\t\n\t/**\n\t * Module exports.\n\t */\n\t\n\tmodule.exports = XHR;\n\tmodule.exports.Request = Request;\n\t\n\t/**\n\t * Empty function\n\t */\n\t\n\tfunction empty () {}\n\t\n\t/**\n\t * XHR Polling constructor.\n\t *\n\t * @param {Object} opts\n\t * @api public\n\t */\n\t\n\tfunction XHR (opts) {\n\t Polling.call(this, opts);\n\t this.requestTimeout = opts.requestTimeout;\n\t this.extraHeaders = opts.extraHeaders;\n\t\n\t if (global.location) {\n\t var isSSL = 'https:' === location.protocol;\n\t var port = location.port;\n\t\n\t // some user agents have empty `location.port`\n\t if (!port) {\n\t port = isSSL ? 443 : 80;\n\t }\n\t\n\t this.xd = opts.hostname !== global.location.hostname ||\n\t port !== opts.port;\n\t this.xs = opts.secure !== isSSL;\n\t }\n\t}\n\t\n\t/**\n\t * Inherits from Polling.\n\t */\n\t\n\tinherit(XHR, Polling);\n\t\n\t/**\n\t * XHR supports binary\n\t */\n\t\n\tXHR.prototype.supportsBinary = true;\n\t\n\t/**\n\t * Creates a request.\n\t *\n\t * @param {String} method\n\t * @api private\n\t */\n\t\n\tXHR.prototype.request = function (opts) {\n\t opts = opts || {};\n\t opts.uri = this.uri();\n\t opts.xd = this.xd;\n\t opts.xs = this.xs;\n\t opts.agent = this.agent || false;\n\t opts.supportsBinary = this.supportsBinary;\n\t opts.enablesXDR = this.enablesXDR;\n\t\n\t // SSL options for Node.js client\n\t opts.pfx = this.pfx;\n\t opts.key = this.key;\n\t opts.passphrase = this.passphrase;\n\t opts.cert = this.cert;\n\t opts.ca = this.ca;\n\t opts.ciphers = this.ciphers;\n\t opts.rejectUnauthorized = this.rejectUnauthorized;\n\t opts.requestTimeout = this.requestTimeout;\n\t\n\t // other options for Node.js client\n\t opts.extraHeaders = this.extraHeaders;\n\t\n\t return new Request(opts);\n\t};\n\t\n\t/**\n\t * Sends data.\n\t *\n\t * @param {String} data to send.\n\t * @param {Function} called upon flush.\n\t * @api private\n\t */\n\t\n\tXHR.prototype.doWrite = function (data, fn) {\n\t var isBinary = typeof data !== 'string' && data !== undefined;\n\t var req = this.request({ method: 'POST', data: data, isBinary: isBinary });\n\t var self = this;\n\t req.on('success', fn);\n\t req.on('error', function (err) {\n\t self.onError('xhr post error', err);\n\t });\n\t this.sendXhr = req;\n\t};\n\t\n\t/**\n\t * Starts a poll cycle.\n\t *\n\t * @api private\n\t */\n\t\n\tXHR.prototype.doPoll = function () {\n\t debug('xhr poll');\n\t var req = this.request();\n\t var self = this;\n\t req.on('data', function (data) {\n\t self.onData(data);\n\t });\n\t req.on('error', function (err) {\n\t self.onError('xhr poll error', err);\n\t });\n\t this.pollXhr = req;\n\t};\n\t\n\t/**\n\t * Request constructor\n\t *\n\t * @param {Object} options\n\t * @api public\n\t */\n\t\n\tfunction Request (opts) {\n\t this.method = opts.method || 'GET';\n\t this.uri = opts.uri;\n\t this.xd = !!opts.xd;\n\t this.xs = !!opts.xs;\n\t this.async = false !== opts.async;\n\t this.data = undefined !== opts.data ? opts.data : null;\n\t this.agent = opts.agent;\n\t this.isBinary = opts.isBinary;\n\t this.supportsBinary = opts.supportsBinary;\n\t this.enablesXDR = opts.enablesXDR;\n\t this.requestTimeout = opts.requestTimeout;\n\t\n\t // SSL options for Node.js client\n\t this.pfx = opts.pfx;\n\t this.key = opts.key;\n\t this.passphrase = opts.passphrase;\n\t this.cert = opts.cert;\n\t this.ca = opts.ca;\n\t this.ciphers = opts.ciphers;\n\t this.rejectUnauthorized = opts.rejectUnauthorized;\n\t\n\t // other options for Node.js client\n\t this.extraHeaders = opts.extraHeaders;\n\t\n\t this.create();\n\t}\n\t\n\t/**\n\t * Mix in `Emitter`.\n\t */\n\t\n\tEmitter(Request.prototype);\n\t\n\t/**\n\t * Creates the XHR object and sends the request.\n\t *\n\t * @api private\n\t */\n\t\n\tRequest.prototype.create = function () {\n\t var opts = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR };\n\t\n\t // SSL options for Node.js client\n\t opts.pfx = this.pfx;\n\t opts.key = this.key;\n\t opts.passphrase = this.passphrase;\n\t opts.cert = this.cert;\n\t opts.ca = this.ca;\n\t opts.ciphers = this.ciphers;\n\t opts.rejectUnauthorized = this.rejectUnauthorized;\n\t\n\t var xhr = this.xhr = new XMLHttpRequest(opts);\n\t var self = this;\n\t\n\t try {\n\t debug('xhr open %s: %s', this.method, this.uri);\n\t xhr.open(this.method, this.uri, this.async);\n\t try {\n\t if (this.extraHeaders) {\n\t xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n\t for (var i in this.extraHeaders) {\n\t if (this.extraHeaders.hasOwnProperty(i)) {\n\t xhr.setRequestHeader(i, this.extraHeaders[i]);\n\t }\n\t }\n\t }\n\t } catch (e) {}\n\t\n\t if ('POST' === this.method) {\n\t try {\n\t if (this.isBinary) {\n\t xhr.setRequestHeader('Content-type', 'application/octet-stream');\n\t } else {\n\t xhr.setRequestHeader('Content-type', 'text/plain;charset=UTF-8');\n\t }\n\t } catch (e) {}\n\t }\n\t\n\t try {\n\t xhr.setRequestHeader('Accept', '*/*');\n\t } catch (e) {}\n\t\n\t // ie6 check\n\t if ('withCredentials' in xhr) {\n\t xhr.withCredentials = true;\n\t }\n\t\n\t if (this.requestTimeout) {\n\t xhr.timeout = this.requestTimeout;\n\t }\n\t\n\t if (this.hasXDR()) {\n\t xhr.onload = function () {\n\t self.onLoad();\n\t };\n\t xhr.onerror = function () {\n\t self.onError(xhr.responseText);\n\t };\n\t } else {\n\t xhr.onreadystatechange = function () {\n\t if (xhr.readyState === 2) {\n\t var contentType;\n\t try {\n\t contentType = xhr.getResponseHeader('Content-Type');\n\t } catch (e) {}\n\t if (contentType === 'application/octet-stream') {\n\t xhr.responseType = 'arraybuffer';\n\t }\n\t }\n\t if (4 !== xhr.readyState) return;\n\t if (200 === xhr.status || 1223 === xhr.status) {\n\t self.onLoad();\n\t } else {\n\t // make sure the `error` event handler that's user-set\n\t // does not throw in the same tick and gets caught here\n\t setTimeout(function () {\n\t self.onError(xhr.status);\n\t }, 0);\n\t }\n\t };\n\t }\n\t\n\t debug('xhr data %s', this.data);\n\t xhr.send(this.data);\n\t } catch (e) {\n\t // Need to defer since .create() is called directly fhrom the constructor\n\t // and thus the 'error' event can only be only bound *after* this exception\n\t // occurs. Therefore, also, we cannot throw here at all.\n\t setTimeout(function () {\n\t self.onError(e);\n\t }, 0);\n\t return;\n\t }\n\t\n\t if (global.document) {\n\t this.index = Request.requestsCount++;\n\t Request.requests[this.index] = this;\n\t }\n\t};\n\t\n\t/**\n\t * Called upon successful response.\n\t *\n\t * @api private\n\t */\n\t\n\tRequest.prototype.onSuccess = function () {\n\t this.emit('success');\n\t this.cleanup();\n\t};\n\t\n\t/**\n\t * Called if we have data.\n\t *\n\t * @api private\n\t */\n\t\n\tRequest.prototype.onData = function (data) {\n\t this.emit('data', data);\n\t this.onSuccess();\n\t};\n\t\n\t/**\n\t * Called upon error.\n\t *\n\t * @api private\n\t */\n\t\n\tRequest.prototype.onError = function (err) {\n\t this.emit('error', err);\n\t this.cleanup(true);\n\t};\n\t\n\t/**\n\t * Cleans up house.\n\t *\n\t * @api private\n\t */\n\t\n\tRequest.prototype.cleanup = function (fromError) {\n\t if ('undefined' === typeof this.xhr || null === this.xhr) {\n\t return;\n\t }\n\t // xmlhttprequest\n\t if (this.hasXDR()) {\n\t this.xhr.onload = this.xhr.onerror = empty;\n\t } else {\n\t this.xhr.onreadystatechange = empty;\n\t }\n\t\n\t if (fromError) {\n\t try {\n\t this.xhr.abort();\n\t } catch (e) {}\n\t }\n\t\n\t if (global.document) {\n\t delete Request.requests[this.index];\n\t }\n\t\n\t this.xhr = null;\n\t};\n\t\n\t/**\n\t * Called upon load.\n\t *\n\t * @api private\n\t */\n\t\n\tRequest.prototype.onLoad = function () {\n\t var data;\n\t try {\n\t var contentType;\n\t try {\n\t contentType = this.xhr.getResponseHeader('Content-Type');\n\t } catch (e) {}\n\t if (contentType === 'application/octet-stream') {\n\t data = this.xhr.response || this.xhr.responseText;\n\t } else {\n\t data = this.xhr.responseText;\n\t }\n\t } catch (e) {\n\t this.onError(e);\n\t }\n\t if (null != data) {\n\t this.onData(data);\n\t }\n\t};\n\t\n\t/**\n\t * Check if it has XDomainRequest.\n\t *\n\t * @api private\n\t */\n\t\n\tRequest.prototype.hasXDR = function () {\n\t return 'undefined' !== typeof global.XDomainRequest && !this.xs && this.enablesXDR;\n\t};\n\t\n\t/**\n\t * Aborts the request.\n\t *\n\t * @api public\n\t */\n\t\n\tRequest.prototype.abort = function () {\n\t this.cleanup();\n\t};\n\t\n\t/**\n\t * Aborts pending requests when unloading the window. This is needed to prevent\n\t * memory leaks (e.g. when using IE) and to ensure that no spurious error is\n\t * emitted.\n\t */\n\t\n\tRequest.requestsCount = 0;\n\tRequest.requests = {};\n\t\n\tif (global.document) {\n\t if (global.attachEvent) {\n\t global.attachEvent('onunload', unloadHandler);\n\t } else if (global.addEventListener) {\n\t global.addEventListener('beforeunload', unloadHandler, false);\n\t }\n\t}\n\t\n\tfunction unloadHandler () {\n\t for (var i in Request.requests) {\n\t if (Request.requests.hasOwnProperty(i)) {\n\t Request.requests[i].abort();\n\t }\n\t }\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 37 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\n\t * Module dependencies.\n\t */\n\t\n\tvar Transport = __webpack_require__(38);\n\tvar parseqs = __webpack_require__(47);\n\tvar parser = __webpack_require__(39);\n\tvar inherit = __webpack_require__(48);\n\tvar yeast = __webpack_require__(49);\n\tvar debug = __webpack_require__(50)('engine.io-client:polling');\n\t\n\t/**\n\t * Module exports.\n\t */\n\t\n\tmodule.exports = Polling;\n\t\n\t/**\n\t * Is XHR2 supported?\n\t */\n\t\n\tvar hasXHR2 = (function () {\n\t var XMLHttpRequest = __webpack_require__(34);\n\t var xhr = new XMLHttpRequest({ xdomain: false });\n\t return null != xhr.responseType;\n\t})();\n\t\n\t/**\n\t * Polling interface.\n\t *\n\t * @param {Object} opts\n\t * @api private\n\t */\n\t\n\tfunction Polling (opts) {\n\t var forceBase64 = (opts && opts.forceBase64);\n\t if (!hasXHR2 || forceBase64) {\n\t this.supportsBinary = false;\n\t }\n\t Transport.call(this, opts);\n\t}\n\t\n\t/**\n\t * Inherits from Transport.\n\t */\n\t\n\tinherit(Polling, Transport);\n\t\n\t/**\n\t * Transport name.\n\t */\n\t\n\tPolling.prototype.name = 'polling';\n\t\n\t/**\n\t * Opens the socket (triggers polling). We write a PING message to determine\n\t * when the transport is open.\n\t *\n\t * @api private\n\t */\n\t\n\tPolling.prototype.doOpen = function () {\n\t this.poll();\n\t};\n\t\n\t/**\n\t * Pauses polling.\n\t *\n\t * @param {Function} callback upon buffers are flushed and transport is paused\n\t * @api private\n\t */\n\t\n\tPolling.prototype.pause = function (onPause) {\n\t var self = this;\n\t\n\t this.readyState = 'pausing';\n\t\n\t function pause () {\n\t debug('paused');\n\t self.readyState = 'paused';\n\t onPause();\n\t }\n\t\n\t if (this.polling || !this.writable) {\n\t var total = 0;\n\t\n\t if (this.polling) {\n\t debug('we are currently polling - waiting to pause');\n\t total++;\n\t this.once('pollComplete', function () {\n\t debug('pre-pause polling complete');\n\t --total || pause();\n\t });\n\t }\n\t\n\t if (!this.writable) {\n\t debug('we are currently writing - waiting to pause');\n\t total++;\n\t this.once('drain', function () {\n\t debug('pre-pause writing complete');\n\t --total || pause();\n\t });\n\t }\n\t } else {\n\t pause();\n\t }\n\t};\n\t\n\t/**\n\t * Starts polling cycle.\n\t *\n\t * @api public\n\t */\n\t\n\tPolling.prototype.poll = function () {\n\t debug('polling');\n\t this.polling = true;\n\t this.doPoll();\n\t this.emit('poll');\n\t};\n\t\n\t/**\n\t * Overloads onData to detect payloads.\n\t *\n\t * @api private\n\t */\n\t\n\tPolling.prototype.onData = function (data) {\n\t var self = this;\n\t debug('polling got data %s', data);\n\t var callback = function (packet, index, total) {\n\t // if its the first message we consider the transport open\n\t if ('opening' === self.readyState) {\n\t self.onOpen();\n\t }\n\t\n\t // if its a close packet, we close the ongoing requests\n\t if ('close' === packet.type) {\n\t self.onClose();\n\t return false;\n\t }\n\t\n\t // otherwise bypass onData and handle the message\n\t self.onPacket(packet);\n\t };\n\t\n\t // decode payload\n\t parser.decodePayload(data, this.socket.binaryType, callback);\n\t\n\t // if an event did not trigger closing\n\t if ('closed' !== this.readyState) {\n\t // if we got data we're not polling\n\t this.polling = false;\n\t this.emit('pollComplete');\n\t\n\t if ('open' === this.readyState) {\n\t this.poll();\n\t } else {\n\t debug('ignoring poll - transport state \"%s\"', this.readyState);\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * For polling, send a close packet.\n\t *\n\t * @api private\n\t */\n\t\n\tPolling.prototype.doClose = function () {\n\t var self = this;\n\t\n\t function close () {\n\t debug('writing close packet');\n\t self.write([{ type: 'close' }]);\n\t }\n\t\n\t if ('open' === this.readyState) {\n\t debug('transport open - closing');\n\t close();\n\t } else {\n\t // in case we're trying to close while\n\t // handshaking is in progress (GH-164)\n\t debug('transport not open - deferring close');\n\t this.once('open', close);\n\t }\n\t};\n\t\n\t/**\n\t * Writes a packets payload.\n\t *\n\t * @param {Array} data packets\n\t * @param {Function} drain callback\n\t * @api private\n\t */\n\t\n\tPolling.prototype.write = function (packets) {\n\t var self = this;\n\t this.writable = false;\n\t var callbackfn = function () {\n\t self.writable = true;\n\t self.emit('drain');\n\t };\n\t\n\t parser.encodePayload(packets, this.supportsBinary, function (data) {\n\t self.doWrite(data, callbackfn);\n\t });\n\t};\n\t\n\t/**\n\t * Generates uri for connection.\n\t *\n\t * @api private\n\t */\n\t\n\tPolling.prototype.uri = function () {\n\t var query = this.query || {};\n\t var schema = this.secure ? 'https' : 'http';\n\t var port = '';\n\t\n\t // cache busting is forced\n\t if (false !== this.timestampRequests) {\n\t query[this.timestampParam] = yeast();\n\t }\n\t\n\t if (!this.supportsBinary && !query.sid) {\n\t query.b64 = 1;\n\t }\n\t\n\t query = parseqs.encode(query);\n\t\n\t // avoid port if default for schema\n\t if (this.port && (('https' === schema && Number(this.port) !== 443) ||\n\t ('http' === schema && Number(this.port) !== 80))) {\n\t port = ':' + this.port;\n\t }\n\t\n\t // prepend ? to query\n\t if (query.length) {\n\t query = '?' + query;\n\t }\n\t\n\t var ipv6 = this.hostname.indexOf(':') !== -1;\n\t return schema + '://' + (ipv6 ? '[' + this.hostname + ']' : this.hostname) + port + this.path + query;\n\t};\n\n\n/***/ },\n/* 38 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\n\t * Module dependencies.\n\t */\n\t\n\tvar parser = __webpack_require__(39);\n\tvar Emitter = __webpack_require__(24);\n\t\n\t/**\n\t * Module exports.\n\t */\n\t\n\tmodule.exports = Transport;\n\t\n\t/**\n\t * Transport abstract constructor.\n\t *\n\t * @param {Object} options.\n\t * @api private\n\t */\n\t\n\tfunction Transport (opts) {\n\t this.path = opts.path;\n\t this.hostname = opts.hostname;\n\t this.port = opts.port;\n\t this.secure = opts.secure;\n\t this.query = opts.query;\n\t this.timestampParam = opts.timestampParam;\n\t this.timestampRequests = opts.timestampRequests;\n\t this.readyState = '';\n\t this.agent = opts.agent || false;\n\t this.socket = opts.socket;\n\t this.enablesXDR = opts.enablesXDR;\n\t\n\t // SSL options for Node.js client\n\t this.pfx = opts.pfx;\n\t this.key = opts.key;\n\t this.passphrase = opts.passphrase;\n\t this.cert = opts.cert;\n\t this.ca = opts.ca;\n\t this.ciphers = opts.ciphers;\n\t this.rejectUnauthorized = opts.rejectUnauthorized;\n\t this.forceNode = opts.forceNode;\n\t\n\t // other options for Node.js client\n\t this.extraHeaders = opts.extraHeaders;\n\t this.localAddress = opts.localAddress;\n\t}\n\t\n\t/**\n\t * Mix in `Emitter`.\n\t */\n\t\n\tEmitter(Transport.prototype);\n\t\n\t/**\n\t * Emits an error.\n\t *\n\t * @param {String} str\n\t * @return {Transport} for chaining\n\t * @api public\n\t */\n\t\n\tTransport.prototype.onError = function (msg, desc) {\n\t var err = new Error(msg);\n\t err.type = 'TransportError';\n\t err.description = desc;\n\t this.emit('error', err);\n\t return this;\n\t};\n\t\n\t/**\n\t * Opens the transport.\n\t *\n\t * @api public\n\t */\n\t\n\tTransport.prototype.open = function () {\n\t if ('closed' === this.readyState || '' === this.readyState) {\n\t this.readyState = 'opening';\n\t this.doOpen();\n\t }\n\t\n\t return this;\n\t};\n\t\n\t/**\n\t * Closes the transport.\n\t *\n\t * @api private\n\t */\n\t\n\tTransport.prototype.close = function () {\n\t if ('opening' === this.readyState || 'open' === this.readyState) {\n\t this.doClose();\n\t this.onClose();\n\t }\n\t\n\t return this;\n\t};\n\t\n\t/**\n\t * Sends multiple packets.\n\t *\n\t * @param {Array} packets\n\t * @api private\n\t */\n\t\n\tTransport.prototype.send = function (packets) {\n\t if ('open' === this.readyState) {\n\t this.write(packets);\n\t } else {\n\t throw new Error('Transport not open');\n\t }\n\t};\n\t\n\t/**\n\t * Called upon open\n\t *\n\t * @api private\n\t */\n\t\n\tTransport.prototype.onOpen = function () {\n\t this.readyState = 'open';\n\t this.writable = true;\n\t this.emit('open');\n\t};\n\t\n\t/**\n\t * Called with data.\n\t *\n\t * @param {String} data\n\t * @api private\n\t */\n\t\n\tTransport.prototype.onData = function (data) {\n\t var packet = parser.decodePacket(data, this.socket.binaryType);\n\t this.onPacket(packet);\n\t};\n\t\n\t/**\n\t * Called with a decoded packet.\n\t */\n\t\n\tTransport.prototype.onPacket = function (packet) {\n\t this.emit('packet', packet);\n\t};\n\t\n\t/**\n\t * Called upon close.\n\t *\n\t * @api private\n\t */\n\t\n\tTransport.prototype.onClose = function () {\n\t this.readyState = 'closed';\n\t this.emit('close');\n\t};\n\n\n/***/ },\n/* 39 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {/**\n\t * Module dependencies.\n\t */\n\t\n\tvar keys = __webpack_require__(40);\n\tvar hasBinary = __webpack_require__(25);\n\tvar sliceBuffer = __webpack_require__(41);\n\tvar after = __webpack_require__(42);\n\tvar utf8 = __webpack_require__(43);\n\t\n\tvar base64encoder;\n\tif (global && global.ArrayBuffer) {\n\t base64encoder = __webpack_require__(45);\n\t}\n\t\n\t/**\n\t * Check if we are running an android browser. That requires us to use\n\t * ArrayBuffer with polling transports...\n\t *\n\t * http://ghinda.net/jpeg-blob-ajax-android/\n\t */\n\t\n\tvar isAndroid = typeof navigator !== 'undefined' && /Android/i.test(navigator.userAgent);\n\t\n\t/**\n\t * Check if we are running in PhantomJS.\n\t * Uploading a Blob with PhantomJS does not work correctly, as reported here:\n\t * https://github.com/ariya/phantomjs/issues/11395\n\t * @type boolean\n\t */\n\tvar isPhantomJS = typeof navigator !== 'undefined' && /PhantomJS/i.test(navigator.userAgent);\n\t\n\t/**\n\t * When true, avoids using Blobs to encode payloads.\n\t * @type boolean\n\t */\n\tvar dontSendBlobs = isAndroid || isPhantomJS;\n\t\n\t/**\n\t * Current protocol version.\n\t */\n\t\n\texports.protocol = 3;\n\t\n\t/**\n\t * Packet types.\n\t */\n\t\n\tvar packets = exports.packets = {\n\t open: 0 // non-ws\n\t , close: 1 // non-ws\n\t , ping: 2\n\t , pong: 3\n\t , message: 4\n\t , upgrade: 5\n\t , noop: 6\n\t};\n\t\n\tvar packetslist = keys(packets);\n\t\n\t/**\n\t * Premade error packet.\n\t */\n\t\n\tvar err = { type: 'error', data: 'parser error' };\n\t\n\t/**\n\t * Create a blob api even for blob builder when vendor prefixes exist\n\t */\n\t\n\tvar Blob = __webpack_require__(46);\n\t\n\t/**\n\t * Encodes a packet.\n\t *\n\t * <packet type id> [ <data> ]\n\t *\n\t * Example:\n\t *\n\t * 5hello world\n\t * 3\n\t * 4\n\t *\n\t * Binary is encoded in an identical principle\n\t *\n\t * @api private\n\t */\n\t\n\texports.encodePacket = function (packet, supportsBinary, utf8encode, callback) {\n\t if (typeof supportsBinary === 'function') {\n\t callback = supportsBinary;\n\t supportsBinary = false;\n\t }\n\t\n\t if (typeof utf8encode === 'function') {\n\t callback = utf8encode;\n\t utf8encode = null;\n\t }\n\t\n\t var data = (packet.data === undefined)\n\t ? undefined\n\t : packet.data.buffer || packet.data;\n\t\n\t if (global.ArrayBuffer && data instanceof ArrayBuffer) {\n\t return encodeArrayBuffer(packet, supportsBinary, callback);\n\t } else if (Blob && data instanceof global.Blob) {\n\t return encodeBlob(packet, supportsBinary, callback);\n\t }\n\t\n\t // might be an object with { base64: true, data: dataAsBase64String }\n\t if (data && data.base64) {\n\t return encodeBase64Object(packet, callback);\n\t }\n\t\n\t // Sending data as a utf-8 string\n\t var encoded = packets[packet.type];\n\t\n\t // data fragment is optional\n\t if (undefined !== packet.data) {\n\t encoded += utf8encode ? utf8.encode(String(packet.data), { strict: false }) : String(packet.data);\n\t }\n\t\n\t return callback('' + encoded);\n\t\n\t};\n\t\n\tfunction encodeBase64Object(packet, callback) {\n\t // packet data is an object { base64: true, data: dataAsBase64String }\n\t var message = 'b' + exports.packets[packet.type] + packet.data.data;\n\t return callback(message);\n\t}\n\t\n\t/**\n\t * Encode packet helpers for binary types\n\t */\n\t\n\tfunction encodeArrayBuffer(packet, supportsBinary, callback) {\n\t if (!supportsBinary) {\n\t return exports.encodeBase64Packet(packet, callback);\n\t }\n\t\n\t var data = packet.data;\n\t var contentArray = new Uint8Array(data);\n\t var resultBuffer = new Uint8Array(1 + data.byteLength);\n\t\n\t resultBuffer[0] = packets[packet.type];\n\t for (var i = 0; i < contentArray.length; i++) {\n\t resultBuffer[i+1] = contentArray[i];\n\t }\n\t\n\t return callback(resultBuffer.buffer);\n\t}\n\t\n\tfunction encodeBlobAsArrayBuffer(packet, supportsBinary, callback) {\n\t if (!supportsBinary) {\n\t return exports.encodeBase64Packet(packet, callback);\n\t }\n\t\n\t var fr = new FileReader();\n\t fr.onload = function() {\n\t packet.data = fr.result;\n\t exports.encodePacket(packet, supportsBinary, true, callback);\n\t };\n\t return fr.readAsArrayBuffer(packet.data);\n\t}\n\t\n\tfunction encodeBlob(packet, supportsBinary, callback) {\n\t if (!supportsBinary) {\n\t return exports.encodeBase64Packet(packet, callback);\n\t }\n\t\n\t if (dontSendBlobs) {\n\t return encodeBlobAsArrayBuffer(packet, supportsBinary, callback);\n\t }\n\t\n\t var length = new Uint8Array(1);\n\t length[0] = packets[packet.type];\n\t var blob = new Blob([length.buffer, packet.data]);\n\t\n\t return callback(blob);\n\t}\n\t\n\t/**\n\t * Encodes a packet with binary data in a base64 string\n\t *\n\t * @param {Object} packet, has `type` and `data`\n\t * @return {String} base64 encoded message\n\t */\n\t\n\texports.encodeBase64Packet = function(packet, callback) {\n\t var message = 'b' + exports.packets[packet.type];\n\t if (Blob && packet.data instanceof global.Blob) {\n\t var fr = new FileReader();\n\t fr.onload = function() {\n\t var b64 = fr.result.split(',')[1];\n\t callback(message + b64);\n\t };\n\t return fr.readAsDataURL(packet.data);\n\t }\n\t\n\t var b64data;\n\t try {\n\t b64data = String.fromCharCode.apply(null, new Uint8Array(packet.data));\n\t } catch (e) {\n\t // iPhone Safari doesn't let you apply with typed arrays\n\t var typed = new Uint8Array(packet.data);\n\t var basic = new Array(typed.length);\n\t for (var i = 0; i < typed.length; i++) {\n\t basic[i] = typed[i];\n\t }\n\t b64data = String.fromCharCode.apply(null, basic);\n\t }\n\t message += global.btoa(b64data);\n\t return callback(message);\n\t};\n\t\n\t/**\n\t * Decodes a packet. Changes format to Blob if requested.\n\t *\n\t * @return {Object} with `type` and `data` (if any)\n\t * @api private\n\t */\n\t\n\texports.decodePacket = function (data, binaryType, utf8decode) {\n\t if (data === undefined) {\n\t return err;\n\t }\n\t // String data\n\t if (typeof data === 'string') {\n\t if (data.charAt(0) === 'b') {\n\t return exports.decodeBase64Packet(data.substr(1), binaryType);\n\t }\n\t\n\t if (utf8decode) {\n\t data = tryDecode(data);\n\t if (data === false) {\n\t return err;\n\t }\n\t }\n\t var type = data.charAt(0);\n\t\n\t if (Number(type) != type || !packetslist[type]) {\n\t return err;\n\t }\n\t\n\t if (data.length > 1) {\n\t return { type: packetslist[type], data: data.substring(1) };\n\t } else {\n\t return { type: packetslist[type] };\n\t }\n\t }\n\t\n\t var asArray = new Uint8Array(data);\n\t var type = asArray[0];\n\t var rest = sliceBuffer(data, 1);\n\t if (Blob && binaryType === 'blob') {\n\t rest = new Blob([rest]);\n\t }\n\t return { type: packetslist[type], data: rest };\n\t};\n\t\n\tfunction tryDecode(data) {\n\t try {\n\t data = utf8.decode(data, { strict: false });\n\t } catch (e) {\n\t return false;\n\t }\n\t return data;\n\t}\n\t\n\t/**\n\t * Decodes a packet encoded in a base64 string\n\t *\n\t * @param {String} base64 encoded message\n\t * @return {Object} with `type` and `data` (if any)\n\t */\n\t\n\texports.decodeBase64Packet = function(msg, binaryType) {\n\t var type = packetslist[msg.charAt(0)];\n\t if (!base64encoder) {\n\t return { type: type, data: { base64: true, data: msg.substr(1) } };\n\t }\n\t\n\t var data = base64encoder.decode(msg.substr(1));\n\t\n\t if (binaryType === 'blob' && Blob) {\n\t data = new Blob([data]);\n\t }\n\t\n\t return { type: type, data: data };\n\t};\n\t\n\t/**\n\t * Encodes multiple messages (payload).\n\t *\n\t * <length>:data\n\t *\n\t * Example:\n\t *\n\t * 11:hello world2:hi\n\t *\n\t * If any contents are binary, they will be encoded as base64 strings. Base64\n\t * encoded strings are marked with a b before the length specifier\n\t *\n\t * @param {Array} packets\n\t * @api private\n\t */\n\t\n\texports.encodePayload = function (packets, supportsBinary, callback) {\n\t if (typeof supportsBinary === 'function') {\n\t callback = supportsBinary;\n\t supportsBinary = null;\n\t }\n\t\n\t var isBinary = hasBinary(packets);\n\t\n\t if (supportsBinary && isBinary) {\n\t if (Blob && !dontSendBlobs) {\n\t return exports.encodePayloadAsBlob(packets, callback);\n\t }\n\t\n\t return exports.encodePayloadAsArrayBuffer(packets, callback);\n\t }\n\t\n\t if (!packets.length) {\n\t return callback('0:');\n\t }\n\t\n\t function setLengthHeader(message) {\n\t return message.length + ':' + message;\n\t }\n\t\n\t function encodeOne(packet, doneCallback) {\n\t exports.encodePacket(packet, !isBinary ? false : supportsBinary, false, function(message) {\n\t doneCallback(null, setLengthHeader(message));\n\t });\n\t }\n\t\n\t map(packets, encodeOne, function(err, results) {\n\t return callback(results.join(''));\n\t });\n\t};\n\t\n\t/**\n\t * Async array map using after\n\t */\n\t\n\tfunction map(ary, each, done) {\n\t var result = new Array(ary.length);\n\t var next = after(ary.length, done);\n\t\n\t var eachWithIndex = function(i, el, cb) {\n\t each(el, function(error, msg) {\n\t result[i] = msg;\n\t cb(error, result);\n\t });\n\t };\n\t\n\t for (var i = 0; i < ary.length; i++) {\n\t eachWithIndex(i, ary[i], next);\n\t }\n\t}\n\t\n\t/*\n\t * Decodes data when a payload is maybe expected. Possible binary contents are\n\t * decoded from their base64 representation\n\t *\n\t * @param {String} data, callback method\n\t * @api public\n\t */\n\t\n\texports.decodePayload = function (data, binaryType, callback) {\n\t if (typeof data !== 'string') {\n\t return exports.decodePayloadAsBinary(data, binaryType, callback);\n\t }\n\t\n\t if (typeof binaryType === 'function') {\n\t callback = binaryType;\n\t binaryType = null;\n\t }\n\t\n\t var packet;\n\t if (data === '') {\n\t // parser error - ignoring payload\n\t return callback(err, 0, 1);\n\t }\n\t\n\t var length = '', n, msg;\n\t\n\t for (var i = 0, l = data.length; i < l; i++) {\n\t var chr = data.charAt(i);\n\t\n\t if (chr !== ':') {\n\t length += chr;\n\t continue;\n\t }\n\t\n\t if (length === '' || (length != (n = Number(length)))) {\n\t // parser error - ignoring payload\n\t return callback(err, 0, 1);\n\t }\n\t\n\t msg = data.substr(i + 1, n);\n\t\n\t if (length != msg.length) {\n\t // parser error - ignoring payload\n\t return callback(err, 0, 1);\n\t }\n\t\n\t if (msg.length) {\n\t packet = exports.decodePacket(msg, binaryType, false);\n\t\n\t if (err.type === packet.type && err.data === packet.data) {\n\t // parser error in individual packet - ignoring payload\n\t return callback(err, 0, 1);\n\t }\n\t\n\t var ret = callback(packet, i + n, l);\n\t if (false === ret) return;\n\t }\n\t\n\t // advance cursor\n\t i += n;\n\t length = '';\n\t }\n\t\n\t if (length !== '') {\n\t // parser error - ignoring payload\n\t return callback(err, 0, 1);\n\t }\n\t\n\t};\n\t\n\t/**\n\t * Encodes multiple messages (payload) as binary.\n\t *\n\t * <1 = binary, 0 = string><number from 0-9><number from 0-9>[...]<number\n\t * 255><data>\n\t *\n\t * Example:\n\t * 1 3 255 1 2 3, if the binary contents are interpreted as 8 bit integers\n\t *\n\t * @param {Array} packets\n\t * @return {ArrayBuffer} encoded payload\n\t * @api private\n\t */\n\t\n\texports.encodePayloadAsArrayBuffer = function(packets, callback) {\n\t if (!packets.length) {\n\t return callback(new ArrayBuffer(0));\n\t }\n\t\n\t function encodeOne(packet, doneCallback) {\n\t exports.encodePacket(packet, true, true, function(data) {\n\t return doneCallback(null, data);\n\t });\n\t }\n\t\n\t map(packets, encodeOne, function(err, encodedPackets) {\n\t var totalLength = encodedPackets.reduce(function(acc, p) {\n\t var len;\n\t if (typeof p === 'string'){\n\t len = p.length;\n\t } else {\n\t len = p.byteLength;\n\t }\n\t return acc + len.toString().length + len + 2; // string/binary identifier + separator = 2\n\t }, 0);\n\t\n\t var resultArray = new Uint8Array(totalLength);\n\t\n\t var bufferIndex = 0;\n\t encodedPackets.forEach(function(p) {\n\t var isString = typeof p === 'string';\n\t var ab = p;\n\t if (isString) {\n\t var view = new Uint8Array(p.length);\n\t for (var i = 0; i < p.length; i++) {\n\t view[i] = p.charCodeAt(i);\n\t }\n\t ab = view.buffer;\n\t }\n\t\n\t if (isString) { // not true binary\n\t resultArray[bufferIndex++] = 0;\n\t } else { // true binary\n\t resultArray[bufferIndex++] = 1;\n\t }\n\t\n\t var lenStr = ab.byteLength.toString();\n\t for (var i = 0; i < lenStr.length; i++) {\n\t resultArray[bufferIndex++] = parseInt(lenStr[i]);\n\t }\n\t resultArray[bufferIndex++] = 255;\n\t\n\t var view = new Uint8Array(ab);\n\t for (var i = 0; i < view.length; i++) {\n\t resultArray[bufferIndex++] = view[i];\n\t }\n\t });\n\t\n\t return callback(resultArray.buffer);\n\t });\n\t};\n\t\n\t/**\n\t * Encode as Blob\n\t */\n\t\n\texports.encodePayloadAsBlob = function(packets, callback) {\n\t function encodeOne(packet, doneCallback) {\n\t exports.encodePacket(packet, true, true, function(encoded) {\n\t var binaryIdentifier = new Uint8Array(1);\n\t binaryIdentifier[0] = 1;\n\t if (typeof encoded === 'string') {\n\t var view = new Uint8Array(encoded.length);\n\t for (var i = 0; i < encoded.length; i++) {\n\t view[i] = encoded.charCodeAt(i);\n\t }\n\t encoded = view.buffer;\n\t binaryIdentifier[0] = 0;\n\t }\n\t\n\t var len = (encoded instanceof ArrayBuffer)\n\t ? encoded.byteLength\n\t : encoded.size;\n\t\n\t var lenStr = len.toString();\n\t var lengthAry = new Uint8Array(lenStr.length + 1);\n\t for (var i = 0; i < lenStr.length; i++) {\n\t lengthAry[i] = parseInt(lenStr[i]);\n\t }\n\t lengthAry[lenStr.length] = 255;\n\t\n\t if (Blob) {\n\t var blob = new Blob([binaryIdentifier.buffer, lengthAry.buffer, encoded]);\n\t doneCallback(null, blob);\n\t }\n\t });\n\t }\n\t\n\t map(packets, encodeOne, function(err, results) {\n\t return callback(new Blob(results));\n\t });\n\t};\n\t\n\t/*\n\t * Decodes data when a payload is maybe expected. Strings are decoded by\n\t * interpreting each byte as a key code for entries marked to start with 0. See\n\t * description of encodePayloadAsBinary\n\t *\n\t * @param {ArrayBuffer} data, callback method\n\t * @api public\n\t */\n\t\n\texports.decodePayloadAsBinary = function (data, binaryType, callback) {\n\t if (typeof binaryType === 'function') {\n\t callback = binaryType;\n\t binaryType = null;\n\t }\n\t\n\t var bufferTail = data;\n\t var buffers = [];\n\t\n\t while (bufferTail.byteLength > 0) {\n\t var tailArray = new Uint8Array(bufferTail);\n\t var isString = tailArray[0] === 0;\n\t var msgLength = '';\n\t\n\t for (var i = 1; ; i++) {\n\t if (tailArray[i] === 255) break;\n\t\n\t // 310 = char length of Number.MAX_VALUE\n\t if (msgLength.length > 310) {\n\t return callback(err, 0, 1);\n\t }\n\t\n\t msgLength += tailArray[i];\n\t }\n\t\n\t bufferTail = sliceBuffer(bufferTail, 2 + msgLength.length);\n\t msgLength = parseInt(msgLength);\n\t\n\t var msg = sliceBuffer(bufferTail, 0, msgLength);\n\t if (isString) {\n\t try {\n\t msg = String.fromCharCode.apply(null, new Uint8Array(msg));\n\t } catch (e) {\n\t // iPhone Safari doesn't let you apply to typed arrays\n\t var typed = new Uint8Array(msg);\n\t msg = '';\n\t for (var i = 0; i < typed.length; i++) {\n\t msg += String.fromCharCode(typed[i]);\n\t }\n\t }\n\t }\n\t\n\t buffers.push(msg);\n\t bufferTail = sliceBuffer(bufferTail, msgLength);\n\t }\n\t\n\t var total = buffers.length;\n\t buffers.forEach(function(buffer, i) {\n\t callback(exports.decodePacket(buffer, binaryType, true), i, total);\n\t });\n\t};\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 40 */\n/***/ function(module, exports) {\n\n\t\n\t/**\n\t * Gets the keys for an object.\n\t *\n\t * @return {Array} keys\n\t * @api private\n\t */\n\t\n\tmodule.exports = Object.keys || function keys (obj){\n\t var arr = [];\n\t var has = Object.prototype.hasOwnProperty;\n\t\n\t for (var i in obj) {\n\t if (has.call(obj, i)) {\n\t arr.push(i);\n\t }\n\t }\n\t return arr;\n\t};\n\n\n/***/ },\n/* 41 */\n/***/ function(module, exports) {\n\n\t/**\n\t * An abstraction for slicing an arraybuffer even when\n\t * ArrayBuffer.prototype.slice is not supported\n\t *\n\t * @api public\n\t */\n\t\n\tmodule.exports = function(arraybuffer, start, end) {\n\t var bytes = arraybuffer.byteLength;\n\t start = start || 0;\n\t end = end || bytes;\n\t\n\t if (arraybuffer.slice) { return arraybuffer.slice(start, end); }\n\t\n\t if (start < 0) { start += bytes; }\n\t if (end < 0) { end += bytes; }\n\t if (end > bytes) { end = bytes; }\n\t\n\t if (start >= bytes || start >= end || bytes === 0) {\n\t return new ArrayBuffer(0);\n\t }\n\t\n\t var abv = new Uint8Array(arraybuffer);\n\t var result = new Uint8Array(end - start);\n\t for (var i = start, ii = 0; i < end; i++, ii++) {\n\t result[ii] = abv[i];\n\t }\n\t return result.buffer;\n\t};\n\n\n/***/ },\n/* 42 */\n/***/ function(module, exports) {\n\n\tmodule.exports = after\n\t\n\tfunction after(count, callback, err_cb) {\n\t var bail = false\n\t err_cb = err_cb || noop\n\t proxy.count = count\n\t\n\t return (count === 0) ? callback() : proxy\n\t\n\t function proxy(err, result) {\n\t if (proxy.count <= 0) {\n\t throw new Error('after called too many times')\n\t }\n\t --proxy.count\n\t\n\t // after first error, rest are passed to err_cb\n\t if (err) {\n\t bail = true\n\t callback(err)\n\t // future error callbacks will go to error handler\n\t callback = err_cb\n\t } else if (proxy.count === 0 && !bail) {\n\t callback(null, result)\n\t }\n\t }\n\t}\n\t\n\tfunction noop() {}\n\n\n/***/ },\n/* 43 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module, global) {/*! https://mths.be/utf8js v2.1.2 by @mathias */\n\t;(function(root) {\n\t\n\t\t// Detect free variables `exports`\n\t\tvar freeExports = typeof exports == 'object' && exports;\n\t\n\t\t// Detect free variable `module`\n\t\tvar freeModule = typeof module == 'object' && module &&\n\t\t\tmodule.exports == freeExports && module;\n\t\n\t\t// Detect free variable `global`, from Node.js or Browserified code,\n\t\t// and use it as `root`\n\t\tvar freeGlobal = typeof global == 'object' && global;\n\t\tif (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {\n\t\t\troot = freeGlobal;\n\t\t}\n\t\n\t\t/*--------------------------------------------------------------------------*/\n\t\n\t\tvar stringFromCharCode = String.fromCharCode;\n\t\n\t\t// Taken from https://mths.be/punycode\n\t\tfunction ucs2decode(string) {\n\t\t\tvar output = [];\n\t\t\tvar counter = 0;\n\t\t\tvar length = string.length;\n\t\t\tvar value;\n\t\t\tvar extra;\n\t\t\twhile (counter < length) {\n\t\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\t\toutput.push(value);\n\t\t\t\t\t\tcounter--;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\toutput.push(value);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn output;\n\t\t}\n\t\n\t\t// Taken from https://mths.be/punycode\n\t\tfunction ucs2encode(array) {\n\t\t\tvar length = array.length;\n\t\t\tvar index = -1;\n\t\t\tvar value;\n\t\t\tvar output = '';\n\t\t\twhile (++index < length) {\n\t\t\t\tvalue = array[index];\n\t\t\t\tif (value > 0xFFFF) {\n\t\t\t\t\tvalue -= 0x10000;\n\t\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t\t}\n\t\t\t\toutput += stringFromCharCode(value);\n\t\t\t}\n\t\t\treturn output;\n\t\t}\n\t\n\t\tfunction checkScalarValue(codePoint, strict) {\n\t\t\tif (codePoint >= 0xD800 && codePoint <= 0xDFFF) {\n\t\t\t\tif (strict) {\n\t\t\t\t\tthrow Error(\n\t\t\t\t\t\t'Lone surrogate U+' + codePoint.toString(16).toUpperCase() +\n\t\t\t\t\t\t' is not a scalar value'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t/*--------------------------------------------------------------------------*/\n\t\n\t\tfunction createByte(codePoint, shift) {\n\t\t\treturn stringFromCharCode(((codePoint >> shift) & 0x3F) | 0x80);\n\t\t}\n\t\n\t\tfunction encodeCodePoint(codePoint, strict) {\n\t\t\tif ((codePoint & 0xFFFFFF80) == 0) { // 1-byte sequence\n\t\t\t\treturn stringFromCharCode(codePoint);\n\t\t\t}\n\t\t\tvar symbol = '';\n\t\t\tif ((codePoint & 0xFFFFF800) == 0) { // 2-byte sequence\n\t\t\t\tsymbol = stringFromCharCode(((codePoint >> 6) & 0x1F) | 0xC0);\n\t\t\t}\n\t\t\telse if ((codePoint & 0xFFFF0000) == 0) { // 3-byte sequence\n\t\t\t\tif (!checkScalarValue(codePoint, strict)) {\n\t\t\t\t\tcodePoint = 0xFFFD;\n\t\t\t\t}\n\t\t\t\tsymbol = stringFromCharCode(((codePoint >> 12) & 0x0F) | 0xE0);\n\t\t\t\tsymbol += createByte(codePoint, 6);\n\t\t\t}\n\t\t\telse if ((codePoint & 0xFFE00000) == 0) { // 4-byte sequence\n\t\t\t\tsymbol = stringFromCharCode(((codePoint >> 18) & 0x07) | 0xF0);\n\t\t\t\tsymbol += createByte(codePoint, 12);\n\t\t\t\tsymbol += createByte(codePoint, 6);\n\t\t\t}\n\t\t\tsymbol += stringFromCharCode((codePoint & 0x3F) | 0x80);\n\t\t\treturn symbol;\n\t\t}\n\t\n\t\tfunction utf8encode(string, opts) {\n\t\t\topts = opts || {};\n\t\t\tvar strict = false !== opts.strict;\n\t\n\t\t\tvar codePoints = ucs2decode(string);\n\t\t\tvar length = codePoints.length;\n\t\t\tvar index = -1;\n\t\t\tvar codePoint;\n\t\t\tvar byteString = '';\n\t\t\twhile (++index < length) {\n\t\t\t\tcodePoint = codePoints[index];\n\t\t\t\tbyteString += encodeCodePoint(codePoint, strict);\n\t\t\t}\n\t\t\treturn byteString;\n\t\t}\n\t\n\t\t/*--------------------------------------------------------------------------*/\n\t\n\t\tfunction readContinuationByte() {\n\t\t\tif (byteIndex >= byteCount) {\n\t\t\t\tthrow Error('Invalid byte index');\n\t\t\t}\n\t\n\t\t\tvar continuationByte = byteArray[byteIndex] & 0xFF;\n\t\t\tbyteIndex++;\n\t\n\t\t\tif ((continuationByte & 0xC0) == 0x80) {\n\t\t\t\treturn continuationByte & 0x3F;\n\t\t\t}\n\t\n\t\t\t// If we end up here, its not a continuation byte\n\t\t\tthrow Error('Invalid continuation byte');\n\t\t}\n\t\n\t\tfunction decodeSymbol(strict) {\n\t\t\tvar byte1;\n\t\t\tvar byte2;\n\t\t\tvar byte3;\n\t\t\tvar byte4;\n\t\t\tvar codePoint;\n\t\n\t\t\tif (byteIndex > byteCount) {\n\t\t\t\tthrow Error('Invalid byte index');\n\t\t\t}\n\t\n\t\t\tif (byteIndex == byteCount) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\t// Read first byte\n\t\t\tbyte1 = byteArray[byteIndex] & 0xFF;\n\t\t\tbyteIndex++;\n\t\n\t\t\t// 1-byte sequence (no continuation bytes)\n\t\t\tif ((byte1 & 0x80) == 0) {\n\t\t\t\treturn byte1;\n\t\t\t}\n\t\n\t\t\t// 2-byte sequence\n\t\t\tif ((byte1 & 0xE0) == 0xC0) {\n\t\t\t\tbyte2 = readContinuationByte();\n\t\t\t\tcodePoint = ((byte1 & 0x1F) << 6) | byte2;\n\t\t\t\tif (codePoint >= 0x80) {\n\t\t\t\t\treturn codePoint;\n\t\t\t\t} else {\n\t\t\t\t\tthrow Error('Invalid continuation byte');\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// 3-byte sequence (may include unpaired surrogates)\n\t\t\tif ((byte1 & 0xF0) == 0xE0) {\n\t\t\t\tbyte2 = readContinuationByte();\n\t\t\t\tbyte3 = readContinuationByte();\n\t\t\t\tcodePoint = ((byte1 & 0x0F) << 12) | (byte2 << 6) | byte3;\n\t\t\t\tif (codePoint >= 0x0800) {\n\t\t\t\t\treturn checkScalarValue(codePoint, strict) ? codePoint : 0xFFFD;\n\t\t\t\t} else {\n\t\t\t\t\tthrow Error('Invalid continuation byte');\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// 4-byte sequence\n\t\t\tif ((byte1 & 0xF8) == 0xF0) {\n\t\t\t\tbyte2 = readContinuationByte();\n\t\t\t\tbyte3 = readContinuationByte();\n\t\t\t\tbyte4 = readContinuationByte();\n\t\t\t\tcodePoint = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0C) |\n\t\t\t\t\t(byte3 << 0x06) | byte4;\n\t\t\t\tif (codePoint >= 0x010000 && codePoint <= 0x10FFFF) {\n\t\t\t\t\treturn codePoint;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tthrow Error('Invalid UTF-8 detected');\n\t\t}\n\t\n\t\tvar byteArray;\n\t\tvar byteCount;\n\t\tvar byteIndex;\n\t\tfunction utf8decode(byteString, opts) {\n\t\t\topts = opts || {};\n\t\t\tvar strict = false !== opts.strict;\n\t\n\t\t\tbyteArray = ucs2decode(byteString);\n\t\t\tbyteCount = byteArray.length;\n\t\t\tbyteIndex = 0;\n\t\t\tvar codePoints = [];\n\t\t\tvar tmp;\n\t\t\twhile ((tmp = decodeSymbol(strict)) !== false) {\n\t\t\t\tcodePoints.push(tmp);\n\t\t\t}\n\t\t\treturn ucs2encode(codePoints);\n\t\t}\n\t\n\t\t/*--------------------------------------------------------------------------*/\n\t\n\t\tvar utf8 = {\n\t\t\t'version': '2.1.2',\n\t\t\t'encode': utf8encode,\n\t\t\t'decode': utf8decode\n\t\t};\n\t\n\t\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t\t// like the following:\n\t\tif (\n\t\t\ttrue\n\t\t) {\n\t\t\t!(__WEBPACK_AMD_DEFINE_RESULT__ = function() {\n\t\t\t\treturn utf8;\n\t\t\t}.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t\t}\telse if (freeExports && !freeExports.nodeType) {\n\t\t\tif (freeModule) { // in Node.js or RingoJS v0.8.0+\n\t\t\t\tfreeModule.exports = utf8;\n\t\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\t\tvar object = {};\n\t\t\t\tvar hasOwnProperty = object.hasOwnProperty;\n\t\t\t\tfor (var key in utf8) {\n\t\t\t\t\thasOwnProperty.call(utf8, key) && (freeExports[key] = utf8[key]);\n\t\t\t\t}\n\t\t\t}\n\t\t} else { // in Rhino or a web browser\n\t\t\troot.utf8 = utf8;\n\t\t}\n\t\n\t}(this));\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(44)(module), (function() { return this; }())))\n\n/***/ },\n/* 44 */\n/***/ function(module, exports) {\n\n\tmodule.exports = function(module) {\r\n\t\tif(!module.webpackPolyfill) {\r\n\t\t\tmodule.deprecate = function() {};\r\n\t\t\tmodule.paths = [];\r\n\t\t\t// module.parent = undefined by default\r\n\t\t\tmodule.children = [];\r\n\t\t\tmodule.webpackPolyfill = 1;\r\n\t\t}\r\n\t\treturn module;\r\n\t}\r\n\n\n/***/ },\n/* 45 */\n/***/ function(module, exports) {\n\n\t/*\n\t * base64-arraybuffer\n\t * https://github.com/niklasvh/base64-arraybuffer\n\t *\n\t * Copyright (c) 2012 Niklas von Hertzen\n\t * Licensed under the MIT license.\n\t */\n\t(function(){\n\t \"use strict\";\n\t\n\t var chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\t\n\t // Use a lookup table to find the index.\n\t var lookup = new Uint8Array(256);\n\t for (var i = 0; i < chars.length; i++) {\n\t lookup[chars.charCodeAt(i)] = i;\n\t }\n\t\n\t exports.encode = function(arraybuffer) {\n\t var bytes = new Uint8Array(arraybuffer),\n\t i, len = bytes.length, base64 = \"\";\n\t\n\t for (i = 0; i < len; i+=3) {\n\t base64 += chars[bytes[i] >> 2];\n\t base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n\t base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n\t base64 += chars[bytes[i + 2] & 63];\n\t }\n\t\n\t if ((len % 3) === 2) {\n\t base64 = base64.substring(0, base64.length - 1) + \"=\";\n\t } else if (len % 3 === 1) {\n\t base64 = base64.substring(0, base64.length - 2) + \"==\";\n\t }\n\t\n\t return base64;\n\t };\n\t\n\t exports.decode = function(base64) {\n\t var bufferLength = base64.length * 0.75,\n\t len = base64.length, i, p = 0,\n\t encoded1, encoded2, encoded3, encoded4;\n\t\n\t if (base64[base64.length - 1] === \"=\") {\n\t bufferLength--;\n\t if (base64[base64.length - 2] === \"=\") {\n\t bufferLength--;\n\t }\n\t }\n\t\n\t var arraybuffer = new ArrayBuffer(bufferLength),\n\t bytes = new Uint8Array(arraybuffer);\n\t\n\t for (i = 0; i < len; i+=4) {\n\t encoded1 = lookup[base64.charCodeAt(i)];\n\t encoded2 = lookup[base64.charCodeAt(i+1)];\n\t encoded3 = lookup[base64.charCodeAt(i+2)];\n\t encoded4 = lookup[base64.charCodeAt(i+3)];\n\t\n\t bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n\t bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n\t bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n\t }\n\t\n\t return arraybuffer;\n\t };\n\t})();\n\n\n/***/ },\n/* 46 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {/**\n\t * Create a blob builder even when vendor prefixes exist\n\t */\n\t\n\tvar BlobBuilder = global.BlobBuilder\n\t || global.WebKitBlobBuilder\n\t || global.MSBlobBuilder\n\t || global.MozBlobBuilder;\n\t\n\t/**\n\t * Check if Blob constructor is supported\n\t */\n\t\n\tvar blobSupported = (function() {\n\t try {\n\t var a = new Blob(['hi']);\n\t return a.size === 2;\n\t } catch(e) {\n\t return false;\n\t }\n\t})();\n\t\n\t/**\n\t * Check if Blob constructor supports ArrayBufferViews\n\t * Fails in Safari 6, so we need to map to ArrayBuffers there.\n\t */\n\t\n\tvar blobSupportsArrayBufferView = blobSupported && (function() {\n\t try {\n\t var b = new Blob([new Uint8Array([1,2])]);\n\t return b.size === 2;\n\t } catch(e) {\n\t return false;\n\t }\n\t})();\n\t\n\t/**\n\t * Check if BlobBuilder is supported\n\t */\n\t\n\tvar blobBuilderSupported = BlobBuilder\n\t && BlobBuilder.prototype.append\n\t && BlobBuilder.prototype.getBlob;\n\t\n\t/**\n\t * Helper function that maps ArrayBufferViews to ArrayBuffers\n\t * Used by BlobBuilder constructor and old browsers that didn't\n\t * support it in the Blob constructor.\n\t */\n\t\n\tfunction mapArrayBufferViews(ary) {\n\t for (var i = 0; i < ary.length; i++) {\n\t var chunk = ary[i];\n\t if (chunk.buffer instanceof ArrayBuffer) {\n\t var buf = chunk.buffer;\n\t\n\t // if this is a subarray, make a copy so we only\n\t // include the subarray region from the underlying buffer\n\t if (chunk.byteLength !== buf.byteLength) {\n\t var copy = new Uint8Array(chunk.byteLength);\n\t copy.set(new Uint8Array(buf, chunk.byteOffset, chunk.byteLength));\n\t buf = copy.buffer;\n\t }\n\t\n\t ary[i] = buf;\n\t }\n\t }\n\t}\n\t\n\tfunction BlobBuilderConstructor(ary, options) {\n\t options = options || {};\n\t\n\t var bb = new BlobBuilder();\n\t mapArrayBufferViews(ary);\n\t\n\t for (var i = 0; i < ary.length; i++) {\n\t bb.append(ary[i]);\n\t }\n\t\n\t return (options.type) ? bb.getBlob(options.type) : bb.getBlob();\n\t};\n\t\n\tfunction BlobConstructor(ary, options) {\n\t mapArrayBufferViews(ary);\n\t return new Blob(ary, options || {});\n\t};\n\t\n\tmodule.exports = (function() {\n\t if (blobSupported) {\n\t return blobSupportsArrayBufferView ? global.Blob : BlobConstructor;\n\t } else if (blobBuilderSupported) {\n\t return BlobBuilderConstructor;\n\t } else {\n\t return undefined;\n\t }\n\t})();\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 47 */\n/***/ function(module, exports) {\n\n\t/**\r\n\t * Compiles a querystring\r\n\t * Returns string representation of the object\r\n\t *\r\n\t * @param {Object}\r\n\t * @api private\r\n\t */\r\n\t\r\n\texports.encode = function (obj) {\r\n\t var str = '';\r\n\t\r\n\t for (var i in obj) {\r\n\t if (obj.hasOwnProperty(i)) {\r\n\t if (str.length) str += '&';\r\n\t str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]);\r\n\t }\r\n\t }\r\n\t\r\n\t return str;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Parses a simple querystring into an object\r\n\t *\r\n\t * @param {String} qs\r\n\t * @api private\r\n\t */\r\n\t\r\n\texports.decode = function(qs){\r\n\t var qry = {};\r\n\t var pairs = qs.split('&');\r\n\t for (var i = 0, l = pairs.length; i < l; i++) {\r\n\t var pair = pairs[i].split('=');\r\n\t qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);\r\n\t }\r\n\t return qry;\r\n\t};\r\n\n\n/***/ },\n/* 48 */\n/***/ function(module, exports) {\n\n\t\n\tmodule.exports = function(a, b){\n\t var fn = function(){};\n\t fn.prototype = b.prototype;\n\t a.prototype = new fn;\n\t a.prototype.constructor = a;\n\t};\n\n/***/ },\n/* 49 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tvar alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split('')\n\t , length = 64\n\t , map = {}\n\t , seed = 0\n\t , i = 0\n\t , prev;\n\t\n\t/**\n\t * Return a string representing the specified number.\n\t *\n\t * @param {Number} num The number to convert.\n\t * @returns {String} The string representation of the number.\n\t * @api public\n\t */\n\tfunction encode(num) {\n\t var encoded = '';\n\t\n\t do {\n\t encoded = alphabet[num % length] + encoded;\n\t num = Math.floor(num / length);\n\t } while (num > 0);\n\t\n\t return encoded;\n\t}\n\t\n\t/**\n\t * Return the integer value specified by the given string.\n\t *\n\t * @param {String} str The string to convert.\n\t * @returns {Number} The integer value represented by the string.\n\t * @api public\n\t */\n\tfunction decode(str) {\n\t var decoded = 0;\n\t\n\t for (i = 0; i < str.length; i++) {\n\t decoded = decoded * length + map[str.charAt(i)];\n\t }\n\t\n\t return decoded;\n\t}\n\t\n\t/**\n\t * Yeast: A tiny growing id generator.\n\t *\n\t * @returns {String} A unique id.\n\t * @api public\n\t */\n\tfunction yeast() {\n\t var now = encode(+new Date());\n\t\n\t if (now !== prev) return seed = 0, prev = now;\n\t return now +'.'+ encode(seed++);\n\t}\n\t\n\t//\n\t// Map each character to its index.\n\t//\n\tfor (; i < length; i++) map[alphabet[i]] = i;\n\t\n\t//\n\t// Expose the `yeast`, `encode` and `decode` functions.\n\t//\n\tyeast.encode = encode;\n\tyeast.decode = decode;\n\tmodule.exports = yeast;\n\n\n/***/ },\n/* 50 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {/**\n\t * This is the web browser implementation of `debug()`.\n\t *\n\t * Expose `debug()` as the module.\n\t */\n\t\n\texports = module.exports = __webpack_require__(51);\n\texports.log = log;\n\texports.formatArgs = formatArgs;\n\texports.save = save;\n\texports.load = load;\n\texports.useColors = useColors;\n\texports.storage = 'undefined' != typeof chrome\n\t && 'undefined' != typeof chrome.storage\n\t ? chrome.storage.local\n\t : localstorage();\n\t\n\t/**\n\t * Colors.\n\t */\n\t\n\texports.colors = [\n\t 'lightseagreen',\n\t 'forestgreen',\n\t 'goldenrod',\n\t 'dodgerblue',\n\t 'darkorchid',\n\t 'crimson'\n\t];\n\t\n\t/**\n\t * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n\t * and the Firebug extension (any Firefox version) are known\n\t * to support \"%c\" CSS customizations.\n\t *\n\t * TODO: add a `localStorage` variable to explicitly enable/disable colors\n\t */\n\t\n\tfunction useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n\t return true;\n\t }\n\t\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t // double check webkit in userAgent just in case we are in a worker\n\t (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n\t}\n\t\n\t/**\n\t * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n\t */\n\t\n\texports.formatters.j = function(v) {\n\t try {\n\t return JSON.stringify(v);\n\t } catch (err) {\n\t return '[UnexpectedJSONParseError]: ' + err.message;\n\t }\n\t};\n\t\n\t\n\t/**\n\t * Colorize log arguments if enabled.\n\t *\n\t * @api public\n\t */\n\t\n\tfunction formatArgs(args) {\n\t var useColors = this.useColors;\n\t\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\t\n\t if (!useColors) return;\n\t\n\t var c = 'color: ' + this.color;\n\t args.splice(1, 0, c, 'color: inherit')\n\t\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-zA-Z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t\n\t args.splice(lastC, 0, c);\n\t}\n\t\n\t/**\n\t * Invokes `console.log()` when available.\n\t * No-op when `console.log` is not a \"function\".\n\t *\n\t * @api public\n\t */\n\t\n\tfunction log() {\n\t // this hackery is required for IE8/9, where\n\t // the `console.log` function doesn't have 'apply'\n\t return 'object' === typeof console\n\t && console.log\n\t && Function.prototype.apply.call(console.log, console, arguments);\n\t}\n\t\n\t/**\n\t * Save `namespaces`.\n\t *\n\t * @param {String} namespaces\n\t * @api private\n\t */\n\t\n\tfunction save(namespaces) {\n\t try {\n\t if (null == namespaces) {\n\t exports.storage.removeItem('debug');\n\t } else {\n\t exports.storage.debug = namespaces;\n\t }\n\t } catch(e) {}\n\t}\n\t\n\t/**\n\t * Load `namespaces`.\n\t *\n\t * @return {String} returns the previously persisted debug modes\n\t * @api private\n\t */\n\t\n\tfunction load() {\n\t var r;\n\t try {\n\t r = exports.storage.debug;\n\t } catch(e) {}\n\t\n\t // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\t if (!r && typeof process !== 'undefined' && 'env' in process) {\n\t r = process.env.DEBUG;\n\t }\n\t\n\t return r;\n\t}\n\t\n\t/**\n\t * Enable namespaces listed in `localStorage.debug` initially.\n\t */\n\t\n\texports.enable(load());\n\t\n\t/**\n\t * Localstorage attempts to return the localstorage.\n\t *\n\t * This is necessary because safari throws\n\t * when a user disables cookies/localstorage\n\t * and you attempt to access it.\n\t *\n\t * @return {LocalStorage}\n\t * @api private\n\t */\n\t\n\tfunction localstorage() {\n\t try {\n\t return window.localStorage;\n\t } catch (e) {}\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(20)))\n\n/***/ },\n/* 51 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\n\t/**\n\t * This is the common logic for both the Node.js and web browser\n\t * implementations of `debug()`.\n\t *\n\t * Expose `debug()` as the module.\n\t */\n\t\n\texports = module.exports = createDebug.debug = createDebug['default'] = createDebug;\n\texports.coerce = coerce;\n\texports.disable = disable;\n\texports.enable = enable;\n\texports.enabled = enabled;\n\texports.humanize = __webpack_require__(52);\n\t\n\t/**\n\t * The currently active debug mode names, and names to skip.\n\t */\n\t\n\texports.names = [];\n\texports.skips = [];\n\t\n\t/**\n\t * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t *\n\t * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t */\n\t\n\texports.formatters = {};\n\t\n\t/**\n\t * Previous log timestamp.\n\t */\n\t\n\tvar prevTime;\n\t\n\t/**\n\t * Select a color.\n\t * @param {String} namespace\n\t * @return {Number}\n\t * @api private\n\t */\n\t\n\tfunction selectColor(namespace) {\n\t var hash = 0, i;\n\t\n\t for (i in namespace) {\n\t hash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t hash |= 0; // Convert to 32bit integer\n\t }\n\t\n\t return exports.colors[Math.abs(hash) % exports.colors.length];\n\t}\n\t\n\t/**\n\t * Create a debugger with the given `namespace`.\n\t *\n\t * @param {String} namespace\n\t * @return {Function}\n\t * @api public\n\t */\n\t\n\tfunction createDebug(namespace) {\n\t\n\t function debug() {\n\t // disabled?\n\t if (!debug.enabled) return;\n\t\n\t var self = debug;\n\t\n\t // set `diff` timestamp\n\t var curr = +new Date();\n\t var ms = curr - (prevTime || curr);\n\t self.diff = ms;\n\t self.prev = prevTime;\n\t self.curr = curr;\n\t prevTime = curr;\n\t\n\t // turn the `arguments` into a proper Array\n\t var args = new Array(arguments.length);\n\t for (var i = 0; i < args.length; i++) {\n\t args[i] = arguments[i];\n\t }\n\t\n\t args[0] = exports.coerce(args[0]);\n\t\n\t if ('string' !== typeof args[0]) {\n\t // anything else let's inspect with %O\n\t args.unshift('%O');\n\t }\n\t\n\t // apply any `formatters` transformations\n\t var index = 0;\n\t args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {\n\t // if we encounter an escaped % then don't increase the array index\n\t if (match === '%%') return match;\n\t index++;\n\t var formatter = exports.formatters[format];\n\t if ('function' === typeof formatter) {\n\t var val = args[index];\n\t match = formatter.call(self, val);\n\t\n\t // now we need to remove `args[index]` since it's inlined in the `format`\n\t args.splice(index, 1);\n\t index--;\n\t }\n\t return match;\n\t });\n\t\n\t // apply env-specific formatting (colors, etc.)\n\t exports.formatArgs.call(self, args);\n\t\n\t var logFn = debug.log || exports.log || console.log.bind(console);\n\t logFn.apply(self, args);\n\t }\n\t\n\t debug.namespace = namespace;\n\t debug.enabled = exports.enabled(namespace);\n\t debug.useColors = exports.useColors();\n\t debug.color = selectColor(namespace);\n\t\n\t // env-specific initialization logic for debug instances\n\t if ('function' === typeof exports.init) {\n\t exports.init(debug);\n\t }\n\t\n\t return debug;\n\t}\n\t\n\t/**\n\t * Enables a debug mode by namespaces. This can include modes\n\t * separated by a colon and wildcards.\n\t *\n\t * @param {String} namespaces\n\t * @api public\n\t */\n\t\n\tfunction enable(namespaces) {\n\t exports.save(namespaces);\n\t\n\t exports.names = [];\n\t exports.skips = [];\n\t\n\t var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t var len = split.length;\n\t\n\t for (var i = 0; i < len; i++) {\n\t if (!split[i]) continue; // ignore empty strings\n\t namespaces = split[i].replace(/\\*/g, '.*?');\n\t if (namespaces[0] === '-') {\n\t exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t } else {\n\t exports.names.push(new RegExp('^' + namespaces + '$'));\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * Disable debug output.\n\t *\n\t * @api public\n\t */\n\t\n\tfunction disable() {\n\t exports.enable('');\n\t}\n\t\n\t/**\n\t * Returns true if the given mode name is enabled, false otherwise.\n\t *\n\t * @param {String} name\n\t * @return {Boolean}\n\t * @api public\n\t */\n\t\n\tfunction enabled(name) {\n\t var i, len;\n\t for (i = 0, len = exports.skips.length; i < len; i++) {\n\t if (exports.skips[i].test(name)) {\n\t return false;\n\t }\n\t }\n\t for (i = 0, len = exports.names.length; i < len; i++) {\n\t if (exports.names[i].test(name)) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t}\n\t\n\t/**\n\t * Coerce `val`.\n\t *\n\t * @param {Mixed} val\n\t * @return {Mixed}\n\t * @api private\n\t */\n\t\n\tfunction coerce(val) {\n\t if (val instanceof Error) return val.stack || val.message;\n\t return val;\n\t}\n\n\n/***/ },\n/* 52 */\n/***/ function(module, exports) {\n\n\t/**\n\t * Helpers.\n\t */\n\t\n\tvar s = 1000;\n\tvar m = s * 60;\n\tvar h = m * 60;\n\tvar d = h * 24;\n\tvar y = d * 365.25;\n\t\n\t/**\n\t * Parse or format the given `val`.\n\t *\n\t * Options:\n\t *\n\t * - `long` verbose formatting [false]\n\t *\n\t * @param {String|Number} val\n\t * @param {Object} [options]\n\t * @throws {Error} throw an error if val is not a non-empty string or a number\n\t * @return {String|Number}\n\t * @api public\n\t */\n\t\n\tmodule.exports = function(val, options) {\n\t options = options || {};\n\t var type = typeof val;\n\t if (type === 'string' && val.length > 0) {\n\t return parse(val);\n\t } else if (type === 'number' && isNaN(val) === false) {\n\t return options.long ? fmtLong(val) : fmtShort(val);\n\t }\n\t throw new Error(\n\t 'val is not a non-empty string or a valid number. val=' +\n\t JSON.stringify(val)\n\t );\n\t};\n\t\n\t/**\n\t * Parse the given `str` and return milliseconds.\n\t *\n\t * @param {String} str\n\t * @return {Number}\n\t * @api private\n\t */\n\t\n\tfunction parse(str) {\n\t str = String(str);\n\t if (str.length > 100) {\n\t return;\n\t }\n\t var match = /^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(\n\t str\n\t );\n\t if (!match) {\n\t return;\n\t }\n\t var n = parseFloat(match[1]);\n\t var type = (match[2] || 'ms').toLowerCase();\n\t switch (type) {\n\t case 'years':\n\t case 'year':\n\t case 'yrs':\n\t case 'yr':\n\t case 'y':\n\t return n * y;\n\t case 'days':\n\t case 'day':\n\t case 'd':\n\t return n * d;\n\t case 'hours':\n\t case 'hour':\n\t case 'hrs':\n\t case 'hr':\n\t case 'h':\n\t return n * h;\n\t case 'minutes':\n\t case 'minute':\n\t case 'mins':\n\t case 'min':\n\t case 'm':\n\t return n * m;\n\t case 'seconds':\n\t case 'second':\n\t case 'secs':\n\t case 'sec':\n\t case 's':\n\t return n * s;\n\t case 'milliseconds':\n\t case 'millisecond':\n\t case 'msecs':\n\t case 'msec':\n\t case 'ms':\n\t return n;\n\t default:\n\t return undefined;\n\t }\n\t}\n\t\n\t/**\n\t * Short format for `ms`.\n\t *\n\t * @param {Number} ms\n\t * @return {String}\n\t * @api private\n\t */\n\t\n\tfunction fmtShort(ms) {\n\t if (ms >= d) {\n\t return Math.round(ms / d) + 'd';\n\t }\n\t if (ms >= h) {\n\t return Math.round(ms / h) + 'h';\n\t }\n\t if (ms >= m) {\n\t return Math.round(ms / m) + 'm';\n\t }\n\t if (ms >= s) {\n\t return Math.round(ms / s) + 's';\n\t }\n\t return ms + 'ms';\n\t}\n\t\n\t/**\n\t * Long format for `ms`.\n\t *\n\t * @param {Number} ms\n\t * @return {String}\n\t * @api private\n\t */\n\t\n\tfunction fmtLong(ms) {\n\t return plural(ms, d, 'day') ||\n\t plural(ms, h, 'hour') ||\n\t plural(ms, m, 'minute') ||\n\t plural(ms, s, 'second') ||\n\t ms + ' ms';\n\t}\n\t\n\t/**\n\t * Pluralization helper.\n\t */\n\t\n\tfunction plural(ms, n, name) {\n\t if (ms < n) {\n\t return;\n\t }\n\t if (ms < n * 1.5) {\n\t return Math.floor(ms / n) + ' ' + name;\n\t }\n\t return Math.ceil(ms / n) + ' ' + name + 's';\n\t}\n\n\n/***/ },\n/* 53 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\n\t/**\n\t * Module requirements.\n\t */\n\t\n\tvar Polling = __webpack_require__(37);\n\tvar inherit = __webpack_require__(48);\n\t\n\t/**\n\t * Module exports.\n\t */\n\t\n\tmodule.exports = JSONPPolling;\n\t\n\t/**\n\t * Cached regular expressions.\n\t */\n\t\n\tvar rNewline = /\\n/g;\n\tvar rEscapedNewline = /\\\\n/g;\n\t\n\t/**\n\t * Global JSONP callbacks.\n\t */\n\t\n\tvar callbacks;\n\t\n\t/**\n\t * Noop.\n\t */\n\t\n\tfunction empty () { }\n\t\n\t/**\n\t * JSONP Polling constructor.\n\t *\n\t * @param {Object} opts.\n\t * @api public\n\t */\n\t\n\tfunction JSONPPolling (opts) {\n\t Polling.call(this, opts);\n\t\n\t this.query = this.query || {};\n\t\n\t // define global callbacks array if not present\n\t // we do this here (lazily) to avoid unneeded global pollution\n\t if (!callbacks) {\n\t // we need to consider multiple engines in the same page\n\t if (!global.___eio) global.___eio = [];\n\t callbacks = global.___eio;\n\t }\n\t\n\t // callback identifier\n\t this.index = callbacks.length;\n\t\n\t // add callback to jsonp global\n\t var self = this;\n\t callbacks.push(function (msg) {\n\t self.onData(msg);\n\t });\n\t\n\t // append to query string\n\t this.query.j = this.index;\n\t\n\t // prevent spurious errors from being emitted when the window is unloaded\n\t if (global.document && global.addEventListener) {\n\t global.addEventListener('beforeunload', function () {\n\t if (self.script) self.script.onerror = empty;\n\t }, false);\n\t }\n\t}\n\t\n\t/**\n\t * Inherits from Polling.\n\t */\n\t\n\tinherit(JSONPPolling, Polling);\n\t\n\t/*\n\t * JSONP only supports binary as base64 encoded strings\n\t */\n\t\n\tJSONPPolling.prototype.supportsBinary = false;\n\t\n\t/**\n\t * Closes the socket.\n\t *\n\t * @api private\n\t */\n\t\n\tJSONPPolling.prototype.doClose = function () {\n\t if (this.script) {\n\t this.script.parentNode.removeChild(this.script);\n\t this.script = null;\n\t }\n\t\n\t if (this.form) {\n\t this.form.parentNode.removeChild(this.form);\n\t this.form = null;\n\t this.iframe = null;\n\t }\n\t\n\t Polling.prototype.doClose.call(this);\n\t};\n\t\n\t/**\n\t * Starts a poll cycle.\n\t *\n\t * @api private\n\t */\n\t\n\tJSONPPolling.prototype.doPoll = function () {\n\t var self = this;\n\t var script = document.createElement('script');\n\t\n\t if (this.script) {\n\t this.script.parentNode.removeChild(this.script);\n\t this.script = null;\n\t }\n\t\n\t script.async = true;\n\t script.src = this.uri();\n\t script.onerror = function (e) {\n\t self.onError('jsonp poll error', e);\n\t };\n\t\n\t var insertAt = document.getElementsByTagName('script')[0];\n\t if (insertAt) {\n\t insertAt.parentNode.insertBefore(script, insertAt);\n\t } else {\n\t (document.head || document.body).appendChild(script);\n\t }\n\t this.script = script;\n\t\n\t var isUAgecko = 'undefined' !== typeof navigator && /gecko/i.test(navigator.userAgent);\n\t\n\t if (isUAgecko) {\n\t setTimeout(function () {\n\t var iframe = document.createElement('iframe');\n\t document.body.appendChild(iframe);\n\t document.body.removeChild(iframe);\n\t }, 100);\n\t }\n\t};\n\t\n\t/**\n\t * Writes with a hidden iframe.\n\t *\n\t * @param {String} data to send\n\t * @param {Function} called upon flush.\n\t * @api private\n\t */\n\t\n\tJSONPPolling.prototype.doWrite = function (data, fn) {\n\t var self = this;\n\t\n\t if (!this.form) {\n\t var form = document.createElement('form');\n\t var area = document.createElement('textarea');\n\t var id = this.iframeId = 'eio_iframe_' + this.index;\n\t var iframe;\n\t\n\t form.className = 'socketio';\n\t form.style.position = 'absolute';\n\t form.style.top = '-1000px';\n\t form.style.left = '-1000px';\n\t form.target = id;\n\t form.method = 'POST';\n\t form.setAttribute('accept-charset', 'utf-8');\n\t area.name = 'd';\n\t form.appendChild(area);\n\t document.body.appendChild(form);\n\t\n\t this.form = form;\n\t this.area = area;\n\t }\n\t\n\t this.form.action = this.uri();\n\t\n\t function complete () {\n\t initIframe();\n\t fn();\n\t }\n\t\n\t function initIframe () {\n\t if (self.iframe) {\n\t try {\n\t self.form.removeChild(self.iframe);\n\t } catch (e) {\n\t self.onError('jsonp polling iframe removal error', e);\n\t }\n\t }\n\t\n\t try {\n\t // ie6 dynamic iframes with target=\"\" support (thanks Chris Lambacher)\n\t var html = '<iframe src=\"javascript:0\" name=\"' + self.iframeId + '\">';\n\t iframe = document.createElement(html);\n\t } catch (e) {\n\t iframe = document.createElement('iframe');\n\t iframe.name = self.iframeId;\n\t iframe.src = 'javascript:0';\n\t }\n\t\n\t iframe.id = self.iframeId;\n\t\n\t self.form.appendChild(iframe);\n\t self.iframe = iframe;\n\t }\n\t\n\t initIframe();\n\t\n\t // escape \\n to prevent it from being converted into \\r\\n by some UAs\n\t // double escaping is required for escaped new lines because unescaping of new lines can be done safely on server-side\n\t data = data.replace(rEscapedNewline, '\\\\\\n');\n\t this.area.value = data.replace(rNewline, '\\\\n');\n\t\n\t try {\n\t this.form.submit();\n\t } catch (e) {}\n\t\n\t if (this.iframe.attachEvent) {\n\t this.iframe.onreadystatechange = function () {\n\t if (self.iframe.readyState === 'complete') {\n\t complete();\n\t }\n\t };\n\t } else {\n\t this.iframe.onload = complete;\n\t }\n\t};\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 54 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {/**\n\t * Module dependencies.\n\t */\n\t\n\tvar Transport = __webpack_require__(38);\n\tvar parser = __webpack_require__(39);\n\tvar parseqs = __webpack_require__(47);\n\tvar inherit = __webpack_require__(48);\n\tvar yeast = __webpack_require__(49);\n\tvar debug = __webpack_require__(50)('engine.io-client:websocket');\n\tvar BrowserWebSocket = global.WebSocket || global.MozWebSocket;\n\tvar NodeWebSocket;\n\tif (typeof window === 'undefined') {\n\t try {\n\t NodeWebSocket = __webpack_require__(55);\n\t } catch (e) { }\n\t}\n\t\n\t/**\n\t * Get either the `WebSocket` or `MozWebSocket` globals\n\t * in the browser or try to resolve WebSocket-compatible\n\t * interface exposed by `ws` for Node-like environment.\n\t */\n\t\n\tvar WebSocket = BrowserWebSocket;\n\tif (!WebSocket && typeof window === 'undefined') {\n\t WebSocket = NodeWebSocket;\n\t}\n\t\n\t/**\n\t * Module exports.\n\t */\n\t\n\tmodule.exports = WS;\n\t\n\t/**\n\t * WebSocket transport constructor.\n\t *\n\t * @api {Object} connection options\n\t * @api public\n\t */\n\t\n\tfunction WS (opts) {\n\t var forceBase64 = (opts && opts.forceBase64);\n\t if (forceBase64) {\n\t this.supportsBinary = false;\n\t }\n\t this.perMessageDeflate = opts.perMessageDeflate;\n\t this.usingBrowserWebSocket = BrowserWebSocket && !opts.forceNode;\n\t this.protocols = opts.protocols;\n\t if (!this.usingBrowserWebSocket) {\n\t WebSocket = NodeWebSocket;\n\t }\n\t Transport.call(this, opts);\n\t}\n\t\n\t/**\n\t * Inherits from Transport.\n\t */\n\t\n\tinherit(WS, Transport);\n\t\n\t/**\n\t * Transport name.\n\t *\n\t * @api public\n\t */\n\t\n\tWS.prototype.name = 'websocket';\n\t\n\t/*\n\t * WebSockets support binary\n\t */\n\t\n\tWS.prototype.supportsBinary = true;\n\t\n\t/**\n\t * Opens socket.\n\t *\n\t * @api private\n\t */\n\t\n\tWS.prototype.doOpen = function () {\n\t if (!this.check()) {\n\t // let probe timeout\n\t return;\n\t }\n\t\n\t var uri = this.uri();\n\t var protocols = this.protocols;\n\t var opts = {\n\t agent: this.agent,\n\t perMessageDeflate: this.perMessageDeflate\n\t };\n\t\n\t // SSL options for Node.js client\n\t opts.pfx = this.pfx;\n\t opts.key = this.key;\n\t opts.passphrase = this.passphrase;\n\t opts.cert = this.cert;\n\t opts.ca = this.ca;\n\t opts.ciphers = this.ciphers;\n\t opts.rejectUnauthorized = this.rejectUnauthorized;\n\t if (this.extraHeaders) {\n\t opts.headers = this.extraHeaders;\n\t }\n\t if (this.localAddress) {\n\t opts.localAddress = this.localAddress;\n\t }\n\t\n\t try {\n\t this.ws = this.usingBrowserWebSocket ? (protocols ? new WebSocket(uri, protocols) : new WebSocket(uri)) : new WebSocket(uri, protocols, opts);\n\t } catch (err) {\n\t return this.emit('error', err);\n\t }\n\t\n\t if (this.ws.binaryType === undefined) {\n\t this.supportsBinary = false;\n\t }\n\t\n\t if (this.ws.supports && this.ws.supports.binary) {\n\t this.supportsBinary = true;\n\t this.ws.binaryType = 'nodebuffer';\n\t } else {\n\t this.ws.binaryType = 'arraybuffer';\n\t }\n\t\n\t this.addEventListeners();\n\t};\n\t\n\t/**\n\t * Adds event listeners to the socket\n\t *\n\t * @api private\n\t */\n\t\n\tWS.prototype.addEventListeners = function () {\n\t var self = this;\n\t\n\t this.ws.onopen = function () {\n\t self.onOpen();\n\t };\n\t this.ws.onclose = function () {\n\t self.onClose();\n\t };\n\t this.ws.onmessage = function (ev) {\n\t self.onData(ev.data);\n\t };\n\t this.ws.onerror = function (e) {\n\t self.onError('websocket error', e);\n\t };\n\t};\n\t\n\t/**\n\t * Writes data to socket.\n\t *\n\t * @param {Array} array of packets.\n\t * @api private\n\t */\n\t\n\tWS.prototype.write = function (packets) {\n\t var self = this;\n\t this.writable = false;\n\t\n\t // encodePacket efficient as it uses WS framing\n\t // no need for encodePayload\n\t var total = packets.length;\n\t for (var i = 0, l = total; i < l; i++) {\n\t (function (packet) {\n\t parser.encodePacket(packet, self.supportsBinary, function (data) {\n\t if (!self.usingBrowserWebSocket) {\n\t // always create a new object (GH-437)\n\t var opts = {};\n\t if (packet.options) {\n\t opts.compress = packet.options.compress;\n\t }\n\t\n\t if (self.perMessageDeflate) {\n\t var len = 'string' === typeof data ? global.Buffer.byteLength(data) : data.length;\n\t if (len < self.perMessageDeflate.threshold) {\n\t opts.compress = false;\n\t }\n\t }\n\t }\n\t\n\t // Sometimes the websocket has already been closed but the browser didn't\n\t // have a chance of informing us about it yet, in that case send will\n\t // throw an error\n\t try {\n\t if (self.usingBrowserWebSocket) {\n\t // TypeError is thrown when passing the second argument on Safari\n\t self.ws.send(data);\n\t } else {\n\t self.ws.send(data, opts);\n\t }\n\t } catch (e) {\n\t debug('websocket closed before onclose event');\n\t }\n\t\n\t --total || done();\n\t });\n\t })(packets[i]);\n\t }\n\t\n\t function done () {\n\t self.emit('flush');\n\t\n\t // fake drain\n\t // defer to next tick to allow Socket to clear writeBuffer\n\t setTimeout(function () {\n\t self.writable = true;\n\t self.emit('drain');\n\t }, 0);\n\t }\n\t};\n\t\n\t/**\n\t * Called upon close\n\t *\n\t * @api private\n\t */\n\t\n\tWS.prototype.onClose = function () {\n\t Transport.prototype.onClose.call(this);\n\t};\n\t\n\t/**\n\t * Closes socket.\n\t *\n\t * @api private\n\t */\n\t\n\tWS.prototype.doClose = function () {\n\t if (typeof this.ws !== 'undefined') {\n\t this.ws.close();\n\t }\n\t};\n\t\n\t/**\n\t * Generates uri for connection.\n\t *\n\t * @api private\n\t */\n\t\n\tWS.prototype.uri = function () {\n\t var query = this.query || {};\n\t var schema = this.secure ? 'wss' : 'ws';\n\t var port = '';\n\t\n\t // avoid port if default for schema\n\t if (this.port && (('wss' === schema && Number(this.port) !== 443) ||\n\t ('ws' === schema && Number(this.port) !== 80))) {\n\t port = ':' + this.port;\n\t }\n\t\n\t // append timestamp to URI\n\t if (this.timestampRequests) {\n\t query[this.timestampParam] = yeast();\n\t }\n\t\n\t // communicate binary support capabilities\n\t if (!this.supportsBinary) {\n\t query.b64 = 1;\n\t }\n\t\n\t query = parseqs.encode(query);\n\t\n\t // prepend ? to query\n\t if (query.length) {\n\t query = '?' + query;\n\t }\n\t\n\t var ipv6 = this.hostname.indexOf(':') !== -1;\n\t return schema + '://' + (ipv6 ? '[' + this.hostname + ']' : this.hostname) + port + this.path + query;\n\t};\n\t\n\t/**\n\t * Feature detection for WebSocket.\n\t *\n\t * @return {Boolean} whether this transport is available.\n\t * @api public\n\t */\n\t\n\tWS.prototype.check = function () {\n\t return !!WebSocket && !('__initialize' in WebSocket && this.name === WS.prototype.name);\n\t};\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 55 */\n/***/ function(module, exports) {\n\n\t/* (ignored) */\n\n/***/ },\n/* 56 */\n/***/ function(module, exports) {\n\n\t\n\tvar indexOf = [].indexOf;\n\t\n\tmodule.exports = function(arr, obj){\n\t if (indexOf) return arr.indexOf(obj);\n\t for (var i = 0; i < arr.length; ++i) {\n\t if (arr[i] === obj) return i;\n\t }\n\t return -1;\n\t};\n\n/***/ },\n/* 57 */\n/***/ function(module, exports) {\n\n\t/**\r\n\t * Parses an URI\r\n\t *\r\n\t * @author Steven Levithan <stevenlevithan.com> (MIT license)\r\n\t * @api private\r\n\t */\r\n\t\r\n\tvar re = /^(?:(?![^:@]+:[^:@\\/]*@)(http|https|ws|wss):\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/;\r\n\t\r\n\tvar parts = [\r\n\t 'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'\r\n\t];\r\n\t\r\n\tmodule.exports = function parseuri(str) {\r\n\t var src = str,\r\n\t b = str.indexOf('['),\r\n\t e = str.indexOf(']');\r\n\t\r\n\t if (b != -1 && e != -1) {\r\n\t str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length);\r\n\t }\r\n\t\r\n\t var m = re.exec(str || ''),\r\n\t uri = {},\r\n\t i = 14;\r\n\t\r\n\t while (i--) {\r\n\t uri[parts[i]] = m[i] || '';\r\n\t }\r\n\t\r\n\t if (b != -1 && e != -1) {\r\n\t uri.source = src;\r\n\t uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':');\r\n\t uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':');\r\n\t uri.ipv6uri = true;\r\n\t }\r\n\t\r\n\t return uri;\r\n\t};\r\n\n\n/***/ },\n/* 58 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\n\t/**\n\t * Module dependencies.\n\t */\n\t\n\tvar parser = __webpack_require__(23);\n\tvar Emitter = __webpack_require__(24);\n\tvar toArray = __webpack_require__(59);\n\tvar on = __webpack_require__(60);\n\tvar bind = __webpack_require__(61);\n\tvar debug = __webpack_require__(19)('socket.io-client:socket');\n\tvar parseqs = __webpack_require__(47);\n\t\n\t/**\n\t * Module exports.\n\t */\n\t\n\tmodule.exports = exports = Socket;\n\t\n\t/**\n\t * Internal events (blacklisted).\n\t * These events can't be emitted by the user.\n\t *\n\t * @api private\n\t */\n\t\n\tvar events = {\n\t connect: 1,\n\t connect_error: 1,\n\t connect_timeout: 1,\n\t connecting: 1,\n\t disconnect: 1,\n\t error: 1,\n\t reconnect: 1,\n\t reconnect_attempt: 1,\n\t reconnect_failed: 1,\n\t reconnect_error: 1,\n\t reconnecting: 1,\n\t ping: 1,\n\t pong: 1\n\t};\n\t\n\t/**\n\t * Shortcut to `Emitter#emit`.\n\t */\n\t\n\tvar emit = Emitter.prototype.emit;\n\t\n\t/**\n\t * `Socket` constructor.\n\t *\n\t * @api public\n\t */\n\t\n\tfunction Socket (io, nsp, opts) {\n\t this.io = io;\n\t this.nsp = nsp;\n\t this.json = this; // compat\n\t this.ids = 0;\n\t this.acks = {};\n\t this.receiveBuffer = [];\n\t this.sendBuffer = [];\n\t this.connected = false;\n\t this.disconnected = true;\n\t if (opts && opts.query) {\n\t this.query = opts.query;\n\t }\n\t if (this.io.autoConnect) this.open();\n\t}\n\t\n\t/**\n\t * Mix in `Emitter`.\n\t */\n\t\n\tEmitter(Socket.prototype);\n\t\n\t/**\n\t * Subscribe to open, close and packet events\n\t *\n\t * @api private\n\t */\n\t\n\tSocket.prototype.subEvents = function () {\n\t if (this.subs) return;\n\t\n\t var io = this.io;\n\t this.subs = [\n\t on(io, 'open', bind(this, 'onopen')),\n\t on(io, 'packet', bind(this, 'onpacket')),\n\t on(io, 'close', bind(this, 'onclose'))\n\t ];\n\t};\n\t\n\t/**\n\t * \"Opens\" the socket.\n\t *\n\t * @api public\n\t */\n\t\n\tSocket.prototype.open =\n\tSocket.prototype.connect = function () {\n\t if (this.connected) return this;\n\t\n\t this.subEvents();\n\t this.io.open(); // ensure open\n\t if ('open' === this.io.readyState) this.onopen();\n\t this.emit('connecting');\n\t return this;\n\t};\n\t\n\t/**\n\t * Sends a `message` event.\n\t *\n\t * @return {Socket} self\n\t * @api public\n\t */\n\t\n\tSocket.prototype.send = function () {\n\t var args = toArray(arguments);\n\t args.unshift('message');\n\t this.emit.apply(this, args);\n\t return this;\n\t};\n\t\n\t/**\n\t * Override `emit`.\n\t * If the event is in `events`, it's emitted normally.\n\t *\n\t * @param {String} event name\n\t * @return {Socket} self\n\t * @api public\n\t */\n\t\n\tSocket.prototype.emit = function (ev) {\n\t if (events.hasOwnProperty(ev)) {\n\t emit.apply(this, arguments);\n\t return this;\n\t }\n\t\n\t var args = toArray(arguments);\n\t var packet = { type: parser.EVENT, data: args };\n\t\n\t packet.options = {};\n\t packet.options.compress = !this.flags || false !== this.flags.compress;\n\t\n\t // event ack callback\n\t if ('function' === typeof args[args.length - 1]) {\n\t debug('emitting packet with ack id %d', this.ids);\n\t this.acks[this.ids] = args.pop();\n\t packet.id = this.ids++;\n\t }\n\t\n\t if (this.connected) {\n\t this.packet(packet);\n\t } else {\n\t this.sendBuffer.push(packet);\n\t }\n\t\n\t delete this.flags;\n\t\n\t return this;\n\t};\n\t\n\t/**\n\t * Sends a packet.\n\t *\n\t * @param {Object} packet\n\t * @api private\n\t */\n\t\n\tSocket.prototype.packet = function (packet) {\n\t packet.nsp = this.nsp;\n\t this.io.packet(packet);\n\t};\n\t\n\t/**\n\t * Called upon engine `open`.\n\t *\n\t * @api private\n\t */\n\t\n\tSocket.prototype.onopen = function () {\n\t debug('transport is open - connecting');\n\t\n\t // write connect packet if necessary\n\t if ('/' !== this.nsp) {\n\t if (this.query) {\n\t var query = typeof this.query === 'object' ? parseqs.encode(this.query) : this.query;\n\t debug('sending connect packet with query %s', query);\n\t this.packet({type: parser.CONNECT, query: query});\n\t } else {\n\t this.packet({type: parser.CONNECT});\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Called upon engine `close`.\n\t *\n\t * @param {String} reason\n\t * @api private\n\t */\n\t\n\tSocket.prototype.onclose = function (reason) {\n\t debug('close (%s)', reason);\n\t this.connected = false;\n\t this.disconnected = true;\n\t delete this.id;\n\t this.emit('disconnect', reason);\n\t};\n\t\n\t/**\n\t * Called with socket packet.\n\t *\n\t * @param {Object} packet\n\t * @api private\n\t */\n\t\n\tSocket.prototype.onpacket = function (packet) {\n\t if (packet.nsp !== this.nsp) return;\n\t\n\t switch (packet.type) {\n\t case parser.CONNECT:\n\t this.onconnect();\n\t break;\n\t\n\t case parser.EVENT:\n\t this.onevent(packet);\n\t break;\n\t\n\t case parser.BINARY_EVENT:\n\t this.onevent(packet);\n\t break;\n\t\n\t case parser.ACK:\n\t this.onack(packet);\n\t break;\n\t\n\t case parser.BINARY_ACK:\n\t this.onack(packet);\n\t break;\n\t\n\t case parser.DISCONNECT:\n\t this.ondisconnect();\n\t break;\n\t\n\t case parser.ERROR:\n\t this.emit('error', packet.data);\n\t break;\n\t }\n\t};\n\t\n\t/**\n\t * Called upon a server event.\n\t *\n\t * @param {Object} packet\n\t * @api private\n\t */\n\t\n\tSocket.prototype.onevent = function (packet) {\n\t var args = packet.data || [];\n\t debug('emitting event %j', args);\n\t\n\t if (null != packet.id) {\n\t debug('attaching ack callback to event');\n\t args.push(this.ack(packet.id));\n\t }\n\t\n\t if (this.connected) {\n\t emit.apply(this, args);\n\t } else {\n\t this.receiveBuffer.push(args);\n\t }\n\t};\n\t\n\t/**\n\t * Produces an ack callback to emit with an event.\n\t *\n\t * @api private\n\t */\n\t\n\tSocket.prototype.ack = function (id) {\n\t var self = this;\n\t var sent = false;\n\t return function () {\n\t // prevent double callbacks\n\t if (sent) return;\n\t sent = true;\n\t var args = toArray(arguments);\n\t debug('sending ack %j', args);\n\t\n\t self.packet({\n\t type: parser.ACK,\n\t id: id,\n\t data: args\n\t });\n\t };\n\t};\n\t\n\t/**\n\t * Called upon a server acknowlegement.\n\t *\n\t * @param {Object} packet\n\t * @api private\n\t */\n\t\n\tSocket.prototype.onack = function (packet) {\n\t var ack = this.acks[packet.id];\n\t if ('function' === typeof ack) {\n\t debug('calling ack %s with %j', packet.id, packet.data);\n\t ack.apply(this, packet.data);\n\t delete this.acks[packet.id];\n\t } else {\n\t debug('bad ack %s', packet.id);\n\t }\n\t};\n\t\n\t/**\n\t * Called upon server connect.\n\t *\n\t * @api private\n\t */\n\t\n\tSocket.prototype.onconnect = function () {\n\t this.connected = true;\n\t this.disconnected = false;\n\t this.emit('connect');\n\t this.emitBuffered();\n\t};\n\t\n\t/**\n\t * Emit buffered events (received and emitted).\n\t *\n\t * @api private\n\t */\n\t\n\tSocket.prototype.emitBuffered = function () {\n\t var i;\n\t for (i = 0; i < this.receiveBuffer.length; i++) {\n\t emit.apply(this, this.receiveBuffer[i]);\n\t }\n\t this.receiveBuffer = [];\n\t\n\t for (i = 0; i < this.sendBuffer.length; i++) {\n\t this.packet(this.sendBuffer[i]);\n\t }\n\t this.sendBuffer = [];\n\t};\n\t\n\t/**\n\t * Called upon server disconnect.\n\t *\n\t * @api private\n\t */\n\t\n\tSocket.prototype.ondisconnect = function () {\n\t debug('server disconnect (%s)', this.nsp);\n\t this.destroy();\n\t this.onclose('io server disconnect');\n\t};\n\t\n\t/**\n\t * Called upon forced client/server side disconnections,\n\t * this method ensures the manager stops tracking us and\n\t * that reconnections don't get triggered for this.\n\t *\n\t * @api private.\n\t */\n\t\n\tSocket.prototype.destroy = function () {\n\t if (this.subs) {\n\t // clean subscriptions to avoid reconnections\n\t for (var i = 0; i < this.subs.length; i++) {\n\t this.subs[i].destroy();\n\t }\n\t this.subs = null;\n\t }\n\t\n\t this.io.destroy(this);\n\t};\n\t\n\t/**\n\t * Disconnects the socket manually.\n\t *\n\t * @return {Socket} self\n\t * @api public\n\t */\n\t\n\tSocket.prototype.close =\n\tSocket.prototype.disconnect = function () {\n\t if (this.connected) {\n\t debug('performing disconnect (%s)', this.nsp);\n\t this.packet({ type: parser.DISCONNECT });\n\t }\n\t\n\t // remove socket from pool\n\t this.destroy();\n\t\n\t if (this.connected) {\n\t // fire events\n\t this.onclose('io client disconnect');\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Sets the compress flag.\n\t *\n\t * @param {Boolean} if `true`, compresses the sending data\n\t * @return {Socket} self\n\t * @api public\n\t */\n\t\n\tSocket.prototype.compress = function (compress) {\n\t this.flags = this.flags || {};\n\t this.flags.compress = compress;\n\t return this;\n\t};\n\n\n/***/ },\n/* 59 */\n/***/ function(module, exports) {\n\n\tmodule.exports = toArray\n\t\n\tfunction toArray(list, index) {\n\t var array = []\n\t\n\t index = index || 0\n\t\n\t for (var i = index || 0; i < list.length; i++) {\n\t array[i - index] = list[i]\n\t }\n\t\n\t return array\n\t}\n\n\n/***/ },\n/* 60 */\n/***/ function(module, exports) {\n\n\t\n\t/**\n\t * Module exports.\n\t */\n\t\n\tmodule.exports = on;\n\t\n\t/**\n\t * Helper for subscriptions.\n\t *\n\t * @param {Object|EventEmitter} obj with `Emitter` mixin or `EventEmitter`\n\t * @param {String} event name\n\t * @param {Function} callback\n\t * @api public\n\t */\n\t\n\tfunction on (obj, ev, fn) {\n\t obj.on(ev, fn);\n\t return {\n\t destroy: function () {\n\t obj.removeListener(ev, fn);\n\t }\n\t };\n\t}\n\n\n/***/ },\n/* 61 */\n/***/ function(module, exports) {\n\n\t/**\n\t * Slice reference.\n\t */\n\t\n\tvar slice = [].slice;\n\t\n\t/**\n\t * Bind `obj` to `fn`.\n\t *\n\t * @param {Object} obj\n\t * @param {Function|String} fn or string\n\t * @return {Function}\n\t * @api public\n\t */\n\t\n\tmodule.exports = function(obj, fn){\n\t if ('string' == typeof fn) fn = obj[fn];\n\t if ('function' != typeof fn) throw new Error('bind() requires a function');\n\t var args = slice.call(arguments, 2);\n\t return function(){\n\t return fn.apply(obj, args.concat(slice.call(arguments)));\n\t }\n\t};\n\n\n/***/ },\n/* 62 */\n/***/ function(module, exports) {\n\n\t\n\t/**\n\t * Expose `Backoff`.\n\t */\n\t\n\tmodule.exports = Backoff;\n\t\n\t/**\n\t * Initialize backoff timer with `opts`.\n\t *\n\t * - `min` initial timeout in milliseconds [100]\n\t * - `max` max timeout [10000]\n\t * - `jitter` [0]\n\t * - `factor` [2]\n\t *\n\t * @param {Object} opts\n\t * @api public\n\t */\n\t\n\tfunction Backoff(opts) {\n\t opts = opts || {};\n\t this.ms = opts.min || 100;\n\t this.max = opts.max || 10000;\n\t this.factor = opts.factor || 2;\n\t this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0;\n\t this.attempts = 0;\n\t}\n\t\n\t/**\n\t * Return the backoff duration.\n\t *\n\t * @return {Number}\n\t * @api public\n\t */\n\t\n\tBackoff.prototype.duration = function(){\n\t var ms = this.ms * Math.pow(this.factor, this.attempts++);\n\t if (this.jitter) {\n\t var rand = Math.random();\n\t var deviation = Math.floor(rand * this.jitter * ms);\n\t ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation;\n\t }\n\t return Math.min(ms, this.max) | 0;\n\t};\n\t\n\t/**\n\t * Reset the number of attempts.\n\t *\n\t * @api public\n\t */\n\t\n\tBackoff.prototype.reset = function(){\n\t this.attempts = 0;\n\t};\n\t\n\t/**\n\t * Set the minimum duration\n\t *\n\t * @api public\n\t */\n\t\n\tBackoff.prototype.setMin = function(min){\n\t this.ms = min;\n\t};\n\t\n\t/**\n\t * Set the maximum duration\n\t *\n\t * @api public\n\t */\n\t\n\tBackoff.prototype.setMax = function(max){\n\t this.max = max;\n\t};\n\t\n\t/**\n\t * Set the jitter\n\t *\n\t * @api public\n\t */\n\t\n\tBackoff.prototype.setJitter = function(jitter){\n\t this.jitter = jitter;\n\t};\n\t\n\n\n/***/ },\n/* 63 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\n\t * @type {angular}\n\t */\n\tvar app = __webpack_require__(64);\n\t\n\tapp.service(\"Pages\", [\"pagesConfig\", \"$location\", ContentSections]);\n\t\n\t/**\n\t * @param pagesConfig\n\t * @param $location\n\t * @returns {{enable: Function, transform: Function, current: Function}}\n\t * @constructor\n\t */\n\tfunction ContentSections(pagesConfig, $location) {\n\t\n\t return {\n\t /**\n\t * Enable a single Item\n\t * @param $section\n\t * @returns {*}\n\t */\n\t enable: function ($section) {\n\t angular.forEach(pagesConfig, function (item) {\n\t item.active = false;\n\t });\n\t $section.active = true;\n\t return pagesConfig;\n\t },\n\t /**\n\t * Transform an item\n\t */\n\t transform: function ($section, fn) {\n\t if (typeof fn === \"function\") {\n\t return $section = fn($section);\n\t } else {\n\t throw new TypeError(\"Noooo\");\n\t }\n\t },\n\t /**\n\t * Get the current section based on the path\n\t * @returns {*}\n\t */\n\t current: function () {\n\t if ($location.path() === \"/\") {\n\t return pagesConfig[\"overview\"];\n\t }\n\t var match;\n\t angular.forEach(pagesConfig, function (item) {\n\t if (item.path === $location.path()) {\n\t match = item;\n\t }\n\t });\n\t return match;\n\t }\n\t };\n\t}\n\n/***/ },\n/* 64 */\n/***/ function(module, exports) {\n\n\t/**\n\t * @type {angular}\n\t */\n\tmodule.exports = window.angular.module(\"BrowserSync\");\n\n\n/***/ },\n/* 65 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar app = __webpack_require__(64);\n\t\n\tapp.factory(\"Options\", [\"Socket\", OptionsService]);\n\t\n\t/**\n\t * @param Socket\n\t * @returns {{all: Function}}\n\t * @constructor\n\t */\n\tfunction OptionsService(Socket) {\n\t\n\t return {\n\t all: function () {\n\t return Socket.getData(\"options\");\n\t }\n\t };\n\t}\n\n/***/ },\n/* 66 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar angular = __webpack_require__(11);\n\tvar store = __webpack_require__(67);\n\tvar objectPath = __webpack_require__(68);\n\t\n\tangular\n\t .module(\"bsStore\", [])\n\t .service(\"Store\", [\"$q\", \"$rootScope\", StoreModule]);\n\t\n\tfunction Store (ns) {\n\t var bs = store.get('bs', {});\n\t if (!Object.keys(bs).length) {\n\t store.set('bs', {});\n\t }\n\t this.ns = ns;\n\t this.get = function (path) {\n\t var bs = store.get('bs', {});\n\t if (!Object.keys(bs).length) {\n\t store.set('bs', {});\n\t }\n\t return objectPath.get(bs, [ns].concat(path).join('.'));\n\t };\n\t this.set = function (path, value) {\n\t var bs = store.get('bs', {});\n\t if (!Object.keys(bs).length) {\n\t store.set('bs', {});\n\t }\n\t if (!bs[ns]) {\n\t bs[ns] = {};\n\t }\n\t bs[ns][path] = value;\n\t store.set('bs', bs);\n\t },\n\t this.remove = function (path) {\n\t var bs = store.get('bs', {});\n\t if (!Object.keys(bs).length) {\n\t store.set('bs', {});\n\t }\n\t if (!bs[ns]) {\n\t bs[ns] = {};\n\t }\n\t if (bs[ns][path]) {\n\t delete bs[ns][path];\n\t }\n\t store.set('bs', bs);\n\t }\n\t}\n\t\n\tfunction StoreModule () {\n\t\n\t return {\n\t create: function (ns) {\n\t var store = new Store(ns);\n\t return store;\n\t }\n\t }\n\t};\n\t\n\n\n/***/ },\n/* 67 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(global) {\"use strict\"\n\t// Module export pattern from\n\t// https://github.com/umdjs/umd/blob/master/returnExports.js\n\t;(function (root, factory) {\n\t if (true) {\n\t // AMD. Register as an anonymous module.\n\t !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t } else if (typeof exports === 'object') {\n\t // Node. Does not work with strict CommonJS, but\n\t // only CommonJS-like environments that support module.exports,\n\t // like Node.\n\t module.exports = factory();\n\t } else {\n\t // Browser globals (root is window)\n\t root.store = factory();\n\t }\n\t}(this, function () {\n\t\t\n\t\t// Store.js\n\t\tvar store = {},\n\t\t\twin = (typeof window != 'undefined' ? window : global),\n\t\t\tdoc = win.document,\n\t\t\tlocalStorageName = 'localStorage',\n\t\t\tscriptTag = 'script',\n\t\t\tstorage\n\t\n\t\tstore.disabled = false\n\t\tstore.version = '1.3.20'\n\t\tstore.set = function(key, value) {}\n\t\tstore.get = function(key, defaultVal) {}\n\t\tstore.has = function(key) { return store.get(key) !== undefined }\n\t\tstore.remove = function(key) {}\n\t\tstore.clear = function() {}\n\t\tstore.transact = function(key, defaultVal, transactionFn) {\n\t\t\tif (transactionFn == null) {\n\t\t\t\ttransactionFn = defaultVal\n\t\t\t\tdefaultVal = null\n\t\t\t}\n\t\t\tif (defaultVal == null) {\n\t\t\t\tdefaultVal = {}\n\t\t\t}\n\t\t\tvar val = store.get(key, defaultVal)\n\t\t\ttransactionFn(val)\n\t\t\tstore.set(key, val)\n\t\t}\n\t\tstore.getAll = function() {}\n\t\tstore.forEach = function() {}\n\t\n\t\tstore.serialize = function(value) {\n\t\t\treturn JSON.stringify(value)\n\t\t}\n\t\tstore.deserialize = function(value) {\n\t\t\tif (typeof value != 'string') { return undefined }\n\t\t\ttry { return JSON.parse(value) }\n\t\t\tcatch(e) { return value || undefined }\n\t\t}\n\t\n\t\t// Functions to encapsulate questionable FireFox 3.6.13 behavior\n\t\t// when about.config::dom.storage.enabled === false\n\t\t// See https://github.com/marcuswestin/store.js/issues#issue/13\n\t\tfunction isLocalStorageNameSupported() {\n\t\t\ttry { return (localStorageName in win && win[localStorageName]) }\n\t\t\tcatch(err) { return false }\n\t\t}\n\t\n\t\tif (isLocalStorageNameSupported()) {\n\t\t\tstorage = win[localStorageName]\n\t\t\tstore.set = function(key, val) {\n\t\t\t\tif (val === undefined) { return store.remove(key) }\n\t\t\t\tstorage.setItem(key, store.serialize(val))\n\t\t\t\treturn val\n\t\t\t}\n\t\t\tstore.get = function(key, defaultVal) {\n\t\t\t\tvar val = store.deserialize(storage.getItem(key))\n\t\t\t\treturn (val === undefined ? defaultVal : val)\n\t\t\t}\n\t\t\tstore.remove = function(key) { storage.removeItem(key) }\n\t\t\tstore.clear = function() { storage.clear() }\n\t\t\tstore.getAll = function() {\n\t\t\t\tvar ret = {}\n\t\t\t\tstore.forEach(function(key, val) {\n\t\t\t\t\tret[key] = val\n\t\t\t\t})\n\t\t\t\treturn ret\n\t\t\t}\n\t\t\tstore.forEach = function(callback) {\n\t\t\t\tfor (var i=0; i<storage.length; i++) {\n\t\t\t\t\tvar key = storage.key(i)\n\t\t\t\t\tcallback(key, store.get(key))\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (doc && doc.documentElement.addBehavior) {\n\t\t\tvar storageOwner,\n\t\t\t\tstorageContainer\n\t\t\t// Since #userData storage applies only to specific paths, we need to\n\t\t\t// somehow link our data to a specific path. We choose /favicon.ico\n\t\t\t// as a pretty safe option, since all browsers already make a request to\n\t\t\t// this URL anyway and being a 404 will not hurt us here. We wrap an\n\t\t\t// iframe pointing to the favicon in an ActiveXObject(htmlfile) object\n\t\t\t// (see: http://msdn.microsoft.com/en-us/library/aa752574(v=VS.85).aspx)\n\t\t\t// since the iframe access rules appear to allow direct access and\n\t\t\t// manipulation of the document element, even for a 404 page. This\n\t\t\t// document can be used instead of the current document (which would\n\t\t\t// have been limited to the current path) to perform #userData storage.\n\t\t\ttry {\n\t\t\t\tstorageContainer = new ActiveXObject('htmlfile')\n\t\t\t\tstorageContainer.open()\n\t\t\t\tstorageContainer.write('<'+scriptTag+'>document.w=window</'+scriptTag+'><iframe src=\"/favicon.ico\"></iframe>')\n\t\t\t\tstorageContainer.close()\n\t\t\t\tstorageOwner = storageContainer.w.frames[0].document\n\t\t\t\tstorage = storageOwner.createElement('div')\n\t\t\t} catch(e) {\n\t\t\t\t// somehow ActiveXObject instantiation failed (perhaps some special\n\t\t\t\t// security settings or otherwse), fall back to per-path storage\n\t\t\t\tstorage = doc.createElement('div')\n\t\t\t\tstorageOwner = doc.body\n\t\t\t}\n\t\t\tvar withIEStorage = function(storeFunction) {\n\t\t\t\treturn function() {\n\t\t\t\t\tvar args = Array.prototype.slice.call(arguments, 0)\n\t\t\t\t\targs.unshift(storage)\n\t\t\t\t\t// See http://msdn.microsoft.com/en-us/library/ms531081(v=VS.85).aspx\n\t\t\t\t\t// and http://msdn.microsoft.com/en-us/library/ms531424(v=VS.85).aspx\n\t\t\t\t\tstorageOwner.appendChild(storage)\n\t\t\t\t\tstorage.addBehavior('#default#userData')\n\t\t\t\t\tstorage.load(localStorageName)\n\t\t\t\t\tvar result = storeFunction.apply(store, args)\n\t\t\t\t\tstorageOwner.removeChild(storage)\n\t\t\t\t\treturn result\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// In IE7, keys cannot start with a digit or contain certain chars.\n\t\t\t// See https://github.com/marcuswestin/store.js/issues/40\n\t\t\t// See https://github.com/marcuswestin/store.js/issues/83\n\t\t\tvar forbiddenCharsRegex = new RegExp(\"[!\\\"#$%&'()*+,/\\\\\\\\:;<=>?@[\\\\]^`{|}~]\", \"g\")\n\t\t\tvar ieKeyFix = function(key) {\n\t\t\t\treturn key.replace(/^d/, '___$&').replace(forbiddenCharsRegex, '___')\n\t\t\t}\n\t\t\tstore.set = withIEStorage(function(storage, key, val) {\n\t\t\t\tkey = ieKeyFix(key)\n\t\t\t\tif (val === undefined) { return store.remove(key) }\n\t\t\t\tstorage.setAttribute(key, store.serialize(val))\n\t\t\t\tstorage.save(localStorageName)\n\t\t\t\treturn val\n\t\t\t})\n\t\t\tstore.get = withIEStorage(function(storage, key, defaultVal) {\n\t\t\t\tkey = ieKeyFix(key)\n\t\t\t\tvar val = store.deserialize(storage.getAttribute(key))\n\t\t\t\treturn (val === undefined ? defaultVal : val)\n\t\t\t})\n\t\t\tstore.remove = withIEStorage(function(storage, key) {\n\t\t\t\tkey = ieKeyFix(key)\n\t\t\t\tstorage.removeAttribute(key)\n\t\t\t\tstorage.save(localStorageName)\n\t\t\t})\n\t\t\tstore.clear = withIEStorage(function(storage) {\n\t\t\t\tvar attributes = storage.XMLDocument.documentElement.attributes\n\t\t\t\tstorage.load(localStorageName)\n\t\t\t\tfor (var i=attributes.length-1; i>=0; i--) {\n\t\t\t\t\tstorage.removeAttribute(attributes[i].name)\n\t\t\t\t}\n\t\t\t\tstorage.save(localStorageName)\n\t\t\t})\n\t\t\tstore.getAll = function(storage) {\n\t\t\t\tvar ret = {}\n\t\t\t\tstore.forEach(function(key, val) {\n\t\t\t\t\tret[key] = val\n\t\t\t\t})\n\t\t\t\treturn ret\n\t\t\t}\n\t\t\tstore.forEach = withIEStorage(function(storage, callback) {\n\t\t\t\tvar attributes = storage.XMLDocument.documentElement.attributes\n\t\t\t\tfor (var i=0, attr; attr=attributes[i]; ++i) {\n\t\t\t\t\tcallback(attr.name, store.deserialize(storage.getAttribute(attr.name)))\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\n\t\ttry {\n\t\t\tvar testKey = '__storejs__'\n\t\t\tstore.set(testKey, testKey)\n\t\t\tif (store.get(testKey) != testKey) { store.disabled = true }\n\t\t\tstore.remove(testKey)\n\t\t} catch(e) {\n\t\t\tstore.disabled = true\n\t\t}\n\t\tstore.enabled = !store.disabled\n\t\t\n\t\treturn store\n\t}));\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 68 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, factory){\n\t 'use strict';\n\t\n\t /*istanbul ignore next:cant test*/\n\t if (typeof module === 'object' && typeof module.exports === 'object') {\n\t module.exports = factory();\n\t } else if (true) {\n\t // AMD. Register as an anonymous module.\n\t !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t } else {\n\t // Browser globals\n\t root.objectPath = factory();\n\t }\n\t})(this, function(){\n\t 'use strict';\n\t\n\t var\n\t toStr = Object.prototype.toString,\n\t _hasOwnProperty = Object.prototype.hasOwnProperty;\n\t\n\t function isEmpty(value){\n\t if (!value) {\n\t return true;\n\t }\n\t if (isArray(value) && value.length === 0) {\n\t return true;\n\t } else if (!isString(value)) {\n\t for (var i in value) {\n\t if (_hasOwnProperty.call(value, i)) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }\n\t return false;\n\t }\n\t\n\t function toString(type){\n\t return toStr.call(type);\n\t }\n\t\n\t function isNumber(value){\n\t return typeof value === 'number' || toString(value) === \"[object Number]\";\n\t }\n\t\n\t function isString(obj){\n\t return typeof obj === 'string' || toString(obj) === \"[object String]\";\n\t }\n\t\n\t function isObject(obj){\n\t return typeof obj === 'object' && toString(obj) === \"[object Object]\";\n\t }\n\t\n\t function isArray(obj){\n\t return typeof obj === 'object' && typeof obj.length === 'number' && toString(obj) === '[object Array]';\n\t }\n\t\n\t function isBoolean(obj){\n\t return typeof obj === 'boolean' || toString(obj) === '[object Boolean]';\n\t }\n\t\n\t function getKey(key){\n\t var intKey = parseInt(key);\n\t if (intKey.toString() === key) {\n\t return intKey;\n\t }\n\t return key;\n\t }\n\t\n\t function set(obj, path, value, doNotReplace){\n\t if (isNumber(path)) {\n\t path = [path];\n\t }\n\t if (isEmpty(path)) {\n\t return obj;\n\t }\n\t if (isString(path)) {\n\t return set(obj, path.split('.').map(getKey), value, doNotReplace);\n\t }\n\t var currentPath = path[0];\n\t\n\t if (path.length === 1) {\n\t var oldVal = obj[currentPath];\n\t if (oldVal === void 0 || !doNotReplace) {\n\t obj[currentPath] = value;\n\t }\n\t return oldVal;\n\t }\n\t\n\t if (obj[currentPath] === void 0) {\n\t //check if we assume an array\n\t if(isNumber(path[1])) {\n\t obj[currentPath] = [];\n\t } else {\n\t obj[currentPath] = {};\n\t }\n\t }\n\t\n\t return set(obj[currentPath], path.slice(1), value, doNotReplace);\n\t }\n\t\n\t function del(obj, path) {\n\t if (isNumber(path)) {\n\t path = [path];\n\t }\n\t\n\t if (isEmpty(obj)) {\n\t return void 0;\n\t }\n\t\n\t if (isEmpty(path)) {\n\t return obj;\n\t }\n\t if(isString(path)) {\n\t return del(obj, path.split('.'));\n\t }\n\t\n\t var currentPath = getKey(path[0]);\n\t var oldVal = obj[currentPath];\n\t\n\t if(path.length === 1) {\n\t if (oldVal !== void 0) {\n\t if (isArray(obj)) {\n\t obj.splice(currentPath, 1);\n\t } else {\n\t delete obj[currentPath];\n\t }\n\t }\n\t } else {\n\t if (obj[currentPath] !== void 0) {\n\t return del(obj[currentPath], path.slice(1));\n\t }\n\t }\n\t\n\t return obj;\n\t }\n\t\n\t var objectPath = function(obj) {\n\t return Object.keys(objectPath).reduce(function(proxy, prop) {\n\t if (typeof objectPath[prop] === 'function') {\n\t proxy[prop] = objectPath[prop].bind(objectPath, obj);\n\t }\n\t\n\t return proxy;\n\t }, {});\n\t };\n\t\n\t objectPath.has = function (obj, path) {\n\t if (isEmpty(obj)) {\n\t return false;\n\t }\n\t\n\t if (isNumber(path)) {\n\t path = [path];\n\t } else if (isString(path)) {\n\t path = path.split('.');\n\t }\n\t\n\t if (isEmpty(path) || path.length === 0) {\n\t return false;\n\t }\n\t\n\t for (var i = 0; i < path.length; i++) {\n\t var j = path[i];\n\t if ((isObject(obj) || isArray(obj)) && _hasOwnProperty.call(obj, j)) {\n\t obj = obj[j];\n\t } else {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t };\n\t\n\t objectPath.ensureExists = function (obj, path, value){\n\t return set(obj, path, value, true);\n\t };\n\t\n\t objectPath.set = function (obj, path, value, doNotReplace){\n\t return set(obj, path, value, doNotReplace);\n\t };\n\t\n\t objectPath.insert = function (obj, path, value, at){\n\t var arr = objectPath.get(obj, path);\n\t at = ~~at;\n\t if (!isArray(arr)) {\n\t arr = [];\n\t objectPath.set(obj, path, arr);\n\t }\n\t arr.splice(at, 0, value);\n\t };\n\t\n\t objectPath.empty = function(obj, path) {\n\t if (isEmpty(path)) {\n\t return obj;\n\t }\n\t if (isEmpty(obj)) {\n\t return void 0;\n\t }\n\t\n\t var value, i;\n\t if (!(value = objectPath.get(obj, path))) {\n\t return obj;\n\t }\n\t\n\t if (isString(value)) {\n\t return objectPath.set(obj, path, '');\n\t } else if (isBoolean(value)) {\n\t return objectPath.set(obj, path, false);\n\t } else if (isNumber(value)) {\n\t return objectPath.set(obj, path, 0);\n\t } else if (isArray(value)) {\n\t value.length = 0;\n\t } else if (isObject(value)) {\n\t for (i in value) {\n\t if (_hasOwnProperty.call(value, i)) {\n\t delete value[i];\n\t }\n\t }\n\t } else {\n\t return objectPath.set(obj, path, null);\n\t }\n\t };\n\t\n\t objectPath.push = function (obj, path /*, values */){\n\t var arr = objectPath.get(obj, path);\n\t if (!isArray(arr)) {\n\t arr = [];\n\t objectPath.set(obj, path, arr);\n\t }\n\t\n\t arr.push.apply(arr, Array.prototype.slice.call(arguments, 2));\n\t };\n\t\n\t objectPath.coalesce = function (obj, paths, defaultValue) {\n\t var value;\n\t\n\t for (var i = 0, len = paths.length; i < len; i++) {\n\t if ((value = objectPath.get(obj, paths[i])) !== void 0) {\n\t return value;\n\t }\n\t }\n\t\n\t return defaultValue;\n\t };\n\t\n\t objectPath.get = function (obj, path, defaultValue){\n\t if (isNumber(path)) {\n\t path = [path];\n\t }\n\t if (isEmpty(path)) {\n\t return obj;\n\t }\n\t if (isEmpty(obj)) {\n\t return defaultValue;\n\t }\n\t if (isString(path)) {\n\t return objectPath.get(obj, path.split('.'), defaultValue);\n\t }\n\t\n\t var currentPath = getKey(path[0]);\n\t\n\t if (path.length === 1) {\n\t if (obj[currentPath] === void 0) {\n\t return defaultValue;\n\t }\n\t return obj[currentPath];\n\t }\n\t\n\t return objectPath.get(obj[currentPath], path.slice(1), defaultValue);\n\t };\n\t\n\t objectPath.del = function(obj, path) {\n\t return del(obj, path);\n\t };\n\t\n\t return objectPath;\n\t});\n\n\n/***/ },\n/* 69 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar app = __webpack_require__(64);\n\t\n\tapp.controller(\"MainController\", [\n\t \"$scope\",\n\t \"$rootScope\",\n\t \"$location\",\n\t \"$injector\",\n\t MainController\n\t]);\n\t\n\t\n\t/**\n\t * @param $scope\n\t * @param $rootScope\n\t * @param $location\n\t * @param $injector\n\t * @constructor\n\t */\n\tfunction MainController ($scope, $rootScope, $location, $injector) {\n\t\n\t var ctrl = this;\n\t ctrl.options = false;\n\t ctrl.browsers = [];\n\t ctrl.socketId = \"\";\n\t\n\t var pagesConfig = $injector.get(\"pagesConfig\");\n\t var Pages = $injector.get(\"Pages\");\n\t var Socket = $injector.get(\"Socket\");\n\t var Clients = $injector.get(\"Clients\");\n\t\n\t ctrl.ui = {\n\t menu: pagesConfig,\n\t sectionMenu: false,\n\t disconnected: false\n\t };\n\t\n\t /**\n\t * @param $section\n\t */\n\t ctrl.setActiveSection = function ($section) {\n\t Pages.enable($section);\n\t $location.path($section.path);\n\t ctrl.ui.sectionMenu = false;\n\t };\n\t\n\t /**\n\t * Refresh all event\n\t */\n\t ctrl.reloadAll = function () {\n\t Clients.reloadAll();\n\t $rootScope.$emit(\"notify:flash\", {\n\t heading: \"Instruction sent:\",\n\t message: \"Reload All Browsers ✔\"\n\t });\n\t };\n\t\n\t /**\n\t * @param value\n\t */\n\t ctrl.scrollAllTo = function () {\n\t Clients.scrollAllTo(0);\n\t $rootScope.$emit(\"notify:flash\", {\n\t heading: \"Instruction sent:\",\n\t message: \"Scroll all browsers to Y=0 ✔\"\n\t });\n\t };\n\t\n\t /**\n\t * Emit the socket event\n\t */\n\t ctrl.sendAllTo = function (path) {\n\t Clients.sendAllTo(path);\n\t $rootScope.$emit(\"notify:flash\", {\n\t heading: \"Instruction sent:\",\n\t message: \"Reset all Browsers to /\"\n\t });\n\t };\n\t\n\t /**\n\t *\n\t */\n\t ctrl.toggleMenu = function () {\n\t ctrl.ui.sectionMenu = !ctrl.ui.sectionMenu;\n\t };\n\t\n\t /**\n\t * @type {{connection: connection, addBrowsers: addBrowsers}}\n\t */\n\t ctrl.socketEvents = {\n\t\n\t /**\n\t * @param options\n\t */\n\t connection: function (options) {\n\t ctrl.update(options);\n\t },\n\t /**\n\t *\n\t */\n\t disconnect: function () {\n\t ctrl.ui.disconnected = true;\n\t }\n\t };\n\t\n\t /**\n\t * Update the current $scope\n\t */\n\t ctrl.update = function (options) {\n\t\n\t ctrl.options = transformOptions(options);\n\t ctrl.ui.disconnected = false;\n\t\n\t Pages.transform(pagesConfig[\"overview\"], function ($section) {\n\t return $section;\n\t });\n\t };\n\t\n\t /**\n\t * Set the currently active page\n\t */\n\t ctrl.setActiveSection(Pages.current());\n\t\n\t /**\n\t * Get options from socket connection\n\t */\n\t Socket.options().then(ctrl.socketEvents.connection);\n\t\n\t /**\n\t * React to disconnects\n\t */\n\t $rootScope.$on(\"ui:disconnect\", ctrl.socketEvents.disconnect);\n\t $rootScope.$on(\"ui:connection\", function (evt, options) {\n\t ctrl.socketEvents.connection(options);\n\t $scope.$digest();\n\t });\n\t}\n\t\n\t/**\n\t * Options transformations\n\t * @param options\n\t * @returns {*}\n\t */\n\tfunction transformOptions(options) {\n\t\n\t options.displayUrl = getDisplayUrl(options.urls);\n\t\n\t return options;\n\t}\n\t\n\t/**\n\t * @param urls\n\t * @returns {*}\n\t */\n\tfunction getDisplayUrl (urls) {\n\t if (!urls) {\n\t return false;\n\t }\n\t return urls.external || urls.local;\n\t}\n\n/***/ },\n/* 70 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar module = __webpack_require__(64); //jshint ignore:line\n\tvar utils = __webpack_require__(71); //jshint ignore:line\n\t\n\tmodule\n\t .filter(\"ucfirst\", function () { return utils.ucfirst; })\n\t .filter(\"localRootUrl\", function () { return utils.localRootUrl; })\n\t .filter(\"localUrl\", function () { return utils.localRootUrl; })\n\t .filter(\"orderObjectBy\", function () { return utils.orderObjectBy; });\n\n/***/ },\n/* 71 */\n/***/ function(module, exports) {\n\n\tmodule.exports = {\n\t ucfirst: function (string) {\n\t return string.charAt(0).toUpperCase() + string.slice(1);\n\t },\n\t localRootUrl: function (port, scheme) {\n\t return [scheme, \"://\", window.location.hostname, \":\", port].join(\"\");\n\t },\n\t localUrl: function(path, port, mode) {\n\t if (mode === \"snippet\") {\n\t return path;\n\t }\n\t return [\"//\", window.location.hostname, \":\", port, path].join(\"\");\n\t },\n\t orderObjectBy: function (items, field, reverse) {\n\t var filtered = [];\n\t Object.keys(items).forEach(function(key) {\n\t filtered.push(items[key]);\n\t });\n\t filtered.sort(function (a, b) {\n\t return (a[field] > b[field] ? 1 : -1);\n\t });\n\t if (reverse) {\n\t filtered.reverse();\n\t }\n\t return filtered;\n\t }\n\t};\n\n/***/ },\n/* 72 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar module = __webpack_require__(64); //jshint ignore:line\n\t\n\tmodule.directive(\"icon\", __webpack_require__(73));\n\tmodule.directive(\"linkTo\", __webpack_require__(74));\n\tmodule.directive(\"switch\", __webpack_require__(75));\n\tmodule.directive(\"newTab\", __webpack_require__(76));\n\n/***/ },\n/* 73 */\n/***/ function(module, exports) {\n\n\tmodule.exports = function () {\n\t return {\n\t scope: {\n\t icon: \"@\"\n\t },\n\t restrict: \"E\",\n\t replace: true,\n\t template: \"<svg bs-svg-icon><use xlink:href=\\\"{{iconName}}\\\"></use></svg>\",\n\t link: function (scope, elem, attrs) {\n\t scope.iconName = \"#svg-\" + scope.icon;\n\t return scope;\n\t }\n\t };\n\t};\n\n/***/ },\n/* 74 */\n/***/ function(module, exports) {\n\n\tmodule.exports = function () {\n\t return {\n\t restrict: \"E\",\n\t replace: false,\n\t transclude: true,\n\t scope: {\n\t \"path\": \"@\"\n\t },\n\t template: \"<a href='#' ng-click='navi(path)' ng-transclude=''>as</a>\",\n\t controller: [\"$scope\", \"$location\", \"$injector\", function ($scope, $location, $injector) {\n\t\n\t var pages = $injector.get(\"pagesConfig\");\n\t var Pages = $injector.get(\"Pages\");\n\t\n\t $scope.navi = function (path) {\n\t var item = pages[path];\n\t Pages.enable(item);\n\t $location.path(path);\n\t };\n\t }]\n\t };\n\t};\n\n/***/ },\n/* 75 */\n/***/ function(module, exports) {\n\n\tmodule.exports = function () {\n\t return {\n\t scope: {\n\t toggle: \"&\",\n\t item: \"=\",\n\t switchid: \"@\",\n\t title: \"@\",\n\t tagline: \"@\",\n\t active: \"=\",\n\t prop: \"@\"\n\t },\n\t restrict: \"E\",\n\t replace: true,\n\t transclude: true,\n\t templateUrl: \"bs-switch.html\",\n\t controllerAs: \"ctrl\",\n\t controller: [\"$scope\", function ($scope) {\n\t var ctrl = this;\n\t ctrl.item = $scope.item;\n\t }]\n\t };\n\t};\n\n/***/ },\n/* 76 */\n/***/ function(module, exports) {\n\n\tmodule.exports = function () {\n\t return {\n\t scope: {\n\t url: \"@\",\n\t mode: \"@\"\n\t },\n\t restrict: \"E\",\n\t replace: true,\n\t template: '<a href=\"{{url}}\" bs-button=\"subtle-alt icon\" target=\"_blank\" title=\"Open a new tab\" ng-show=\"mode !== \\'snippet\\'\"><icon icon=\"newtab\"></icon> New Tab </a>' //jshint:ignore\n\t };\n\t};\n\n/***/ }\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// js/app.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap dbdfcc42c882e3972c4b","require('angular');\nrequire('angular-route');\nrequire('angular-sanitize');\nrequire('angular-touch');\n\nvar angular = window.angular;\n\nangular\n .module(\"BrowserSync\", [\n \"bsHistory\",\n \"bsClients\",\n \"bsDisconnect\",\n \"bsNotify\",\n \"bsSocket\",\n \"bsStore\",\n \"ngRoute\",\n \"ngTouch\",\n \"ngSanitize\"\n ])\n .config([\"$locationProvider\", Config]);\n\n/**\n * @constructor\n * @param $locationProvider\n */\nfunction Config($locationProvider) {\n $locationProvider.html5Mode({\n enabled: true,\n requireBase: false\n });\n}\n\n\n/**\n * Modules\n * @type {exports}\n */\n/* jshint ignore:start */\nvar discon = require(\"./modules/bsDisconnect\");\nvar notify = require(\"./modules/bsNotify\");\nvar history = require(\"./modules/bsHistory\");\nvar clients = require(\"./modules/bsClients\");\nvar socket = require(\"./modules/bsSocket\");\nvar app = require(\"./services/Pages\");\nvar options = require(\"./services/Options\");\nvar Store = require(\"./modules/bsStore\");\nvar mainCtrl = require(\"./main/controller\");\nvar filter = require(\"./filters\");\nvar directives = require(\"./directives\");\n\n/* jshint ignore:end */\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./app.js\n// module id = 1\n// module chunks = 0","require('./angular');\nmodule.exports = angular;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/angular/index.js\n// module id = 2\n// module chunks = 0","/**\n * @license AngularJS v1.4.14\n * (c) 2010-2015 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, document, undefined) {'use strict';\n\n/**\n * @description\n *\n * This object provides a utility for producing rich Error messages within\n * Angular. It can be called as follows:\n *\n * var exampleMinErr = minErr('example');\n * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);\n *\n * The above creates an instance of minErr in the example namespace. The\n * resulting error will have a namespaced error code of example.one. The\n * resulting error will replace {0} with the value of foo, and {1} with the\n * value of bar. The object is not restricted in the number of arguments it can\n * take.\n *\n * If fewer arguments are specified than necessary for interpolation, the extra\n * interpolation markers will be preserved in the final string.\n *\n * Since data will be parsed statically during a build step, some restrictions\n * are applied with respect to how minErr instances are created and called.\n * Instances should have names of the form namespaceMinErr for a minErr created\n * using minErr('namespace') . Error codes, namespaces and template strings\n * should all be static strings, not variables or general expressions.\n *\n * @param {string} module The namespace to use for the new minErr instance.\n * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning\n * error from returned function, for cases when a particular type of error is useful.\n * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance\n */\n\nfunction minErr(module, ErrorConstructor) {\n ErrorConstructor = ErrorConstructor || Error;\n return function() {\n var SKIP_INDEXES = 2;\n\n var templateArgs = arguments,\n code = templateArgs[0],\n message = '[' + (module ? module + ':' : '') + code + '] ',\n template = templateArgs[1],\n paramPrefix, i;\n\n message += template.replace(/\\{\\d+\\}/g, function(match) {\n var index = +match.slice(1, -1),\n shiftedIndex = index + SKIP_INDEXES;\n\n if (shiftedIndex < templateArgs.length) {\n return toDebugString(templateArgs[shiftedIndex]);\n }\n\n return match;\n });\n\n message += '\\nhttp://errors.angularjs.org/1.4.14/' +\n (module ? module + '/' : '') + code;\n\n for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {\n message += paramPrefix + 'p' + (i - SKIP_INDEXES) + '=' +\n encodeURIComponent(toDebugString(templateArgs[i]));\n }\n\n return new ErrorConstructor(message);\n };\n}\n\n/* We need to tell jshint what variables are being exported */\n/* global angular: true,\n msie: true,\n jqLite: true,\n jQuery: true,\n slice: true,\n splice: true,\n push: true,\n toString: true,\n ngMinErr: true,\n angularModule: true,\n uid: true,\n REGEX_STRING_REGEXP: true,\n VALIDITY_STATE_PROPERTY: true,\n\n lowercase: true,\n uppercase: true,\n manualLowercase: true,\n manualUppercase: true,\n nodeName_: true,\n isArrayLike: true,\n forEach: true,\n forEachSorted: true,\n reverseParams: true,\n nextUid: true,\n setHashKey: true,\n extend: true,\n toInt: true,\n inherit: true,\n merge: true,\n noop: true,\n identity: true,\n valueFn: true,\n isUndefined: true,\n isDefined: true,\n isObject: true,\n isBlankObject: true,\n isString: true,\n isNumber: true,\n isDate: true,\n isArray: true,\n isFunction: true,\n isRegExp: true,\n isWindow: true,\n isScope: true,\n isFile: true,\n isFormData: true,\n isBlob: true,\n isBoolean: true,\n isPromiseLike: true,\n trim: true,\n escapeForRegexp: true,\n isElement: true,\n makeMap: true,\n includes: true,\n arrayRemove: true,\n copy: true,\n shallowCopy: true,\n equals: true,\n csp: true,\n jq: true,\n concat: true,\n sliceArgs: true,\n bind: true,\n toJsonReplacer: true,\n toJson: true,\n fromJson: true,\n convertTimezoneToLocal: true,\n timezoneToOffset: true,\n startingTag: true,\n tryDecodeURIComponent: true,\n parseKeyValue: true,\n toKeyValue: true,\n encodeUriSegment: true,\n encodeUriQuery: true,\n angularInit: true,\n bootstrap: true,\n getTestability: true,\n snake_case: true,\n bindJQuery: true,\n assertArg: true,\n assertArgFn: true,\n assertNotHasOwnProperty: true,\n getter: true,\n getBlockNodes: true,\n hasOwnProperty: true,\n createMap: true,\n\n NODE_TYPE_ELEMENT: true,\n NODE_TYPE_ATTRIBUTE: true,\n NODE_TYPE_TEXT: true,\n NODE_TYPE_COMMENT: true,\n NODE_TYPE_DOCUMENT: true,\n NODE_TYPE_DOCUMENT_FRAGMENT: true,\n*/\n\n////////////////////////////////////\n\n/**\n * @ngdoc module\n * @name ng\n * @module ng\n * @description\n *\n * # ng (core module)\n * The ng module is loaded by default when an AngularJS application is started. The module itself\n * contains the essential components for an AngularJS application to function. The table below\n * lists a high level breakdown of each of the services/factories, filters, directives and testing\n * components available within this core module.\n *\n * <div doc-module-components=\"ng\"></div>\n */\n\nvar REGEX_STRING_REGEXP = /^\\/(.+)\\/([a-z]*)$/;\n\n// The name of a form control's ValidityState property.\n// This is used so that it's possible for internal tests to create mock ValidityStates.\nvar VALIDITY_STATE_PROPERTY = 'validity';\n\n/**\n * @ngdoc function\n * @name angular.lowercase\n * @module ng\n * @kind function\n *\n * @description Converts the specified string to lowercase.\n * @param {string} string String to be converted to lowercase.\n * @returns {string} Lowercased string.\n */\nvar lowercase = function(string) {return isString(string) ? string.toLowerCase() : string;};\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * @ngdoc function\n * @name angular.uppercase\n * @module ng\n * @kind function\n *\n * @description Converts the specified string to uppercase.\n * @param {string} string String to be converted to uppercase.\n * @returns {string} Uppercased string.\n */\nvar uppercase = function(string) {return isString(string) ? string.toUpperCase() : string;};\n\n\nvar manualLowercase = function(s) {\n /* jshint bitwise: false */\n return isString(s)\n ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})\n : s;\n};\nvar manualUppercase = function(s) {\n /* jshint bitwise: false */\n return isString(s)\n ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})\n : s;\n};\n\n\n// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish\n// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods\n// with correct but slower alternatives.\nif ('i' !== 'I'.toLowerCase()) {\n lowercase = manualLowercase;\n uppercase = manualUppercase;\n}\n\n\nvar\n msie, // holds major version number for IE, or NaN if UA is not IE.\n jqLite, // delay binding since jQuery could be loaded after us.\n jQuery, // delay binding\n slice = [].slice,\n splice = [].splice,\n push = [].push,\n toString = Object.prototype.toString,\n getPrototypeOf = Object.getPrototypeOf,\n ngMinErr = minErr('ng'),\n\n /** @name angular */\n angular = window.angular || (window.angular = {}),\n angularModule,\n uid = 0;\n\n/**\n * documentMode is an IE-only property\n * http://msdn.microsoft.com/en-us/library/ie/cc196988(v=vs.85).aspx\n */\nmsie = document.documentMode;\n\n\n/**\n * @private\n * @param {*} obj\n * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,\n * String ...)\n */\nfunction isArrayLike(obj) {\n\n // `null`, `undefined` and `window` are not array-like\n if (obj == null || isWindow(obj)) return false;\n\n // arrays, strings and jQuery/jqLite objects are array like\n // * jqLite is either the jQuery or jqLite constructor function\n // * we have to check the existance of jqLite first as this method is called\n // via the forEach method when constructing the jqLite object in the first place\n if (isArray(obj) || isString(obj) || (jqLite && obj instanceof jqLite)) return true;\n\n // Support: iOS 8.2 (not reproducible in simulator)\n // \"length\" in obj used to prevent JIT error (gh-11508)\n var length = \"length\" in Object(obj) && obj.length;\n\n // NodeList objects (with `item` method) and\n // other objects with suitable length characteristics are array-like\n return isNumber(length) &&\n (length >= 0 && ((length - 1) in obj || obj instanceof Array) || typeof obj.item == 'function');\n\n}\n\n/**\n * @ngdoc function\n * @name angular.forEach\n * @module ng\n * @kind function\n *\n * @description\n * Invokes the `iterator` function once for each item in `obj` collection, which can be either an\n * object or an array. The `iterator` function is invoked with `iterator(value, key, obj)`, where `value`\n * is the value of an object property or an array element, `key` is the object property key or\n * array element index and obj is the `obj` itself. Specifying a `context` for the function is optional.\n *\n * It is worth noting that `.forEach` does not iterate over inherited properties because it filters\n * using the `hasOwnProperty` method.\n *\n * Unlike ES262's\n * [Array.prototype.forEach](http://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.18),\n * providing 'undefined' or 'null' values for `obj` will not throw a TypeError, but rather just\n * return the value provided.\n *\n ```js\n var values = {name: 'misko', gender: 'male'};\n var log = [];\n angular.forEach(values, function(value, key) {\n this.push(key + ': ' + value);\n }, log);\n expect(log).toEqual(['name: misko', 'gender: male']);\n ```\n *\n * @param {Object|Array} obj Object to iterate over.\n * @param {Function} iterator Iterator function.\n * @param {Object=} context Object to become context (`this`) for the iterator function.\n * @returns {Object|Array} Reference to `obj`.\n */\n\nfunction forEach(obj, iterator, context) {\n var key, length;\n if (obj) {\n if (isFunction(obj)) {\n for (key in obj) {\n // Need to check if hasOwnProperty exists,\n // as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function\n if (key != 'prototype' && key != 'length' && key != 'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n } else if (isArray(obj) || isArrayLike(obj)) {\n var isPrimitive = typeof obj !== 'object';\n for (key = 0, length = obj.length; key < length; key++) {\n if (isPrimitive || key in obj) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n } else if (obj.forEach && obj.forEach !== forEach) {\n obj.forEach(iterator, context, obj);\n } else if (isBlankObject(obj)) {\n // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty\n for (key in obj) {\n iterator.call(context, obj[key], key, obj);\n }\n } else if (typeof obj.hasOwnProperty === 'function') {\n // Slow path for objects inheriting Object.prototype, hasOwnProperty check needed\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n } else {\n // Slow path for objects which do not have a method `hasOwnProperty`\n for (key in obj) {\n if (hasOwnProperty.call(obj, key)) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n }\n }\n return obj;\n}\n\nfunction forEachSorted(obj, iterator, context) {\n var keys = Object.keys(obj).sort();\n for (var i = 0; i < keys.length; i++) {\n iterator.call(context, obj[keys[i]], keys[i]);\n }\n return keys;\n}\n\n\n/**\n * when using forEach the params are value, key, but it is often useful to have key, value.\n * @param {function(string, *)} iteratorFn\n * @returns {function(*, string)}\n */\nfunction reverseParams(iteratorFn) {\n return function(value, key) {iteratorFn(key, value);};\n}\n\n/**\n * A consistent way of creating unique IDs in angular.\n *\n * Using simple numbers allows us to generate 28.6 million unique ids per second for 10 years before\n * we hit number precision issues in JavaScript.\n *\n * Math.pow(2,53) / 60 / 60 / 24 / 365 / 10 = 28.6M\n *\n * @returns {number} an unique alpha-numeric string\n */\nfunction nextUid() {\n return ++uid;\n}\n\n\n/**\n * Set or clear the hashkey for an object.\n * @param obj object\n * @param h the hashkey (!truthy to delete the hashkey)\n */\nfunction setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}\n\n\nfunction baseExtend(dst, objs, deep) {\n var h = dst.$$hashKey;\n\n for (var i = 0, ii = objs.length; i < ii; ++i) {\n var obj = objs[i];\n if (!isObject(obj) && !isFunction(obj)) continue;\n var keys = Object.keys(obj);\n for (var j = 0, jj = keys.length; j < jj; j++) {\n var key = keys[j];\n var src = obj[key];\n\n if (deep && isObject(src)) {\n if (isDate(src)) {\n dst[key] = new Date(src.valueOf());\n } else if (isRegExp(src)) {\n dst[key] = new RegExp(src);\n } else if (src.nodeName) {\n dst[key] = src.cloneNode(true);\n } else if (isElement(src)) {\n dst[key] = src.clone();\n } else {\n if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {};\n baseExtend(dst[key], [src], true);\n }\n } else {\n dst[key] = src;\n }\n }\n }\n\n setHashKey(dst, h);\n return dst;\n}\n\n/**\n * @ngdoc function\n * @name angular.extend\n * @module ng\n * @kind function\n *\n * @description\n * Extends the destination object `dst` by copying own enumerable properties from the `src` object(s)\n * to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so\n * by passing an empty object as the target: `var object = angular.extend({}, object1, object2)`.\n *\n * **Note:** Keep in mind that `angular.extend` does not support recursive merge (deep copy). Use\n * {@link angular.merge} for this.\n *\n * @param {Object} dst Destination object.\n * @param {...Object} src Source object(s).\n * @returns {Object} Reference to `dst`.\n */\nfunction extend(dst) {\n return baseExtend(dst, slice.call(arguments, 1), false);\n}\n\n\n/**\n* @ngdoc function\n* @name angular.merge\n* @module ng\n* @kind function\n*\n* @description\n* Deeply extends the destination object `dst` by copying own enumerable properties from the `src` object(s)\n* to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so\n* by passing an empty object as the target: `var object = angular.merge({}, object1, object2)`.\n*\n* Unlike {@link angular.extend extend()}, `merge()` recursively descends into object properties of source\n* objects, performing a deep copy.\n*\n* @param {Object} dst Destination object.\n* @param {...Object} src Source object(s).\n* @returns {Object} Reference to `dst`.\n*/\nfunction merge(dst) {\n return baseExtend(dst, slice.call(arguments, 1), true);\n}\n\n\n\nfunction toInt(str) {\n return parseInt(str, 10);\n}\n\n\nfunction inherit(parent, extra) {\n return extend(Object.create(parent), extra);\n}\n\n/**\n * @ngdoc function\n * @name angular.noop\n * @module ng\n * @kind function\n *\n * @description\n * A function that performs no operations. This function can be useful when writing code in the\n * functional style.\n ```js\n function foo(callback) {\n var result = calculateResult();\n (callback || angular.noop)(result);\n }\n ```\n */\nfunction noop() {}\nnoop.$inject = [];\n\n\n/**\n * @ngdoc function\n * @name angular.identity\n * @module ng\n * @kind function\n *\n * @description\n * A function that returns its first argument. This function is useful when writing code in the\n * functional style.\n *\n ```js\n function transformer(transformationFn, value) {\n return (transformationFn || angular.identity)(value);\n };\n\n // E.g.\n function getResult(fn, input) {\n return (fn || angular.identity)(input);\n };\n\n getResult(function(n) { return n * 2; }, 21); // returns 42\n getResult(null, 21); // returns 21\n getResult(undefined, 21); // returns 21\n ```\n *\n * @param {*} value to be returned.\n * @returns {*} the value passed in.\n */\nfunction identity($) {return $;}\nidentity.$inject = [];\n\n\nfunction valueFn(value) {return function() {return value;};}\n\nfunction hasCustomToString(obj) {\n return isFunction(obj.toString) && obj.toString !== toString;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isUndefined\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is undefined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is undefined.\n */\nfunction isUndefined(value) {return typeof value === 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDefined\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is defined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is defined.\n */\nfunction isDefined(value) {return typeof value !== 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isObject\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not\n * considered to be objects. Note that JavaScript arrays are objects.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Object` but not `null`.\n */\nfunction isObject(value) {\n // http://jsperf.com/isobject4\n return value !== null && typeof value === 'object';\n}\n\n\n/**\n * Determine if a value is an object with a null prototype\n *\n * @returns {boolean} True if `value` is an `Object` with a null prototype\n */\nfunction isBlankObject(value) {\n return value !== null && typeof value === 'object' && !getPrototypeOf(value);\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isString\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `String`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `String`.\n */\nfunction isString(value) {return typeof value === 'string';}\n\n\n/**\n * @ngdoc function\n * @name angular.isNumber\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `Number`.\n *\n * This includes the \"special\" numbers `NaN`, `+Infinity` and `-Infinity`.\n *\n * If you wish to exclude these then you can use the native\n * [`isFinite'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite)\n * method.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Number`.\n */\nfunction isNumber(value) {return typeof value === 'number';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDate\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a value is a date.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Date`.\n */\nfunction isDate(value) {\n return toString.call(value) === '[object Date]';\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isArray\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is an `Array`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Array`.\n */\nvar isArray = Array.isArray;\n\n/**\n * @ngdoc function\n * @name angular.isFunction\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `Function`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Function`.\n */\nfunction isFunction(value) {return typeof value === 'function';}\n\n\n/**\n * Determines if a value is a regular expression object.\n *\n * @private\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `RegExp`.\n */\nfunction isRegExp(value) {\n return toString.call(value) === '[object RegExp]';\n}\n\n\n/**\n * Checks if `obj` is a window object.\n *\n * @private\n * @param {*} obj Object to check\n * @returns {boolean} True if `obj` is a window obj.\n */\nfunction isWindow(obj) {\n return obj && obj.window === obj;\n}\n\n\nfunction isScope(obj) {\n return obj && obj.$evalAsync && obj.$watch;\n}\n\n\nfunction isFile(obj) {\n return toString.call(obj) === '[object File]';\n}\n\n\nfunction isFormData(obj) {\n return toString.call(obj) === '[object FormData]';\n}\n\n\nfunction isBlob(obj) {\n return toString.call(obj) === '[object Blob]';\n}\n\n\nfunction isBoolean(value) {\n return typeof value === 'boolean';\n}\n\n\nfunction isPromiseLike(obj) {\n return obj && isFunction(obj.then);\n}\n\n\nvar TYPED_ARRAY_REGEXP = /^\\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\\]$/;\nfunction isTypedArray(value) {\n return value && isNumber(value.length) && TYPED_ARRAY_REGEXP.test(toString.call(value));\n}\n\n\nvar trim = function(value) {\n return isString(value) ? value.trim() : value;\n};\n\n// Copied from:\n// http://docs.closure-library.googlecode.com/git/local_closure_goog_string_string.js.source.html#line1021\n// Prereq: s is a string.\nvar escapeForRegexp = function(s) {\n return s.replace(/([-()\\[\\]{}+?*.$\\^|,:#<!\\\\])/g, '\\\\$1').\n replace(/\\x08/g, '\\\\x08');\n};\n\n\n/**\n * @ngdoc function\n * @name angular.isElement\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a DOM element (or wrapped jQuery element).\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).\n */\nfunction isElement(node) {\n return !!(node &&\n (node.nodeName // we are a direct element\n || (node.prop && node.attr && node.find))); // we have an on and find method part of jQuery API\n}\n\n/**\n * @param str 'key1,key2,...'\n * @returns {object} in the form of {key1:true, key2:true, ...}\n */\nfunction makeMap(str) {\n var obj = {}, items = str.split(','), i;\n for (i = 0; i < items.length; i++) {\n obj[items[i]] = true;\n }\n return obj;\n}\n\n\nfunction nodeName_(element) {\n return lowercase(element.nodeName || (element[0] && element[0].nodeName));\n}\n\nfunction includes(array, obj) {\n return Array.prototype.indexOf.call(array, obj) != -1;\n}\n\nfunction arrayRemove(array, value) {\n var index = array.indexOf(value);\n if (index >= 0) {\n array.splice(index, 1);\n }\n return index;\n}\n\n/**\n * @ngdoc function\n * @name angular.copy\n * @module ng\n * @kind function\n *\n * @description\n * Creates a deep copy of `source`, which should be an object or an array.\n *\n * * If no destination is supplied, a copy of the object or array is created.\n * * If a destination is provided, all of its elements (for arrays) or properties (for objects)\n * are deleted and then all elements/properties from the source are copied to it.\n * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.\n * * If `source` is identical to 'destination' an exception will be thrown.\n *\n * @param {*} source The source that will be used to make a copy.\n * Can be any type, including primitives, `null`, and `undefined`.\n * @param {(Object|Array)=} destination Destination into which the source is copied. If\n * provided, must be of the same type as `source`.\n * @returns {*} The copy or updated `destination`, if `destination` was specified.\n *\n * @example\n <example module=\"copyExample\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <form novalidate class=\"simple-form\">\n Name: <input type=\"text\" ng-model=\"user.name\" /><br />\n E-mail: <input type=\"email\" ng-model=\"user.email\" /><br />\n Gender: <input type=\"radio\" ng-model=\"user.gender\" value=\"male\" />male\n <input type=\"radio\" ng-model=\"user.gender\" value=\"female\" />female<br />\n <button ng-click=\"reset()\">RESET</button>\n <button ng-click=\"update(user)\">SAVE</button>\n </form>\n <pre>form = {{user | json}}</pre>\n <pre>master = {{master | json}}</pre>\n </div>\n\n <script>\n angular.module('copyExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.master= {};\n\n $scope.update = function(user) {\n // Example with 1 argument\n $scope.master= angular.copy(user);\n };\n\n $scope.reset = function() {\n // Example with 2 arguments\n angular.copy($scope.master, $scope.user);\n };\n\n $scope.reset();\n }]);\n </script>\n </file>\n </example>\n */\nfunction copy(source, destination) {\n var stackSource = [];\n var stackDest = [];\n\n if (destination) {\n if (isTypedArray(destination)) {\n throw ngMinErr('cpta', \"Can't copy! TypedArray destination cannot be mutated.\");\n }\n if (source === destination) {\n throw ngMinErr('cpi', \"Can't copy! Source and destination are identical.\");\n }\n\n // Empty the destination object\n if (isArray(destination)) {\n destination.length = 0;\n } else {\n forEach(destination, function(value, key) {\n if (key !== '$$hashKey') {\n delete destination[key];\n }\n });\n }\n\n stackSource.push(source);\n stackDest.push(destination);\n return copyRecurse(source, destination);\n }\n\n return copyElement(source);\n\n function copyRecurse(source, destination) {\n var h = destination.$$hashKey;\n var result, key;\n if (isArray(source)) {\n for (var i = 0, ii = source.length; i < ii; i++) {\n destination.push(copyElement(source[i]));\n }\n } else if (isBlankObject(source)) {\n // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty\n for (key in source) {\n destination[key] = copyElement(source[key]);\n }\n } else if (source && typeof source.hasOwnProperty === 'function') {\n // Slow path, which must rely on hasOwnProperty\n for (key in source) {\n if (source.hasOwnProperty(key)) {\n destination[key] = copyElement(source[key]);\n }\n }\n } else {\n // Slowest path --- hasOwnProperty can't be called as a method\n for (key in source) {\n if (hasOwnProperty.call(source, key)) {\n destination[key] = copyElement(source[key]);\n }\n }\n }\n setHashKey(destination, h);\n return destination;\n }\n\n function copyElement(source) {\n // Simple values\n if (!isObject(source)) {\n return source;\n }\n\n // Already copied values\n var index = stackSource.indexOf(source);\n if (index !== -1) {\n return stackDest[index];\n }\n\n if (isWindow(source) || isScope(source)) {\n throw ngMinErr('cpws',\n \"Can't copy! Making copies of Window or Scope instances is not supported.\");\n }\n\n var needsRecurse = false;\n var destination;\n\n if (isArray(source)) {\n destination = [];\n needsRecurse = true;\n } else if (isTypedArray(source)) {\n destination = new source.constructor(source);\n } else if (isDate(source)) {\n destination = new Date(source.getTime());\n } else if (isRegExp(source)) {\n destination = new RegExp(source.source, source.toString().match(/[^\\/]*$/)[0]);\n destination.lastIndex = source.lastIndex;\n } else if (isBlob(source)) {\n destination = new source.constructor([source], {type: source.type});\n } else if (isFunction(source.cloneNode)) {\n destination = source.cloneNode(true);\n } else {\n destination = Object.create(getPrototypeOf(source));\n needsRecurse = true;\n }\n\n stackSource.push(source);\n stackDest.push(destination);\n\n return needsRecurse\n ? copyRecurse(source, destination)\n : destination;\n }\n}\n\n/**\n * Creates a shallow copy of an object, an array or a primitive.\n *\n * Assumes that there are no proto properties for objects.\n */\nfunction shallowCopy(src, dst) {\n if (isArray(src)) {\n dst = dst || [];\n\n for (var i = 0, ii = src.length; i < ii; i++) {\n dst[i] = src[i];\n }\n } else if (isObject(src)) {\n dst = dst || {};\n\n for (var key in src) {\n if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {\n dst[key] = src[key];\n }\n }\n }\n\n return dst || src;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.equals\n * @module ng\n * @kind function\n *\n * @description\n * Determines if two objects or two values are equivalent. Supports value types, regular\n * expressions, arrays and objects.\n *\n * Two objects or values are considered equivalent if at least one of the following is true:\n *\n * * Both objects or values pass `===` comparison.\n * * Both objects or values are of the same type and all of their properties are equal by\n * comparing them with `angular.equals`.\n * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)\n * * Both values represent the same regular expression (In JavaScript,\n * /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual\n * representation matches).\n *\n * During a property comparison, properties of `function` type and properties with names\n * that begin with `$` are ignored.\n *\n * Scope and DOMWindow objects are being compared only by identify (`===`).\n *\n * @param {*} o1 Object or value to compare.\n * @param {*} o2 Object or value to compare.\n * @returns {boolean} True if arguments are equal.\n */\nfunction equals(o1, o2) {\n if (o1 === o2) return true;\n if (o1 === null || o2 === null) return false;\n if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN\n var t1 = typeof o1, t2 = typeof o2, length, key, keySet;\n if (t1 == t2) {\n if (t1 == 'object') {\n if (isArray(o1)) {\n if (!isArray(o2)) return false;\n if ((length = o1.length) == o2.length) {\n for (key = 0; key < length; key++) {\n if (!equals(o1[key], o2[key])) return false;\n }\n return true;\n }\n } else if (isDate(o1)) {\n if (!isDate(o2)) return false;\n return equals(o1.getTime(), o2.getTime());\n } else if (isRegExp(o1)) {\n return isRegExp(o2) ? o1.toString() == o2.toString() : false;\n } else {\n if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) ||\n isArray(o2) || isDate(o2) || isRegExp(o2)) return false;\n keySet = createMap();\n for (key in o1) {\n if (key.charAt(0) === '$' || isFunction(o1[key])) continue;\n if (!equals(o1[key], o2[key])) return false;\n keySet[key] = true;\n }\n for (key in o2) {\n if (!(key in keySet) &&\n key.charAt(0) !== '$' &&\n isDefined(o2[key]) &&\n !isFunction(o2[key])) return false;\n }\n return true;\n }\n }\n }\n return false;\n}\n\nvar csp = function() {\n if (!isDefined(csp.rules)) {\n\n\n var ngCspElement = (document.querySelector('[ng-csp]') ||\n document.querySelector('[data-ng-csp]'));\n\n if (ngCspElement) {\n var ngCspAttribute = ngCspElement.getAttribute('ng-csp') ||\n ngCspElement.getAttribute('data-ng-csp');\n csp.rules = {\n noUnsafeEval: !ngCspAttribute || (ngCspAttribute.indexOf('no-unsafe-eval') !== -1),\n noInlineStyle: !ngCspAttribute || (ngCspAttribute.indexOf('no-inline-style') !== -1)\n };\n } else {\n csp.rules = {\n noUnsafeEval: noUnsafeEval(),\n noInlineStyle: false\n };\n }\n }\n\n return csp.rules;\n\n function noUnsafeEval() {\n try {\n /* jshint -W031, -W054 */\n new Function('');\n /* jshint +W031, +W054 */\n return false;\n } catch (e) {\n return true;\n }\n }\n};\n\n/**\n * @ngdoc directive\n * @module ng\n * @name ngJq\n *\n * @element ANY\n * @param {string=} ngJq the name of the library available under `window`\n * to be used for angular.element\n * @description\n * Use this directive to force the angular.element library. This should be\n * used to force either jqLite by leaving ng-jq blank or setting the name of\n * the jquery variable under window (eg. jQuery).\n *\n * Since angular looks for this directive when it is loaded (doesn't wait for the\n * DOMContentLoaded event), it must be placed on an element that comes before the script\n * which loads angular. Also, only the first instance of `ng-jq` will be used and all\n * others ignored.\n *\n * @example\n * This example shows how to force jqLite using the `ngJq` directive to the `html` tag.\n ```html\n <!doctype html>\n <html ng-app ng-jq>\n ...\n ...\n </html>\n ```\n * @example\n * This example shows how to use a jQuery based library of a different name.\n * The library name must be available at the top most 'window'.\n ```html\n <!doctype html>\n <html ng-app ng-jq=\"jQueryLib\">\n ...\n ...\n </html>\n ```\n */\nvar jq = function() {\n if (isDefined(jq.name_)) return jq.name_;\n var el;\n var i, ii = ngAttrPrefixes.length, prefix, name;\n for (i = 0; i < ii; ++i) {\n prefix = ngAttrPrefixes[i];\n if (el = document.querySelector('[' + prefix.replace(':', '\\\\:') + 'jq]')) {\n name = el.getAttribute(prefix + 'jq');\n break;\n }\n }\n\n return (jq.name_ = name);\n};\n\nfunction concat(array1, array2, index) {\n return array1.concat(slice.call(array2, index));\n}\n\nfunction sliceArgs(args, startIndex) {\n return slice.call(args, startIndex || 0);\n}\n\n\n/* jshint -W101 */\n/**\n * @ngdoc function\n * @name angular.bind\n * @module ng\n * @kind function\n *\n * @description\n * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for\n * `fn`). You can supply optional `args` that are prebound to the function. This feature is also\n * known as [partial application](http://en.wikipedia.org/wiki/Partial_application), as\n * distinguished from [function currying](http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application).\n *\n * @param {Object} self Context which `fn` should be evaluated in.\n * @param {function()} fn Function to be bound.\n * @param {...*} args Optional arguments to be prebound to the `fn` function call.\n * @returns {function()} Function that wraps the `fn` with all the specified bindings.\n */\n/* jshint +W101 */\nfunction bind(self, fn) {\n var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];\n if (isFunction(fn) && !(fn instanceof RegExp)) {\n return curryArgs.length\n ? function() {\n return arguments.length\n ? fn.apply(self, concat(curryArgs, arguments, 0))\n : fn.apply(self, curryArgs);\n }\n : function() {\n return arguments.length\n ? fn.apply(self, arguments)\n : fn.call(self);\n };\n } else {\n // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)\n return fn;\n }\n}\n\n\nfunction toJsonReplacer(key, value) {\n var val = value;\n\n if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') {\n val = undefined;\n } else if (isWindow(value)) {\n val = '$WINDOW';\n } else if (value && document === value) {\n val = '$DOCUMENT';\n } else if (isScope(value)) {\n val = '$SCOPE';\n }\n\n return val;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.toJson\n * @module ng\n * @kind function\n *\n * @description\n * Serializes input into a JSON-formatted string. Properties with leading $$ characters will be\n * stripped since angular uses this notation internally.\n *\n * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.\n * @param {boolean|number} [pretty=2] If set to true, the JSON output will contain newlines and whitespace.\n * If set to an integer, the JSON output will contain that many spaces per indentation.\n * @returns {string|undefined} JSON-ified string representing `obj`.\n */\nfunction toJson(obj, pretty) {\n if (isUndefined(obj)) return undefined;\n if (!isNumber(pretty)) {\n pretty = pretty ? 2 : null;\n }\n return JSON.stringify(obj, toJsonReplacer, pretty);\n}\n\n\n/**\n * @ngdoc function\n * @name angular.fromJson\n * @module ng\n * @kind function\n *\n * @description\n * Deserializes a JSON string.\n *\n * @param {string} json JSON string to deserialize.\n * @returns {Object|Array|string|number} Deserialized JSON string.\n */\nfunction fromJson(json) {\n return isString(json)\n ? JSON.parse(json)\n : json;\n}\n\n\nvar ALL_COLONS = /:/g;\nfunction timezoneToOffset(timezone, fallback) {\n // IE/Edge do not \"understand\" colon (`:`) in timezone\n timezone = timezone.replace(ALL_COLONS, '');\n var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;\n return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;\n}\n\n\nfunction addDateMinutes(date, minutes) {\n date = new Date(date.getTime());\n date.setMinutes(date.getMinutes() + minutes);\n return date;\n}\n\n\nfunction convertTimezoneToLocal(date, timezone, reverse) {\n reverse = reverse ? -1 : 1;\n var dateTimezoneOffset = date.getTimezoneOffset();\n var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n return addDateMinutes(date, reverse * (timezoneOffset - dateTimezoneOffset));\n}\n\n\n/**\n * @returns {string} Returns the string representation of the element.\n */\nfunction startingTag(element) {\n element = jqLite(element).clone();\n try {\n // turns out IE does not let you set .html() on elements which\n // are not allowed to have children. So we just ignore it.\n element.empty();\n } catch (e) {}\n var elemHtml = jqLite('<div>').append(element).html();\n try {\n return element[0].nodeType === NODE_TYPE_TEXT ? lowercase(elemHtml) :\n elemHtml.\n match(/^(<[^>]+>)/)[1].\n replace(/^<([\\w\\-]+)/, function(match, nodeName) {return '<' + lowercase(nodeName);});\n } catch (e) {\n return lowercase(elemHtml);\n }\n\n}\n\n\n/////////////////////////////////////////////////\n\n/**\n * Tries to decode the URI component without throwing an exception.\n *\n * @private\n * @param str value potential URI component to check.\n * @returns {boolean} True if `value` can be decoded\n * with the decodeURIComponent function.\n */\nfunction tryDecodeURIComponent(value) {\n try {\n return decodeURIComponent(value);\n } catch (e) {\n // Ignore any invalid uri component\n }\n}\n\n\n/**\n * Parses an escaped url query string into key-value pairs.\n * @returns {Object.<string,boolean|Array>}\n */\nfunction parseKeyValue(/**string*/keyValue) {\n var obj = {};\n forEach((keyValue || \"\").split('&'), function(keyValue) {\n var splitPoint, key, val;\n if (keyValue) {\n key = keyValue = keyValue.replace(/\\+/g,'%20');\n splitPoint = keyValue.indexOf('=');\n if (splitPoint !== -1) {\n key = keyValue.substring(0, splitPoint);\n val = keyValue.substring(splitPoint + 1);\n }\n key = tryDecodeURIComponent(key);\n if (isDefined(key)) {\n val = isDefined(val) ? tryDecodeURIComponent(val) : true;\n if (!hasOwnProperty.call(obj, key)) {\n obj[key] = val;\n } else if (isArray(obj[key])) {\n obj[key].push(val);\n } else {\n obj[key] = [obj[key],val];\n }\n }\n }\n });\n return obj;\n}\n\nfunction toKeyValue(obj) {\n var parts = [];\n forEach(obj, function(value, key) {\n if (isArray(value)) {\n forEach(value, function(arrayValue) {\n parts.push(encodeUriQuery(key, true) +\n (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));\n });\n } else {\n parts.push(encodeUriQuery(key, true) +\n (value === true ? '' : '=' + encodeUriQuery(value, true)));\n }\n });\n return parts.length ? parts.join('&') : '';\n}\n\n\n/**\n * We need our custom method because encodeURIComponent is too aggressive and doesn't follow\n * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path\n * segments:\n * segment = *pchar\n * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n * pct-encoded = \"%\" HEXDIG HEXDIG\n * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriSegment(val) {\n return encodeUriQuery(val, true).\n replace(/%26/gi, '&').\n replace(/%3D/gi, '=').\n replace(/%2B/gi, '+');\n}\n\n\n/**\n * This method is intended for encoding *key* or *value* parts of query component. We need a custom\n * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be\n * encoded per http://tools.ietf.org/html/rfc3986:\n * query = *( pchar / \"/\" / \"?\" )\n * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * pct-encoded = \"%\" HEXDIG HEXDIG\n * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriQuery(val, pctEncodeSpaces) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%3B/gi, ';').\n replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));\n}\n\nvar ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];\n\nfunction getNgAttribute(element, ngAttr) {\n var attr, i, ii = ngAttrPrefixes.length;\n for (i = 0; i < ii; ++i) {\n attr = ngAttrPrefixes[i] + ngAttr;\n if (isString(attr = element.getAttribute(attr))) {\n return attr;\n }\n }\n return null;\n}\n\n/**\n * @ngdoc directive\n * @name ngApp\n * @module ng\n *\n * @element ANY\n * @param {angular.Module} ngApp an optional application\n * {@link angular.module module} name to load.\n * @param {boolean=} ngStrictDi if this attribute is present on the app element, the injector will be\n * created in \"strict-di\" mode. This means that the application will fail to invoke functions which\n * do not use explicit function annotation (and are thus unsuitable for minification), as described\n * in {@link guide/di the Dependency Injection guide}, and useful debugging info will assist in\n * tracking down the root of these bugs.\n *\n * @description\n *\n * Use this directive to **auto-bootstrap** an AngularJS application. The `ngApp` directive\n * designates the **root element** of the application and is typically placed near the root element\n * of the page - e.g. on the `<body>` or `<html>` tags.\n *\n * Only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`\n * found in the document will be used to define the root element to auto-bootstrap as an\n * application. To run multiple applications in an HTML document you must manually bootstrap them using\n * {@link angular.bootstrap} instead. AngularJS applications cannot be nested within each other.\n *\n * You can specify an **AngularJS module** to be used as the root module for the application. This\n * module will be loaded into the {@link auto.$injector} when the application is bootstrapped. It\n * should contain the application code needed or have dependencies on other modules that will\n * contain the code. See {@link angular.module} for more information.\n *\n * In the example below if the `ngApp` directive were not placed on the `html` element then the\n * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`\n * would not be resolved to `3`.\n *\n * `ngApp` is the easiest, and most common way to bootstrap an application.\n *\n <example module=\"ngAppDemo\">\n <file name=\"index.html\">\n <div ng-controller=\"ngAppDemoController\">\n I can add: {{a}} + {{b}} = {{ a+b }}\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {\n $scope.a = 1;\n $scope.b = 2;\n });\n </file>\n </example>\n *\n * Using `ngStrictDi`, you would see something like this:\n *\n <example ng-app-included=\"true\">\n <file name=\"index.html\">\n <div ng-app=\"ngAppStrictDemo\" ng-strict-di>\n <div ng-controller=\"GoodController1\">\n I can add: {{a}} + {{b}} = {{ a+b }}\n\n <p>This renders because the controller does not fail to\n instantiate, by using explicit annotation style (see\n script.js for details)\n </p>\n </div>\n\n <div ng-controller=\"GoodController2\">\n Name: <input ng-model=\"name\"><br />\n Hello, {{name}}!\n\n <p>This renders because the controller does not fail to\n instantiate, by using explicit annotation style\n (see script.js for details)\n </p>\n </div>\n\n <div ng-controller=\"BadController\">\n I can add: {{a}} + {{b}} = {{ a+b }}\n\n <p>The controller could not be instantiated, due to relying\n on automatic function annotations (which are disabled in\n strict mode). As such, the content of this section is not\n interpolated, and there should be an error in your web console.\n </p>\n </div>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('ngAppStrictDemo', [])\n // BadController will fail to instantiate, due to relying on automatic function annotation,\n // rather than an explicit annotation\n .controller('BadController', function($scope) {\n $scope.a = 1;\n $scope.b = 2;\n })\n // Unlike BadController, GoodController1 and GoodController2 will not fail to be instantiated,\n // due to using explicit annotations using the array style and $inject property, respectively.\n .controller('GoodController1', ['$scope', function($scope) {\n $scope.a = 1;\n $scope.b = 2;\n }])\n .controller('GoodController2', GoodController2);\n function GoodController2($scope) {\n $scope.name = \"World\";\n }\n GoodController2.$inject = ['$scope'];\n </file>\n <file name=\"style.css\">\n div[ng-controller] {\n margin-bottom: 1em;\n -webkit-border-radius: 4px;\n border-radius: 4px;\n border: 1px solid;\n padding: .5em;\n }\n div[ng-controller^=Good] {\n border-color: #d6e9c6;\n background-color: #dff0d8;\n color: #3c763d;\n }\n div[ng-controller^=Bad] {\n border-color: #ebccd1;\n background-color: #f2dede;\n color: #a94442;\n margin-bottom: 0;\n }\n </file>\n </example>\n */\nfunction angularInit(element, bootstrap) {\n var appElement,\n module,\n config = {};\n\n // The element `element` has priority over any other element\n forEach(ngAttrPrefixes, function(prefix) {\n var name = prefix + 'app';\n\n if (!appElement && element.hasAttribute && element.hasAttribute(name)) {\n appElement = element;\n module = element.getAttribute(name);\n }\n });\n forEach(ngAttrPrefixes, function(prefix) {\n var name = prefix + 'app';\n var candidate;\n\n if (!appElement && (candidate = element.querySelector('[' + name.replace(':', '\\\\:') + ']'))) {\n appElement = candidate;\n module = candidate.getAttribute(name);\n }\n });\n if (appElement) {\n config.strictDi = getNgAttribute(appElement, \"strict-di\") !== null;\n bootstrap(appElement, module ? [module] : [], config);\n }\n}\n\n/**\n * @ngdoc function\n * @name angular.bootstrap\n * @module ng\n * @description\n * Use this function to manually start up angular application.\n *\n * See: {@link guide/bootstrap Bootstrap}\n *\n * Note that Protractor based end-to-end tests cannot use this function to bootstrap manually.\n * They must use {@link ng.directive:ngApp ngApp}.\n *\n * Angular will detect if it has been loaded into the browser more than once and only allow the\n * first loaded script to be bootstrapped and will report a warning to the browser console for\n * each of the subsequent scripts. This prevents strange results in applications, where otherwise\n * multiple instances of Angular try to work on the DOM.\n *\n * ```html\n * <!doctype html>\n * <html>\n * <body>\n * <div ng-controller=\"WelcomeController\">\n * {{greeting}}\n * </div>\n *\n * <script src=\"angular.js\"></script>\n * <script>\n * var app = angular.module('demo', [])\n * .controller('WelcomeController', function($scope) {\n * $scope.greeting = 'Welcome!';\n * });\n * angular.bootstrap(document, ['demo']);\n * </script>\n * </body>\n * </html>\n * ```\n *\n * @param {DOMElement} element DOM element which is the root of angular application.\n * @param {Array<String|Function|Array>=} modules an array of modules to load into the application.\n * Each item in the array should be the name of a predefined module or a (DI annotated)\n * function that will be invoked by the injector as a `config` block.\n * See: {@link angular.module modules}\n * @param {Object=} config an object for defining configuration options for the application. The\n * following keys are supported:\n *\n * * `strictDi` - disable automatic function annotation for the application. This is meant to\n * assist in finding bugs which break minified code. Defaults to `false`.\n *\n * @returns {auto.$injector} Returns the newly created injector for this app.\n */\nfunction bootstrap(element, modules, config) {\n if (!isObject(config)) config = {};\n var defaultConfig = {\n strictDi: false\n };\n config = extend(defaultConfig, config);\n var doBootstrap = function() {\n element = jqLite(element);\n\n if (element.injector()) {\n var tag = (element[0] === document) ? 'document' : startingTag(element);\n //Encode angle brackets to prevent input from being sanitized to empty string #8683\n throw ngMinErr(\n 'btstrpd',\n \"App already bootstrapped with this element '{0}'\",\n tag.replace(/</,'&lt;').replace(/>/,'&gt;'));\n }\n\n modules = modules || [];\n modules.unshift(['$provide', function($provide) {\n $provide.value('$rootElement', element);\n }]);\n\n if (config.debugInfoEnabled) {\n // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.\n modules.push(['$compileProvider', function($compileProvider) {\n $compileProvider.debugInfoEnabled(true);\n }]);\n }\n\n modules.unshift('ng');\n var injector = createInjector(modules, config.strictDi);\n injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',\n function bootstrapApply(scope, element, compile, injector) {\n scope.$apply(function() {\n element.data('$injector', injector);\n compile(element)(scope);\n });\n }]\n );\n return injector;\n };\n\n var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;\n var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;\n\n if (window && NG_ENABLE_DEBUG_INFO.test(window.name)) {\n config.debugInfoEnabled = true;\n window.name = window.name.replace(NG_ENABLE_DEBUG_INFO, '');\n }\n\n if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {\n return doBootstrap();\n }\n\n window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');\n angular.resumeBootstrap = function(extraModules) {\n forEach(extraModules, function(module) {\n modules.push(module);\n });\n return doBootstrap();\n };\n\n if (isFunction(angular.resumeDeferredBootstrap)) {\n angular.resumeDeferredBootstrap();\n }\n}\n\n/**\n * @ngdoc function\n * @name angular.reloadWithDebugInfo\n * @module ng\n * @description\n * Use this function to reload the current application with debug information turned on.\n * This takes precedence over a call to `$compileProvider.debugInfoEnabled(false)`.\n *\n * See {@link ng.$compileProvider#debugInfoEnabled} for more.\n */\nfunction reloadWithDebugInfo() {\n window.name = 'NG_ENABLE_DEBUG_INFO!' + window.name;\n window.location.reload();\n}\n\n/**\n * @name angular.getTestability\n * @module ng\n * @description\n * Get the testability service for the instance of Angular on the given\n * element.\n * @param {DOMElement} element DOM element which is the root of angular application.\n */\nfunction getTestability(rootElement) {\n var injector = angular.element(rootElement).injector();\n if (!injector) {\n throw ngMinErr('test',\n 'no injector found for element argument to getTestability');\n }\n return injector.get('$$testability');\n}\n\nvar SNAKE_CASE_REGEXP = /[A-Z]/g;\nfunction snake_case(name, separator) {\n separator = separator || '_';\n return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {\n return (pos ? separator : '') + letter.toLowerCase();\n });\n}\n\nvar bindJQueryFired = false;\nvar skipDestroyOnNextJQueryCleanData;\nfunction bindJQuery() {\n var originalCleanData;\n\n if (bindJQueryFired) {\n return;\n }\n\n // bind to jQuery if present;\n var jqName = jq();\n jQuery = isUndefined(jqName) ? window.jQuery : // use jQuery (if present)\n !jqName ? undefined : // use jqLite\n window[jqName]; // use jQuery specified by `ngJq`\n\n // Use jQuery if it exists with proper functionality, otherwise default to us.\n // Angular 1.2+ requires jQuery 1.7+ for on()/off() support.\n // Angular 1.3+ technically requires at least jQuery 2.1+ but it may work with older\n // versions. It will not work for sure with jQuery <1.7, though.\n if (jQuery && jQuery.fn.on) {\n jqLite = jQuery;\n extend(jQuery.fn, {\n scope: JQLitePrototype.scope,\n isolateScope: JQLitePrototype.isolateScope,\n controller: JQLitePrototype.controller,\n injector: JQLitePrototype.injector,\n inheritedData: JQLitePrototype.inheritedData\n });\n\n // All nodes removed from the DOM via various jQuery APIs like .remove()\n // are passed through jQuery.cleanData. Monkey-patch this method to fire\n // the $destroy event on all removed nodes.\n originalCleanData = jQuery.cleanData;\n jQuery.cleanData = function(elems) {\n var events;\n if (!skipDestroyOnNextJQueryCleanData) {\n for (var i = 0, elem; (elem = elems[i]) != null; i++) {\n events = jQuery._data(elem, \"events\");\n if (events && events.$destroy) {\n jQuery(elem).triggerHandler('$destroy');\n }\n }\n } else {\n skipDestroyOnNextJQueryCleanData = false;\n }\n originalCleanData(elems);\n };\n } else {\n jqLite = JQLite;\n }\n\n angular.element = jqLite;\n\n // Prevent double-proxying.\n bindJQueryFired = true;\n}\n\n/**\n * throw error if the argument is falsy.\n */\nfunction assertArg(arg, name, reason) {\n if (!arg) {\n throw ngMinErr('areq', \"Argument '{0}' is {1}\", (name || '?'), (reason || \"required\"));\n }\n return arg;\n}\n\nfunction assertArgFn(arg, name, acceptArrayAnnotation) {\n if (acceptArrayAnnotation && isArray(arg)) {\n arg = arg[arg.length - 1];\n }\n\n assertArg(isFunction(arg), name, 'not a function, got ' +\n (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));\n return arg;\n}\n\n/**\n * throw error if the name given is hasOwnProperty\n * @param {String} name the name to test\n * @param {String} context the context in which the name is used, such as module or directive\n */\nfunction assertNotHasOwnProperty(name, context) {\n if (name === 'hasOwnProperty') {\n throw ngMinErr('badname', \"hasOwnProperty is not a valid {0} name\", context);\n }\n}\n\n/**\n * Return the value accessible from the object by path. Any undefined traversals are ignored\n * @param {Object} obj starting object\n * @param {String} path path to traverse\n * @param {boolean} [bindFnToScope=true]\n * @returns {Object} value as accessible by path\n */\n//TODO(misko): this function needs to be removed\nfunction getter(obj, path, bindFnToScope) {\n if (!path) return obj;\n var keys = path.split('.');\n var key;\n var lastInstance = obj;\n var len = keys.length;\n\n for (var i = 0; i < len; i++) {\n key = keys[i];\n if (obj) {\n obj = (lastInstance = obj)[key];\n }\n }\n if (!bindFnToScope && isFunction(obj)) {\n return bind(lastInstance, obj);\n }\n return obj;\n}\n\n/**\n * Return the DOM siblings between the first and last node in the given array.\n * @param {Array} array like object\n * @returns {Array} the inputted object or a jqLite collection containing the nodes\n */\nfunction getBlockNodes(nodes) {\n // TODO(perf): update `nodes` instead of creating a new object?\n var node = nodes[0];\n var endNode = nodes[nodes.length - 1];\n var blockNodes;\n\n for (var i = 1; node !== endNode && (node = node.nextSibling); i++) {\n if (blockNodes || nodes[i] !== node) {\n if (!blockNodes) {\n blockNodes = jqLite(slice.call(nodes, 0, i));\n }\n blockNodes.push(node);\n }\n }\n\n return blockNodes || nodes;\n}\n\n\n/**\n * Creates a new object without a prototype. This object is useful for lookup without having to\n * guard against prototypically inherited properties via hasOwnProperty.\n *\n * Related micro-benchmarks:\n * - http://jsperf.com/object-create2\n * - http://jsperf.com/proto-map-lookup/2\n * - http://jsperf.com/for-in-vs-object-keys2\n *\n * @returns {Object}\n */\nfunction createMap() {\n return Object.create(null);\n}\n\nvar NODE_TYPE_ELEMENT = 1;\nvar NODE_TYPE_ATTRIBUTE = 2;\nvar NODE_TYPE_TEXT = 3;\nvar NODE_TYPE_COMMENT = 8;\nvar NODE_TYPE_DOCUMENT = 9;\nvar NODE_TYPE_DOCUMENT_FRAGMENT = 11;\n\n/**\n * @ngdoc type\n * @name angular.Module\n * @module ng\n * @description\n *\n * Interface for configuring angular {@link angular.module modules}.\n */\n\nfunction setupModuleLoader(window) {\n\n var $injectorMinErr = minErr('$injector');\n var ngMinErr = minErr('ng');\n\n function ensure(obj, name, factory) {\n return obj[name] || (obj[name] = factory());\n }\n\n var angular = ensure(window, 'angular', Object);\n\n // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap\n angular.$$minErr = angular.$$minErr || minErr;\n\n return ensure(angular, 'module', function() {\n /** @type {Object.<string, angular.Module>} */\n var modules = {};\n\n /**\n * @ngdoc function\n * @name angular.module\n * @module ng\n * @description\n *\n * The `angular.module` is a global place for creating, registering and retrieving Angular\n * modules.\n * All modules (angular core or 3rd party) that should be available to an application must be\n * registered using this mechanism.\n *\n * Passing one argument retrieves an existing {@link angular.Module},\n * whereas passing more than one argument creates a new {@link angular.Module}\n *\n *\n * # Module\n *\n * A module is a collection of services, directives, controllers, filters, and configuration information.\n * `angular.module` is used to configure the {@link auto.$injector $injector}.\n *\n * ```js\n * // Create a new module\n * var myModule = angular.module('myModule', []);\n *\n * // register a new service\n * myModule.value('appName', 'MyCoolApp');\n *\n * // configure existing services inside initialization blocks.\n * myModule.config(['$locationProvider', function($locationProvider) {\n * // Configure existing providers\n * $locationProvider.hashPrefix('!');\n * }]);\n * ```\n *\n * Then you can create an injector and load your modules like this:\n *\n * ```js\n * var injector = angular.injector(['ng', 'myModule'])\n * ```\n *\n * However it's more likely that you'll just use\n * {@link ng.directive:ngApp ngApp} or\n * {@link angular.bootstrap} to simplify this process for you.\n *\n * @param {!string} name The name of the module to create or retrieve.\n * @param {!Array.<string>=} requires If specified then new module is being created. If\n * unspecified then the module is being retrieved for further configuration.\n * @param {Function=} configFn Optional configuration function for the module. Same as\n * {@link angular.Module#config Module#config()}.\n * @returns {angular.Module} new module with the {@link angular.Module} api.\n */\n return function module(name, requires, configFn) {\n var assertNotHasOwnProperty = function(name, context) {\n if (name === 'hasOwnProperty') {\n throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);\n }\n };\n\n assertNotHasOwnProperty(name, 'module');\n if (requires && modules.hasOwnProperty(name)) {\n modules[name] = null;\n }\n return ensure(modules, name, function() {\n if (!requires) {\n throw $injectorMinErr('nomod', \"Module '{0}' is not available! You either misspelled \" +\n \"the module name or forgot to load it. If registering a module ensure that you \" +\n \"specify the dependencies as the second argument.\", name);\n }\n\n /** @type {!Array.<Array.<*>>} */\n var invokeQueue = [];\n\n /** @type {!Array.<Function>} */\n var configBlocks = [];\n\n /** @type {!Array.<Function>} */\n var runBlocks = [];\n\n var config = invokeLater('$injector', 'invoke', 'push', configBlocks);\n\n /** @type {angular.Module} */\n var moduleInstance = {\n // Private state\n _invokeQueue: invokeQueue,\n _configBlocks: configBlocks,\n _runBlocks: runBlocks,\n\n /**\n * @ngdoc property\n * @name angular.Module#requires\n * @module ng\n *\n * @description\n * Holds the list of modules which the injector will load before the current module is\n * loaded.\n */\n requires: requires,\n\n /**\n * @ngdoc property\n * @name angular.Module#name\n * @module ng\n *\n * @description\n * Name of the module.\n */\n name: name,\n\n\n /**\n * @ngdoc method\n * @name angular.Module#provider\n * @module ng\n * @param {string} name service name\n * @param {Function} providerType Construction function for creating new instance of the\n * service.\n * @description\n * See {@link auto.$provide#provider $provide.provider()}.\n */\n provider: invokeLaterAndSetModuleName('$provide', 'provider'),\n\n /**\n * @ngdoc method\n * @name angular.Module#factory\n * @module ng\n * @param {string} name service name\n * @param {Function} providerFunction Function for creating new instance of the service.\n * @description\n * See {@link auto.$provide#factory $provide.factory()}.\n */\n factory: invokeLaterAndSetModuleName('$provide', 'factory'),\n\n /**\n * @ngdoc method\n * @name angular.Module#service\n * @module ng\n * @param {string} name service name\n * @param {Function} constructor A constructor function that will be instantiated.\n * @description\n * See {@link auto.$provide#service $provide.service()}.\n */\n service: invokeLaterAndSetModuleName('$provide', 'service'),\n\n /**\n * @ngdoc method\n * @name angular.Module#value\n * @module ng\n * @param {string} name service name\n * @param {*} object Service instance object.\n * @description\n * See {@link auto.$provide#value $provide.value()}.\n */\n value: invokeLater('$provide', 'value'),\n\n /**\n * @ngdoc method\n * @name angular.Module#constant\n * @module ng\n * @param {string} name constant name\n * @param {*} object Constant value.\n * @description\n * Because the constants are fixed, they get applied before other provide methods.\n * See {@link auto.$provide#constant $provide.constant()}.\n */\n constant: invokeLater('$provide', 'constant', 'unshift'),\n\n /**\n * @ngdoc method\n * @name angular.Module#decorator\n * @module ng\n * @param {string} name The name of the service to decorate.\n * @param {Function} decorFn This function will be invoked when the service needs to be\n * instantiated and should return the decorated service instance.\n * @description\n * See {@link auto.$provide#decorator $provide.decorator()}.\n */\n decorator: invokeLaterAndSetModuleName('$provide', 'decorator'),\n\n /**\n * @ngdoc method\n * @name angular.Module#animation\n * @module ng\n * @param {string} name animation name\n * @param {Function} animationFactory Factory function for creating new instance of an\n * animation.\n * @description\n *\n * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.\n *\n *\n * Defines an animation hook that can be later used with\n * {@link $animate $animate} service and directives that use this service.\n *\n * ```js\n * module.animation('.animation-name', function($inject1, $inject2) {\n * return {\n * eventName : function(element, done) {\n * //code to run the animation\n * //once complete, then run done()\n * return function cancellationFunction(element) {\n * //code to cancel the animation\n * }\n * }\n * }\n * })\n * ```\n *\n * See {@link ng.$animateProvider#register $animateProvider.register()} and\n * {@link ngAnimate ngAnimate module} for more information.\n */\n animation: invokeLaterAndSetModuleName('$animateProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#filter\n * @module ng\n * @param {string} name Filter name - this must be a valid angular expression identifier\n * @param {Function} filterFactory Factory function for creating new instance of filter.\n * @description\n * See {@link ng.$filterProvider#register $filterProvider.register()}.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.\n * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace\n * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores\n * (`myapp_subsection_filterx`).\n * </div>\n */\n filter: invokeLaterAndSetModuleName('$filterProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#controller\n * @module ng\n * @param {string|Object} name Controller name, or an object map of controllers where the\n * keys are the names and the values are the constructors.\n * @param {Function} constructor Controller constructor function.\n * @description\n * See {@link ng.$controllerProvider#register $controllerProvider.register()}.\n */\n controller: invokeLaterAndSetModuleName('$controllerProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#directive\n * @module ng\n * @param {string|Object} name Directive name, or an object map of directives where the\n * keys are the names and the values are the factories.\n * @param {Function} directiveFactory Factory function for creating new instance of\n * directives.\n * @description\n * See {@link ng.$compileProvider#directive $compileProvider.directive()}.\n */\n directive: invokeLaterAndSetModuleName('$compileProvider', 'directive'),\n\n /**\n * @ngdoc method\n * @name angular.Module#config\n * @module ng\n * @param {Function} configFn Execute this function on module load. Useful for service\n * configuration.\n * @description\n * Use this method to register work which needs to be performed on module loading.\n * For more about how to configure services, see\n * {@link providers#provider-recipe Provider Recipe}.\n */\n config: config,\n\n /**\n * @ngdoc method\n * @name angular.Module#run\n * @module ng\n * @param {Function} initializationFn Execute this function after injector creation.\n * Useful for application initialization.\n * @description\n * Use this method to register work which should be performed when the injector is done\n * loading all modules.\n */\n run: function(block) {\n runBlocks.push(block);\n return this;\n }\n };\n\n if (configFn) {\n config(configFn);\n }\n\n return moduleInstance;\n\n /**\n * @param {string} provider\n * @param {string} method\n * @param {String=} insertMethod\n * @returns {angular.Module}\n */\n function invokeLater(provider, method, insertMethod, queue) {\n if (!queue) queue = invokeQueue;\n return function() {\n queue[insertMethod || 'push']([provider, method, arguments]);\n return moduleInstance;\n };\n }\n\n /**\n * @param {string} provider\n * @param {string} method\n * @returns {angular.Module}\n */\n function invokeLaterAndSetModuleName(provider, method) {\n return function(recipeName, factoryFunction) {\n if (factoryFunction && isFunction(factoryFunction)) factoryFunction.$$moduleName = name;\n invokeQueue.push([provider, method, arguments]);\n return moduleInstance;\n };\n }\n });\n };\n });\n\n}\n\n/* global: toDebugString: true */\n\nfunction serializeObject(obj) {\n var seen = [];\n\n return JSON.stringify(obj, function(key, val) {\n val = toJsonReplacer(key, val);\n if (isObject(val)) {\n\n if (seen.indexOf(val) >= 0) return '...';\n\n seen.push(val);\n }\n return val;\n });\n}\n\nfunction toDebugString(obj) {\n if (typeof obj === 'function') {\n return obj.toString().replace(/ \\{[\\s\\S]*$/, '');\n } else if (isUndefined(obj)) {\n return 'undefined';\n } else if (typeof obj !== 'string') {\n return serializeObject(obj);\n }\n return obj;\n}\n\n/* global angularModule: true,\n version: true,\n\n $CompileProvider,\n\n htmlAnchorDirective,\n inputDirective,\n inputDirective,\n formDirective,\n scriptDirective,\n selectDirective,\n styleDirective,\n optionDirective,\n ngBindDirective,\n ngBindHtmlDirective,\n ngBindTemplateDirective,\n ngClassDirective,\n ngClassEvenDirective,\n ngClassOddDirective,\n ngCloakDirective,\n ngControllerDirective,\n ngFormDirective,\n ngHideDirective,\n ngIfDirective,\n ngIncludeDirective,\n ngIncludeFillContentDirective,\n ngInitDirective,\n ngNonBindableDirective,\n ngPluralizeDirective,\n ngRepeatDirective,\n ngShowDirective,\n ngStyleDirective,\n ngSwitchDirective,\n ngSwitchWhenDirective,\n ngSwitchDefaultDirective,\n ngOptionsDirective,\n ngTranscludeDirective,\n ngModelDirective,\n ngListDirective,\n ngChangeDirective,\n patternDirective,\n patternDirective,\n requiredDirective,\n requiredDirective,\n minlengthDirective,\n minlengthDirective,\n maxlengthDirective,\n maxlengthDirective,\n ngValueDirective,\n ngModelOptionsDirective,\n ngAttributeAliasDirectives,\n ngEventDirectives,\n\n $AnchorScrollProvider,\n $AnimateProvider,\n $CoreAnimateCssProvider,\n $$CoreAnimateJsProvider,\n $$CoreAnimateQueueProvider,\n $$AnimateRunnerFactoryProvider,\n $$AnimateAsyncRunFactoryProvider,\n $BrowserProvider,\n $CacheFactoryProvider,\n $ControllerProvider,\n $DocumentProvider,\n $ExceptionHandlerProvider,\n $FilterProvider,\n $$ForceReflowProvider,\n $InterpolateProvider,\n $IntervalProvider,\n $$HashMapProvider,\n $HttpProvider,\n $HttpParamSerializerProvider,\n $HttpParamSerializerJQLikeProvider,\n $HttpBackendProvider,\n $xhrFactoryProvider,\n $LocationProvider,\n $LogProvider,\n $ParseProvider,\n $RootScopeProvider,\n $QProvider,\n $$QProvider,\n $$SanitizeUriProvider,\n $SceProvider,\n $SceDelegateProvider,\n $SnifferProvider,\n $TemplateCacheProvider,\n $TemplateRequestProvider,\n $$TestabilityProvider,\n $TimeoutProvider,\n $$RAFProvider,\n $WindowProvider,\n $$jqLiteProvider,\n $$CookieReaderProvider\n*/\n\n\n/**\n * @ngdoc object\n * @name angular.version\n * @module ng\n * @description\n * An object that contains information about the current AngularJS version.\n *\n * This object has the following properties:\n *\n * - `full` `{string}` Full version string, such as \"0.9.18\".\n * - `major` `{number}` Major version number, such as \"0\".\n * - `minor` `{number}` Minor version number, such as \"9\".\n * - `dot` `{number}` Dot version number, such as \"18\".\n * - `codeName` `{string}` Code name of the release, such as \"jiggling-armfat\".\n */\nvar version = {\n full: '1.4.14', // all of these placeholder strings will be replaced by grunt's\n major: 1, // package task\n minor: 4,\n dot: 14,\n codeName: 'material-distinction'\n};\n\n\nfunction publishExternalAPI(angular) {\n extend(angular, {\n 'bootstrap': bootstrap,\n 'copy': copy,\n 'extend': extend,\n 'merge': merge,\n 'equals': equals,\n 'element': jqLite,\n 'forEach': forEach,\n 'injector': createInjector,\n 'noop': noop,\n 'bind': bind,\n 'toJson': toJson,\n 'fromJson': fromJson,\n 'identity': identity,\n 'isUndefined': isUndefined,\n 'isDefined': isDefined,\n 'isString': isString,\n 'isFunction': isFunction,\n 'isObject': isObject,\n 'isNumber': isNumber,\n 'isElement': isElement,\n 'isArray': isArray,\n 'version': version,\n 'isDate': isDate,\n 'lowercase': lowercase,\n 'uppercase': uppercase,\n 'callbacks': {counter: 0},\n 'getTestability': getTestability,\n '$$minErr': minErr,\n '$$csp': csp,\n 'reloadWithDebugInfo': reloadWithDebugInfo\n });\n\n angularModule = setupModuleLoader(window);\n\n angularModule('ng', ['ngLocale'], ['$provide',\n function ngModule($provide) {\n // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.\n $provide.provider({\n $$sanitizeUri: $$SanitizeUriProvider\n });\n $provide.provider('$compile', $CompileProvider).\n directive({\n a: htmlAnchorDirective,\n input: inputDirective,\n textarea: inputDirective,\n form: formDirective,\n script: scriptDirective,\n select: selectDirective,\n style: styleDirective,\n option: optionDirective,\n ngBind: ngBindDirective,\n ngBindHtml: ngBindHtmlDirective,\n ngBindTemplate: ngBindTemplateDirective,\n ngClass: ngClassDirective,\n ngClassEven: ngClassEvenDirective,\n ngClassOdd: ngClassOddDirective,\n ngCloak: ngCloakDirective,\n ngController: ngControllerDirective,\n ngForm: ngFormDirective,\n ngHide: ngHideDirective,\n ngIf: ngIfDirective,\n ngInclude: ngIncludeDirective,\n ngInit: ngInitDirective,\n ngNonBindable: ngNonBindableDirective,\n ngPluralize: ngPluralizeDirective,\n ngRepeat: ngRepeatDirective,\n ngShow: ngShowDirective,\n ngStyle: ngStyleDirective,\n ngSwitch: ngSwitchDirective,\n ngSwitchWhen: ngSwitchWhenDirective,\n ngSwitchDefault: ngSwitchDefaultDirective,\n ngOptions: ngOptionsDirective,\n ngTransclude: ngTranscludeDirective,\n ngModel: ngModelDirective,\n ngList: ngListDirective,\n ngChange: ngChangeDirective,\n pattern: patternDirective,\n ngPattern: patternDirective,\n required: requiredDirective,\n ngRequired: requiredDirective,\n minlength: minlengthDirective,\n ngMinlength: minlengthDirective,\n maxlength: maxlengthDirective,\n ngMaxlength: maxlengthDirective,\n ngValue: ngValueDirective,\n ngModelOptions: ngModelOptionsDirective\n }).\n directive({\n ngInclude: ngIncludeFillContentDirective\n }).\n directive(ngAttributeAliasDirectives).\n directive(ngEventDirectives);\n $provide.provider({\n $anchorScroll: $AnchorScrollProvider,\n $animate: $AnimateProvider,\n $animateCss: $CoreAnimateCssProvider,\n $$animateJs: $$CoreAnimateJsProvider,\n $$animateQueue: $$CoreAnimateQueueProvider,\n $$AnimateRunner: $$AnimateRunnerFactoryProvider,\n $$animateAsyncRun: $$AnimateAsyncRunFactoryProvider,\n $browser: $BrowserProvider,\n $cacheFactory: $CacheFactoryProvider,\n $controller: $ControllerProvider,\n $document: $DocumentProvider,\n $exceptionHandler: $ExceptionHandlerProvider,\n $filter: $FilterProvider,\n $$forceReflow: $$ForceReflowProvider,\n $interpolate: $InterpolateProvider,\n $interval: $IntervalProvider,\n $http: $HttpProvider,\n $httpParamSerializer: $HttpParamSerializerProvider,\n $httpParamSerializerJQLike: $HttpParamSerializerJQLikeProvider,\n $httpBackend: $HttpBackendProvider,\n $xhrFactory: $xhrFactoryProvider,\n $location: $LocationProvider,\n $log: $LogProvider,\n $parse: $ParseProvider,\n $rootScope: $RootScopeProvider,\n $q: $QProvider,\n $$q: $$QProvider,\n $sce: $SceProvider,\n $sceDelegate: $SceDelegateProvider,\n $sniffer: $SnifferProvider,\n $templateCache: $TemplateCacheProvider,\n $templateRequest: $TemplateRequestProvider,\n $$testability: $$TestabilityProvider,\n $timeout: $TimeoutProvider,\n $window: $WindowProvider,\n $$rAF: $$RAFProvider,\n $$jqLite: $$jqLiteProvider,\n $$HashMap: $$HashMapProvider,\n $$cookieReader: $$CookieReaderProvider\n });\n }\n ]);\n}\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * Any commits to this file should be reviewed with security in mind. *\n * Changes to this file can potentially create security vulnerabilities. *\n * An approval from 2 Core members with history of modifying *\n * this file is required. *\n * *\n * Does the change somehow allow for arbitrary javascript to be executed? *\n * Or allows for someone to change the prototype of built-in objects? *\n * Or gives undesired access to variables likes document or window? *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\n/* global JQLitePrototype: true,\n addEventListenerFn: true,\n removeEventListenerFn: true,\n BOOLEAN_ATTR: true,\n ALIASED_ATTR: true,\n*/\n\n//////////////////////////////////\n//JQLite\n//////////////////////////////////\n\n/**\n * @ngdoc function\n * @name angular.element\n * @module ng\n * @kind function\n *\n * @description\n * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.\n *\n * If jQuery is available, `angular.element` is an alias for the\n * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`\n * delegates to Angular's built-in subset of jQuery, called \"jQuery lite\" or **jqLite**.\n *\n * jqLite is a tiny, API-compatible subset of jQuery that allows\n * Angular to manipulate the DOM in a cross-browser compatible way. jqLite implements only the most\n * commonly needed functionality with the goal of having a very small footprint.\n *\n * To use `jQuery`, simply ensure it is loaded before the `angular.js` file. You can also use the\n * {@link ngJq `ngJq`} directive to specify that jqlite should be used over jQuery, or to use a\n * specific version of jQuery if multiple versions exist on the page.\n *\n * <div class=\"alert alert-info\">**Note:** All element references in Angular are always wrapped with jQuery or\n * jqLite (such as the element argument in a directive's compile / link function). They are never raw DOM references.</div>\n *\n * <div class=\"alert alert-warning\">**Note:** Keep in mind that this function will not find elements\n * by tag name / CSS selector. For lookups by tag name, try instead `angular.element(document).find(...)`\n * or `$document.find()`, or use the standard DOM APIs, e.g. `document.querySelectorAll()`.</div>\n *\n * ## Angular's jqLite\n * jqLite provides only the following jQuery methods:\n *\n * - [`addClass()`](http://api.jquery.com/addClass/)\n * - [`after()`](http://api.jquery.com/after/)\n * - [`append()`](http://api.jquery.com/append/)\n * - [`attr()`](http://api.jquery.com/attr/) - Does not support functions as parameters\n * - [`bind()`](http://api.jquery.com/bind/) - Does not support namespaces, selectors or eventData\n * - [`children()`](http://api.jquery.com/children/) - Does not support selectors\n * - [`clone()`](http://api.jquery.com/clone/)\n * - [`contents()`](http://api.jquery.com/contents/)\n * - [`css()`](http://api.jquery.com/css/) - Only retrieves inline-styles, does not call `getComputedStyle()`.\n * As a setter, does not convert numbers to strings or append 'px', and also does not have automatic property prefixing.\n * - [`data()`](http://api.jquery.com/data/)\n * - [`detach()`](http://api.jquery.com/detach/)\n * - [`empty()`](http://api.jquery.com/empty/)\n * - [`eq()`](http://api.jquery.com/eq/)\n * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name\n * - [`hasClass()`](http://api.jquery.com/hasClass/)\n * - [`html()`](http://api.jquery.com/html/)\n * - [`next()`](http://api.jquery.com/next/) - Does not support selectors\n * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData\n * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces, selectors or event object as parameter\n * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors\n * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors\n * - [`prepend()`](http://api.jquery.com/prepend/)\n * - [`prop()`](http://api.jquery.com/prop/)\n * - [`ready()`](http://api.jquery.com/ready/)\n * - [`remove()`](http://api.jquery.com/remove/)\n * - [`removeAttr()`](http://api.jquery.com/removeAttr/)\n * - [`removeClass()`](http://api.jquery.com/removeClass/)\n * - [`removeData()`](http://api.jquery.com/removeData/)\n * - [`replaceWith()`](http://api.jquery.com/replaceWith/)\n * - [`text()`](http://api.jquery.com/text/)\n * - [`toggleClass()`](http://api.jquery.com/toggleClass/)\n * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.\n * - [`unbind()`](http://api.jquery.com/unbind/) - Does not support namespaces or event object as parameter\n * - [`val()`](http://api.jquery.com/val/)\n * - [`wrap()`](http://api.jquery.com/wrap/)\n *\n * ## jQuery/jqLite Extras\n * Angular also provides the following additional methods and events to both jQuery and jqLite:\n *\n * ### Events\n * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event\n * on all DOM nodes being removed. This can be used to clean up any 3rd party bindings to the DOM\n * element before it is removed.\n *\n * ### Methods\n * - `controller(name)` - retrieves the controller of the current element or its parent. By default\n * retrieves controller associated with the `ngController` directive. If `name` is provided as\n * camelCase directive name, then the controller for this directive will be retrieved (e.g.\n * `'ngModel'`).\n * - `injector()` - retrieves the injector of the current element or its parent.\n * - `scope()` - retrieves the {@link ng.$rootScope.Scope scope} of the current\n * element or its parent. Requires {@link guide/production#disabling-debug-data Debug Data} to\n * be enabled.\n * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the\n * current element. This getter should be used only on elements that contain a directive which starts a new isolate\n * scope. Calling `scope()` on this element always returns the original non-isolate scope.\n * Requires {@link guide/production#disabling-debug-data Debug Data} to be enabled.\n * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top\n * parent element is reached.\n *\n * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.\n * @returns {Object} jQuery object.\n */\n\nJQLite.expando = 'ng339';\n\nvar jqCache = JQLite.cache = {},\n jqId = 1,\n addEventListenerFn = function(element, type, fn) {\n element.addEventListener(type, fn, false);\n },\n removeEventListenerFn = function(element, type, fn) {\n element.removeEventListener(type, fn, false);\n };\n\n/*\n * !!! This is an undocumented \"private\" function !!!\n */\nJQLite._data = function(node) {\n //jQuery always returns an object on cache miss\n return this.cache[node[this.expando]] || {};\n};\n\nfunction jqNextId() { return ++jqId; }\n\n\nvar SPECIAL_CHARS_REGEXP = /([\\:\\-\\_]+(.))/g;\nvar MOZ_HACK_REGEXP = /^moz([A-Z])/;\nvar MOUSE_EVENT_MAP= { mouseleave: \"mouseout\", mouseenter: \"mouseover\"};\nvar jqLiteMinErr = minErr('jqLite');\n\n/**\n * Converts snake_case to camelCase.\n * Also there is special case for Moz prefix starting with upper case letter.\n * @param name Name to normalize\n */\nfunction camelCase(name) {\n return name.\n replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {\n return offset ? letter.toUpperCase() : letter;\n }).\n replace(MOZ_HACK_REGEXP, 'Moz$1');\n}\n\nvar SINGLE_TAG_REGEXP = /^<([\\w-]+)\\s*\\/?>(?:<\\/\\1>|)$/;\nvar HTML_REGEXP = /<|&#?\\w+;/;\nvar TAG_NAME_REGEXP = /<([\\w:-]+)/;\nvar XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:-]+)[^>]*)\\/>/gi;\n\nvar wrapMap = {\n 'option': [1, '<select multiple=\"multiple\">', '</select>'],\n\n 'thead': [1, '<table>', '</table>'],\n 'col': [2, '<table><colgroup>', '</colgroup></table>'],\n 'tr': [2, '<table><tbody>', '</tbody></table>'],\n 'td': [3, '<table><tbody><tr>', '</tr></tbody></table>'],\n '_default': [0, \"\", \"\"]\n};\n\nwrapMap.optgroup = wrapMap.option;\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction jqLiteIsTextNode(html) {\n return !HTML_REGEXP.test(html);\n}\n\nfunction jqLiteAcceptsData(node) {\n // The window object can accept data but has no nodeType\n // Otherwise we are only interested in elements (1) and documents (9)\n var nodeType = node.nodeType;\n return nodeType === NODE_TYPE_ELEMENT || !nodeType || nodeType === NODE_TYPE_DOCUMENT;\n}\n\nfunction jqLiteHasData(node) {\n for (var key in jqCache[node.ng339]) {\n return true;\n }\n return false;\n}\n\nfunction jqLiteBuildFragment(html, context) {\n var tmp, tag, wrap,\n fragment = context.createDocumentFragment(),\n nodes = [], i;\n\n if (jqLiteIsTextNode(html)) {\n // Convert non-html into a text node\n nodes.push(context.createTextNode(html));\n } else {\n // Convert html into DOM nodes\n tmp = tmp || fragment.appendChild(context.createElement(\"div\"));\n tag = (TAG_NAME_REGEXP.exec(html) || [\"\", \"\"])[1].toLowerCase();\n wrap = wrapMap[tag] || wrapMap._default;\n tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, \"<$1></$2>\") + wrap[2];\n\n // Descend through wrappers to the right content\n i = wrap[0];\n while (i--) {\n tmp = tmp.lastChild;\n }\n\n nodes = concat(nodes, tmp.childNodes);\n\n tmp = fragment.firstChild;\n tmp.textContent = \"\";\n }\n\n // Remove wrapper from fragment\n fragment.textContent = \"\";\n fragment.innerHTML = \"\"; // Clear inner HTML\n forEach(nodes, function(node) {\n fragment.appendChild(node);\n });\n\n return fragment;\n}\n\nfunction jqLiteParseHTML(html, context) {\n context = context || document;\n var parsed;\n\n if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {\n return [context.createElement(parsed[1])];\n }\n\n if ((parsed = jqLiteBuildFragment(html, context))) {\n return parsed.childNodes;\n }\n\n return [];\n}\n\nfunction jqLiteWrapNode(node, wrapper) {\n var parent = node.parentNode;\n\n if (parent) {\n parent.replaceChild(wrapper, node);\n }\n\n wrapper.appendChild(node);\n}\n\n\n// IE9-11 has no method \"contains\" in SVG element and in Node.prototype. Bug #10259.\nvar jqLiteContains = Node.prototype.contains || function(arg) {\n // jshint bitwise: false\n return !!(this.compareDocumentPosition(arg) & 16);\n // jshint bitwise: true\n};\n\n/////////////////////////////////////////////\nfunction JQLite(element) {\n if (element instanceof JQLite) {\n return element;\n }\n\n var argIsString;\n\n if (isString(element)) {\n element = trim(element);\n argIsString = true;\n }\n if (!(this instanceof JQLite)) {\n if (argIsString && element.charAt(0) != '<') {\n throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');\n }\n return new JQLite(element);\n }\n\n if (argIsString) {\n jqLiteAddNodes(this, jqLiteParseHTML(element));\n } else {\n jqLiteAddNodes(this, element);\n }\n}\n\nfunction jqLiteClone(element) {\n return element.cloneNode(true);\n}\n\nfunction jqLiteDealoc(element, onlyDescendants) {\n if (!onlyDescendants) jqLiteRemoveData(element);\n\n if (element.querySelectorAll) {\n var descendants = element.querySelectorAll('*');\n for (var i = 0, l = descendants.length; i < l; i++) {\n jqLiteRemoveData(descendants[i]);\n }\n }\n}\n\nfunction jqLiteOff(element, type, fn, unsupported) {\n if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');\n\n var expandoStore = jqLiteExpandoStore(element);\n var events = expandoStore && expandoStore.events;\n var handle = expandoStore && expandoStore.handle;\n\n if (!handle) return; //no listeners registered\n\n if (!type) {\n for (type in events) {\n if (type !== '$destroy') {\n removeEventListenerFn(element, type, handle);\n }\n delete events[type];\n }\n } else {\n\n var removeHandler = function(type) {\n var listenerFns = events[type];\n if (isDefined(fn)) {\n arrayRemove(listenerFns || [], fn);\n }\n if (!(isDefined(fn) && listenerFns && listenerFns.length > 0)) {\n removeEventListenerFn(element, type, handle);\n delete events[type];\n }\n };\n\n forEach(type.split(' '), function(type) {\n removeHandler(type);\n if (MOUSE_EVENT_MAP[type]) {\n removeHandler(MOUSE_EVENT_MAP[type]);\n }\n });\n }\n}\n\nfunction jqLiteRemoveData(element, name) {\n var expandoId = element.ng339;\n var expandoStore = expandoId && jqCache[expandoId];\n\n if (expandoStore) {\n if (name) {\n delete expandoStore.data[name];\n return;\n }\n\n if (expandoStore.handle) {\n if (expandoStore.events.$destroy) {\n expandoStore.handle({}, '$destroy');\n }\n jqLiteOff(element);\n }\n delete jqCache[expandoId];\n element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it\n }\n}\n\n\nfunction jqLiteExpandoStore(element, createIfNecessary) {\n var expandoId = element.ng339,\n expandoStore = expandoId && jqCache[expandoId];\n\n if (createIfNecessary && !expandoStore) {\n element.ng339 = expandoId = jqNextId();\n expandoStore = jqCache[expandoId] = {events: {}, data: {}, handle: undefined};\n }\n\n return expandoStore;\n}\n\n\nfunction jqLiteData(element, key, value) {\n if (jqLiteAcceptsData(element)) {\n\n var isSimpleSetter = isDefined(value);\n var isSimpleGetter = !isSimpleSetter && key && !isObject(key);\n var massGetter = !key;\n var expandoStore = jqLiteExpandoStore(element, !isSimpleGetter);\n var data = expandoStore && expandoStore.data;\n\n if (isSimpleSetter) { // data('key', value)\n data[key] = value;\n } else {\n if (massGetter) { // data()\n return data;\n } else {\n if (isSimpleGetter) { // data('key')\n // don't force creation of expandoStore if it doesn't exist yet\n return data && data[key];\n } else { // mass-setter: data({key1: val1, key2: val2})\n extend(data, key);\n }\n }\n }\n }\n}\n\nfunction jqLiteHasClass(element, selector) {\n if (!element.getAttribute) return false;\n return ((\" \" + (element.getAttribute('class') || '') + \" \").replace(/[\\n\\t]/g, \" \").\n indexOf(\" \" + selector + \" \") > -1);\n}\n\nfunction jqLiteRemoveClass(element, cssClasses) {\n if (cssClasses && element.setAttribute) {\n forEach(cssClasses.split(' '), function(cssClass) {\n element.setAttribute('class', trim(\n (\" \" + (element.getAttribute('class') || '') + \" \")\n .replace(/[\\n\\t]/g, \" \")\n .replace(\" \" + trim(cssClass) + \" \", \" \"))\n );\n });\n }\n}\n\nfunction jqLiteAddClass(element, cssClasses) {\n if (cssClasses && element.setAttribute) {\n var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')\n .replace(/[\\n\\t]/g, \" \");\n\n forEach(cssClasses.split(' '), function(cssClass) {\n cssClass = trim(cssClass);\n if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {\n existingClasses += cssClass + ' ';\n }\n });\n\n element.setAttribute('class', trim(existingClasses));\n }\n}\n\n\nfunction jqLiteAddNodes(root, elements) {\n // THIS CODE IS VERY HOT. Don't make changes without benchmarking.\n\n if (elements) {\n\n // if a Node (the most common case)\n if (elements.nodeType) {\n root[root.length++] = elements;\n } else {\n var length = elements.length;\n\n // if an Array or NodeList and not a Window\n if (typeof length === 'number' && elements.window !== elements) {\n if (length) {\n for (var i = 0; i < length; i++) {\n root[root.length++] = elements[i];\n }\n }\n } else {\n root[root.length++] = elements;\n }\n }\n }\n}\n\n\nfunction jqLiteController(element, name) {\n return jqLiteInheritedData(element, '$' + (name || 'ngController') + 'Controller');\n}\n\nfunction jqLiteInheritedData(element, name, value) {\n // if element is the document object work with the html element instead\n // this makes $(document).scope() possible\n if (element.nodeType == NODE_TYPE_DOCUMENT) {\n element = element.documentElement;\n }\n var names = isArray(name) ? name : [name];\n\n while (element) {\n for (var i = 0, ii = names.length; i < ii; i++) {\n if (isDefined(value = jqLite.data(element, names[i]))) return value;\n }\n\n // If dealing with a document fragment node with a host element, and no parent, use the host\n // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM\n // to lookup parent controllers.\n element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host);\n }\n}\n\nfunction jqLiteEmpty(element) {\n jqLiteDealoc(element, true);\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n}\n\nfunction jqLiteRemove(element, keepData) {\n if (!keepData) jqLiteDealoc(element);\n var parent = element.parentNode;\n if (parent) parent.removeChild(element);\n}\n\n\nfunction jqLiteDocumentLoaded(action, win) {\n win = win || window;\n if (win.document.readyState === 'complete') {\n // Force the action to be run async for consistent behaviour\n // from the action's point of view\n // i.e. it will definitely not be in a $apply\n win.setTimeout(action);\n } else {\n // No need to unbind this handler as load is only ever called once\n jqLite(win).on('load', action);\n }\n}\n\n//////////////////////////////////////////\n// Functions which are declared directly.\n//////////////////////////////////////////\nvar JQLitePrototype = JQLite.prototype = {\n ready: function(fn) {\n var fired = false;\n\n function trigger() {\n if (fired) return;\n fired = true;\n fn();\n }\n\n // check if document is already loaded\n if (document.readyState === 'complete') {\n setTimeout(trigger);\n } else {\n this.on('DOMContentLoaded', trigger); // works for modern browsers and IE9\n // we can not use jqLite since we are not done loading and jQuery could be loaded later.\n // jshint -W064\n JQLite(window).on('load', trigger); // fallback to window.onload for others\n // jshint +W064\n }\n },\n toString: function() {\n var value = [];\n forEach(this, function(e) { value.push('' + e);});\n return '[' + value.join(', ') + ']';\n },\n\n eq: function(index) {\n return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);\n },\n\n length: 0,\n push: push,\n sort: [].sort,\n splice: [].splice\n};\n\n//////////////////////////////////////////\n// Functions iterating getter/setters.\n// these functions return self on setter and\n// value on get.\n//////////////////////////////////////////\nvar BOOLEAN_ATTR = {};\nforEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {\n BOOLEAN_ATTR[lowercase(value)] = value;\n});\nvar BOOLEAN_ELEMENTS = {};\nforEach('input,select,option,textarea,button,form,details'.split(','), function(value) {\n BOOLEAN_ELEMENTS[value] = true;\n});\nvar ALIASED_ATTR = {\n 'ngMinlength': 'minlength',\n 'ngMaxlength': 'maxlength',\n 'ngMin': 'min',\n 'ngMax': 'max',\n 'ngPattern': 'pattern'\n};\n\nfunction getBooleanAttrName(element, name) {\n // check dom last since we will most likely fail on name\n var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];\n\n // booleanAttr is here twice to minimize DOM access\n return booleanAttr && BOOLEAN_ELEMENTS[nodeName_(element)] && booleanAttr;\n}\n\nfunction getAliasedAttrName(name) {\n return ALIASED_ATTR[name];\n}\n\nforEach({\n data: jqLiteData,\n removeData: jqLiteRemoveData,\n hasData: jqLiteHasData\n}, function(fn, name) {\n JQLite[name] = fn;\n});\n\nforEach({\n data: jqLiteData,\n inheritedData: jqLiteInheritedData,\n\n scope: function(element) {\n // Can't use jqLiteData here directly so we stay compatible with jQuery!\n return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);\n },\n\n isolateScope: function(element) {\n // Can't use jqLiteData here directly so we stay compatible with jQuery!\n return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate');\n },\n\n controller: jqLiteController,\n\n injector: function(element) {\n return jqLiteInheritedData(element, '$injector');\n },\n\n removeAttr: function(element, name) {\n element.removeAttribute(name);\n },\n\n hasClass: jqLiteHasClass,\n\n css: function(element, name, value) {\n name = camelCase(name);\n\n if (isDefined(value)) {\n element.style[name] = value;\n } else {\n return element.style[name];\n }\n },\n\n attr: function(element, name, value) {\n var nodeType = element.nodeType;\n if (nodeType === NODE_TYPE_TEXT || nodeType === NODE_TYPE_ATTRIBUTE || nodeType === NODE_TYPE_COMMENT) {\n return;\n }\n var lowercasedName = lowercase(name);\n if (BOOLEAN_ATTR[lowercasedName]) {\n if (isDefined(value)) {\n if (!!value) {\n element[name] = true;\n element.setAttribute(name, lowercasedName);\n } else {\n element[name] = false;\n element.removeAttribute(lowercasedName);\n }\n } else {\n return (element[name] ||\n (element.attributes.getNamedItem(name) || noop).specified)\n ? lowercasedName\n : undefined;\n }\n } else if (isDefined(value)) {\n element.setAttribute(name, value);\n } else if (element.getAttribute) {\n // the extra argument \"2\" is to get the right thing for a.href in IE, see jQuery code\n // some elements (e.g. Document) don't have get attribute, so return undefined\n var ret = element.getAttribute(name, 2);\n // normalize non-existing attributes to undefined (as jQuery)\n return ret === null ? undefined : ret;\n }\n },\n\n prop: function(element, name, value) {\n if (isDefined(value)) {\n element[name] = value;\n } else {\n return element[name];\n }\n },\n\n text: (function() {\n getText.$dv = '';\n return getText;\n\n function getText(element, value) {\n if (isUndefined(value)) {\n var nodeType = element.nodeType;\n return (nodeType === NODE_TYPE_ELEMENT || nodeType === NODE_TYPE_TEXT) ? element.textContent : '';\n }\n element.textContent = value;\n }\n })(),\n\n val: function(element, value) {\n if (isUndefined(value)) {\n if (element.multiple && nodeName_(element) === 'select') {\n var result = [];\n forEach(element.options, function(option) {\n if (option.selected) {\n result.push(option.value || option.text);\n }\n });\n return result.length === 0 ? null : result;\n }\n return element.value;\n }\n element.value = value;\n },\n\n html: function(element, value) {\n if (isUndefined(value)) {\n return element.innerHTML;\n }\n jqLiteDealoc(element, true);\n element.innerHTML = value;\n },\n\n empty: jqLiteEmpty\n}, function(fn, name) {\n /**\n * Properties: writes return selection, reads return first value\n */\n JQLite.prototype[name] = function(arg1, arg2) {\n var i, key;\n var nodeCount = this.length;\n\n // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it\n // in a way that survives minification.\n // jqLiteEmpty takes no arguments but is a setter.\n if (fn !== jqLiteEmpty &&\n (isUndefined((fn.length == 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2))) {\n if (isObject(arg1)) {\n\n // we are a write, but the object properties are the key/values\n for (i = 0; i < nodeCount; i++) {\n if (fn === jqLiteData) {\n // data() takes the whole object in jQuery\n fn(this[i], arg1);\n } else {\n for (key in arg1) {\n fn(this[i], key, arg1[key]);\n }\n }\n }\n // return self for chaining\n return this;\n } else {\n // we are a read, so read the first child.\n // TODO: do we still need this?\n var value = fn.$dv;\n // Only if we have $dv do we iterate over all, otherwise it is just the first element.\n var jj = (isUndefined(value)) ? Math.min(nodeCount, 1) : nodeCount;\n for (var j = 0; j < jj; j++) {\n var nodeValue = fn(this[j], arg1, arg2);\n value = value ? value + nodeValue : nodeValue;\n }\n return value;\n }\n } else {\n // we are a write, so apply to all children\n for (i = 0; i < nodeCount; i++) {\n fn(this[i], arg1, arg2);\n }\n // return self for chaining\n return this;\n }\n };\n});\n\nfunction createEventHandler(element, events) {\n var eventHandler = function(event, type) {\n // jQuery specific api\n event.isDefaultPrevented = function() {\n return event.defaultPrevented;\n };\n\n var eventFns = events[type || event.type];\n var eventFnsLength = eventFns ? eventFns.length : 0;\n\n if (!eventFnsLength) return;\n\n if (isUndefined(event.immediatePropagationStopped)) {\n var originalStopImmediatePropagation = event.stopImmediatePropagation;\n event.stopImmediatePropagation = function() {\n event.immediatePropagationStopped = true;\n\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n\n if (originalStopImmediatePropagation) {\n originalStopImmediatePropagation.call(event);\n }\n };\n }\n\n event.isImmediatePropagationStopped = function() {\n return event.immediatePropagationStopped === true;\n };\n\n // Some events have special handlers that wrap the real handler\n var handlerWrapper = eventFns.specialHandlerWrapper || defaultHandlerWrapper;\n\n // Copy event handlers in case event handlers array is modified during execution.\n if ((eventFnsLength > 1)) {\n eventFns = shallowCopy(eventFns);\n }\n\n for (var i = 0; i < eventFnsLength; i++) {\n if (!event.isImmediatePropagationStopped()) {\n handlerWrapper(element, event, eventFns[i]);\n }\n }\n };\n\n // TODO: this is a hack for angularMocks/clearDataCache that makes it possible to deregister all\n // events on `element`\n eventHandler.elem = element;\n return eventHandler;\n}\n\nfunction defaultHandlerWrapper(element, event, handler) {\n handler.call(element, event);\n}\n\nfunction specialMouseHandlerWrapper(target, event, handler) {\n // Refer to jQuery's implementation of mouseenter & mouseleave\n // Read about mouseenter and mouseleave:\n // http://www.quirksmode.org/js/events_mouse.html#link8\n var related = event.relatedTarget;\n // For mousenter/leave call the handler if related is outside the target.\n // NB: No relatedTarget if the mouse left/entered the browser window\n if (!related || (related !== target && !jqLiteContains.call(target, related))) {\n handler.call(target, event);\n }\n}\n\n//////////////////////////////////////////\n// Functions iterating traversal.\n// These functions chain results into a single\n// selector.\n//////////////////////////////////////////\nforEach({\n removeData: jqLiteRemoveData,\n\n on: function jqLiteOn(element, type, fn, unsupported) {\n if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');\n\n // Do not add event handlers to non-elements because they will not be cleaned up.\n if (!jqLiteAcceptsData(element)) {\n return;\n }\n\n var expandoStore = jqLiteExpandoStore(element, true);\n var events = expandoStore.events;\n var handle = expandoStore.handle;\n\n if (!handle) {\n handle = expandoStore.handle = createEventHandler(element, events);\n }\n\n // http://jsperf.com/string-indexof-vs-split\n var types = type.indexOf(' ') >= 0 ? type.split(' ') : [type];\n var i = types.length;\n\n var addHandler = function(type, specialHandlerWrapper, noEventListener) {\n var eventFns = events[type];\n\n if (!eventFns) {\n eventFns = events[type] = [];\n eventFns.specialHandlerWrapper = specialHandlerWrapper;\n if (type !== '$destroy' && !noEventListener) {\n addEventListenerFn(element, type, handle);\n }\n }\n\n eventFns.push(fn);\n };\n\n while (i--) {\n type = types[i];\n if (MOUSE_EVENT_MAP[type]) {\n addHandler(MOUSE_EVENT_MAP[type], specialMouseHandlerWrapper);\n addHandler(type, undefined, true);\n } else {\n addHandler(type);\n }\n }\n },\n\n off: jqLiteOff,\n\n one: function(element, type, fn) {\n element = jqLite(element);\n\n //add the listener twice so that when it is called\n //you can remove the original function and still be\n //able to call element.off(ev, fn) normally\n element.on(type, function onFn() {\n element.off(type, fn);\n element.off(type, onFn);\n });\n element.on(type, fn);\n },\n\n replaceWith: function(element, replaceNode) {\n var index, parent = element.parentNode;\n jqLiteDealoc(element);\n forEach(new JQLite(replaceNode), function(node) {\n if (index) {\n parent.insertBefore(node, index.nextSibling);\n } else {\n parent.replaceChild(node, element);\n }\n index = node;\n });\n },\n\n children: function(element) {\n var children = [];\n forEach(element.childNodes, function(element) {\n if (element.nodeType === NODE_TYPE_ELEMENT) {\n children.push(element);\n }\n });\n return children;\n },\n\n contents: function(element) {\n return element.contentDocument || element.childNodes || [];\n },\n\n append: function(element, node) {\n var nodeType = element.nodeType;\n if (nodeType !== NODE_TYPE_ELEMENT && nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT) return;\n\n node = new JQLite(node);\n\n for (var i = 0, ii = node.length; i < ii; i++) {\n var child = node[i];\n element.appendChild(child);\n }\n },\n\n prepend: function(element, node) {\n if (element.nodeType === NODE_TYPE_ELEMENT) {\n var index = element.firstChild;\n forEach(new JQLite(node), function(child) {\n element.insertBefore(child, index);\n });\n }\n },\n\n wrap: function(element, wrapNode) {\n jqLiteWrapNode(element, jqLite(wrapNode).eq(0).clone()[0]);\n },\n\n remove: jqLiteRemove,\n\n detach: function(element) {\n jqLiteRemove(element, true);\n },\n\n after: function(element, newElement) {\n var index = element, parent = element.parentNode;\n newElement = new JQLite(newElement);\n\n for (var i = 0, ii = newElement.length; i < ii; i++) {\n var node = newElement[i];\n parent.insertBefore(node, index.nextSibling);\n index = node;\n }\n },\n\n addClass: jqLiteAddClass,\n removeClass: jqLiteRemoveClass,\n\n toggleClass: function(element, selector, condition) {\n if (selector) {\n forEach(selector.split(' '), function(className) {\n var classCondition = condition;\n if (isUndefined(classCondition)) {\n classCondition = !jqLiteHasClass(element, className);\n }\n (classCondition ? jqLiteAddClass : jqLiteRemoveClass)(element, className);\n });\n }\n },\n\n parent: function(element) {\n var parent = element.parentNode;\n return parent && parent.nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT ? parent : null;\n },\n\n next: function(element) {\n return element.nextElementSibling;\n },\n\n find: function(element, selector) {\n if (element.getElementsByTagName) {\n return element.getElementsByTagName(selector);\n } else {\n return [];\n }\n },\n\n clone: jqLiteClone,\n\n triggerHandler: function(element, event, extraParameters) {\n\n var dummyEvent, eventFnsCopy, handlerArgs;\n var eventName = event.type || event;\n var expandoStore = jqLiteExpandoStore(element);\n var events = expandoStore && expandoStore.events;\n var eventFns = events && events[eventName];\n\n if (eventFns) {\n // Create a dummy event to pass to the handlers\n dummyEvent = {\n preventDefault: function() { this.defaultPrevented = true; },\n isDefaultPrevented: function() { return this.defaultPrevented === true; },\n stopImmediatePropagation: function() { this.immediatePropagationStopped = true; },\n isImmediatePropagationStopped: function() { return this.immediatePropagationStopped === true; },\n stopPropagation: noop,\n type: eventName,\n target: element\n };\n\n // If a custom event was provided then extend our dummy event with it\n if (event.type) {\n dummyEvent = extend(dummyEvent, event);\n }\n\n // Copy event handlers in case event handlers array is modified during execution.\n eventFnsCopy = shallowCopy(eventFns);\n handlerArgs = extraParameters ? [dummyEvent].concat(extraParameters) : [dummyEvent];\n\n forEach(eventFnsCopy, function(fn) {\n if (!dummyEvent.isImmediatePropagationStopped()) {\n fn.apply(element, handlerArgs);\n }\n });\n }\n }\n}, function(fn, name) {\n /**\n * chaining functions\n */\n JQLite.prototype[name] = function(arg1, arg2, arg3) {\n var value;\n\n for (var i = 0, ii = this.length; i < ii; i++) {\n if (isUndefined(value)) {\n value = fn(this[i], arg1, arg2, arg3);\n if (isDefined(value)) {\n // any function which returns a value needs to be wrapped\n value = jqLite(value);\n }\n } else {\n jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3));\n }\n }\n return isDefined(value) ? value : this;\n };\n\n // bind legacy bind/unbind to on/off\n JQLite.prototype.bind = JQLite.prototype.on;\n JQLite.prototype.unbind = JQLite.prototype.off;\n});\n\n\n// Provider for private $$jqLite service\nfunction $$jqLiteProvider() {\n this.$get = function $$jqLite() {\n return extend(JQLite, {\n hasClass: function(node, classes) {\n if (node.attr) node = node[0];\n return jqLiteHasClass(node, classes);\n },\n addClass: function(node, classes) {\n if (node.attr) node = node[0];\n return jqLiteAddClass(node, classes);\n },\n removeClass: function(node, classes) {\n if (node.attr) node = node[0];\n return jqLiteRemoveClass(node, classes);\n }\n });\n };\n}\n\n/**\n * Computes a hash of an 'obj'.\n * Hash of a:\n * string is string\n * number is number as string\n * object is either result of calling $$hashKey function on the object or uniquely generated id,\n * that is also assigned to the $$hashKey property of the object.\n *\n * @param obj\n * @returns {string} hash string such that the same input will have the same hash string.\n * The resulting string key is in 'type:hashKey' format.\n */\nfunction hashKey(obj, nextUidFn) {\n var key = obj && obj.$$hashKey;\n\n if (key) {\n if (typeof key === 'function') {\n key = obj.$$hashKey();\n }\n return key;\n }\n\n var objType = typeof obj;\n if (objType == 'function' || (objType == 'object' && obj !== null)) {\n key = obj.$$hashKey = objType + ':' + (nextUidFn || nextUid)();\n } else {\n key = objType + ':' + obj;\n }\n\n return key;\n}\n\n/**\n * HashMap which can use objects as keys\n */\nfunction HashMap(array, isolatedUid) {\n if (isolatedUid) {\n var uid = 0;\n this.nextUid = function() {\n return ++uid;\n };\n }\n forEach(array, this.put, this);\n}\nHashMap.prototype = {\n /**\n * Store key value pair\n * @param key key to store can be any type\n * @param value value to store can be any type\n */\n put: function(key, value) {\n this[hashKey(key, this.nextUid)] = value;\n },\n\n /**\n * @param key\n * @returns {Object} the value for the key\n */\n get: function(key) {\n return this[hashKey(key, this.nextUid)];\n },\n\n /**\n * Remove the key/value pair\n * @param key\n */\n remove: function(key) {\n var value = this[key = hashKey(key, this.nextUid)];\n delete this[key];\n return value;\n }\n};\n\nvar $$HashMapProvider = [function() {\n this.$get = [function() {\n return HashMap;\n }];\n}];\n\n/**\n * @ngdoc function\n * @module ng\n * @name angular.injector\n * @kind function\n *\n * @description\n * Creates an injector object that can be used for retrieving services as well as for\n * dependency injection (see {@link guide/di dependency injection}).\n *\n * @param {Array.<string|Function>} modules A list of module functions or their aliases. See\n * {@link angular.module}. The `ng` module must be explicitly added.\n * @param {boolean=} [strictDi=false] Whether the injector should be in strict mode, which\n * disallows argument name annotation inference.\n * @returns {injector} Injector object. See {@link auto.$injector $injector}.\n *\n * @example\n * Typical usage\n * ```js\n * // create an injector\n * var $injector = angular.injector(['ng']);\n *\n * // use the injector to kick off your application\n * // use the type inference to auto inject arguments, or use implicit injection\n * $injector.invoke(function($rootScope, $compile, $document) {\n * $compile($document)($rootScope);\n * $rootScope.$digest();\n * });\n * ```\n *\n * Sometimes you want to get access to the injector of a currently running Angular app\n * from outside Angular. Perhaps, you want to inject and compile some markup after the\n * application has been bootstrapped. You can do this using the extra `injector()` added\n * to JQuery/jqLite elements. See {@link angular.element}.\n *\n * *This is fairly rare but could be the case if a third party library is injecting the\n * markup.*\n *\n * In the following example a new block of HTML containing a `ng-controller`\n * directive is added to the end of the document body by JQuery. We then compile and link\n * it into the current AngularJS scope.\n *\n * ```js\n * var $div = $('<div ng-controller=\"MyCtrl\">{{content.label}}</div>');\n * $(document.body).append($div);\n *\n * angular.element(document).injector().invoke(function($compile) {\n * var scope = angular.element($div).scope();\n * $compile($div)(scope);\n * });\n * ```\n */\n\n\n/**\n * @ngdoc module\n * @name auto\n * @description\n *\n * Implicit module which gets automatically added to each {@link auto.$injector $injector}.\n */\n\nvar FN_ARGS = /^[^\\(]*\\(\\s*([^\\)]*)\\)/m;\nvar FN_ARG_SPLIT = /,/;\nvar FN_ARG = /^\\s*(_?)(\\S+?)\\1\\s*$/;\nvar STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nvar $injectorMinErr = minErr('$injector');\n\nfunction anonFn(fn) {\n // For anonymous functions, showing at the very least the function signature can help in\n // debugging.\n var fnText = fn.toString().replace(STRIP_COMMENTS, ''),\n args = fnText.match(FN_ARGS);\n if (args) {\n return 'function(' + (args[1] || '').replace(/[\\s\\r\\n]+/, ' ') + ')';\n }\n return 'fn';\n}\n\nfunction annotate(fn, strictDi, name) {\n var $inject,\n fnText,\n argDecl,\n last;\n\n if (typeof fn === 'function') {\n if (!($inject = fn.$inject)) {\n $inject = [];\n if (fn.length) {\n if (strictDi) {\n if (!isString(name) || !name) {\n name = fn.name || anonFn(fn);\n }\n throw $injectorMinErr('strictdi',\n '{0} is not using explicit annotation and cannot be invoked in strict mode', name);\n }\n fnText = fn.toString().replace(STRIP_COMMENTS, '');\n argDecl = fnText.match(FN_ARGS);\n forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg) {\n arg.replace(FN_ARG, function(all, underscore, name) {\n $inject.push(name);\n });\n });\n }\n fn.$inject = $inject;\n }\n } else if (isArray(fn)) {\n last = fn.length - 1;\n assertArgFn(fn[last], 'fn');\n $inject = fn.slice(0, last);\n } else {\n assertArgFn(fn, 'fn', true);\n }\n return $inject;\n}\n\n///////////////////////////////////////\n\n/**\n * @ngdoc service\n * @name $injector\n *\n * @description\n *\n * `$injector` is used to retrieve object instances as defined by\n * {@link auto.$provide provider}, instantiate types, invoke methods,\n * and load modules.\n *\n * The following always holds true:\n *\n * ```js\n * var $injector = angular.injector();\n * expect($injector.get('$injector')).toBe($injector);\n * expect($injector.invoke(function($injector) {\n * return $injector;\n * })).toBe($injector);\n * ```\n *\n * # Injection Function Annotation\n *\n * JavaScript does not have annotations, and annotations are needed for dependency injection. The\n * following are all valid ways of annotating function with injection arguments and are equivalent.\n *\n * ```js\n * // inferred (only works if code not minified/obfuscated)\n * $injector.invoke(function(serviceA){});\n *\n * // annotated\n * function explicit(serviceA) {};\n * explicit.$inject = ['serviceA'];\n * $injector.invoke(explicit);\n *\n * // inline\n * $injector.invoke(['serviceA', function(serviceA){}]);\n * ```\n *\n * ## Inference\n *\n * In JavaScript calling `toString()` on a function returns the function definition. The definition\n * can then be parsed and the function arguments can be extracted. This method of discovering\n * annotations is disallowed when the injector is in strict mode.\n * *NOTE:* This does not work with minification, and obfuscation tools since these tools change the\n * argument names.\n *\n * ## `$inject` Annotation\n * By adding an `$inject` property onto a function the injection parameters can be specified.\n *\n * ## Inline\n * As an array of injection names, where the last item in the array is the function to call.\n */\n\n/**\n * @ngdoc method\n * @name $injector#get\n *\n * @description\n * Return an instance of the service.\n *\n * @param {string} name The name of the instance to retrieve.\n * @param {string=} caller An optional string to provide the origin of the function call for error messages.\n * @return {*} The instance.\n */\n\n/**\n * @ngdoc method\n * @name $injector#invoke\n *\n * @description\n * Invoke the method and supply the method arguments from the `$injector`.\n *\n * @param {Function|Array.<string|Function>} fn The injectable function to invoke. Function parameters are\n * injected according to the {@link guide/di $inject Annotation} rules.\n * @param {Object=} self The `this` for the invoked method.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n * object first, before the `$injector` is consulted.\n * @returns {*} the value returned by the invoked `fn` function.\n */\n\n/**\n * @ngdoc method\n * @name $injector#has\n *\n * @description\n * Allows the user to query if the particular service exists.\n *\n * @param {string} name Name of the service to query.\n * @returns {boolean} `true` if injector has given service.\n */\n\n/**\n * @ngdoc method\n * @name $injector#instantiate\n * @description\n * Create a new instance of JS type. The method takes a constructor function, invokes the new\n * operator, and supplies all of the arguments to the constructor function as specified by the\n * constructor annotation.\n *\n * @param {Function} Type Annotated constructor function.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n * object first, before the `$injector` is consulted.\n * @returns {Object} new instance of `Type`.\n */\n\n/**\n * @ngdoc method\n * @name $injector#annotate\n *\n * @description\n * Returns an array of service names which the function is requesting for injection. This API is\n * used by the injector to determine which services need to be injected into the function when the\n * function is invoked. There are three ways in which the function can be annotated with the needed\n * dependencies.\n *\n * # Argument names\n *\n * The simplest form is to extract the dependencies from the arguments of the function. This is done\n * by converting the function into a string using `toString()` method and extracting the argument\n * names.\n * ```js\n * // Given\n * function MyController($scope, $route) {\n * // ...\n * }\n *\n * // Then\n * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * ```\n *\n * You can disallow this method by using strict injection mode.\n *\n * This method does not work with code minification / obfuscation. For this reason the following\n * annotation strategies are supported.\n *\n * # The `$inject` property\n *\n * If a function has an `$inject` property and its value is an array of strings, then the strings\n * represent names of services to be injected into the function.\n * ```js\n * // Given\n * var MyController = function(obfuscatedScope, obfuscatedRoute) {\n * // ...\n * }\n * // Define function dependencies\n * MyController['$inject'] = ['$scope', '$route'];\n *\n * // Then\n * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * ```\n *\n * # The array notation\n *\n * It is often desirable to inline Injected functions and that's when setting the `$inject` property\n * is very inconvenient. In these situations using the array notation to specify the dependencies in\n * a way that survives minification is a better choice:\n *\n * ```js\n * // We wish to write this (not minification / obfuscation safe)\n * injector.invoke(function($compile, $rootScope) {\n * // ...\n * });\n *\n * // We are forced to write break inlining\n * var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {\n * // ...\n * };\n * tmpFn.$inject = ['$compile', '$rootScope'];\n * injector.invoke(tmpFn);\n *\n * // To better support inline function the inline annotation is supported\n * injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {\n * // ...\n * }]);\n *\n * // Therefore\n * expect(injector.annotate(\n * ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])\n * ).toEqual(['$compile', '$rootScope']);\n * ```\n *\n * @param {Function|Array.<string|Function>} fn Function for which dependent service names need to\n * be retrieved as described above.\n *\n * @param {boolean=} [strictDi=false] Disallow argument name annotation inference.\n *\n * @returns {Array.<string>} The names of the services which the function requires.\n */\n\n\n\n\n/**\n * @ngdoc service\n * @name $provide\n *\n * @description\n *\n * The {@link auto.$provide $provide} service has a number of methods for registering components\n * with the {@link auto.$injector $injector}. Many of these functions are also exposed on\n * {@link angular.Module}.\n *\n * An Angular **service** is a singleton object created by a **service factory**. These **service\n * factories** are functions which, in turn, are created by a **service provider**.\n * The **service providers** are constructor functions. When instantiated they must contain a\n * property called `$get`, which holds the **service factory** function.\n *\n * When you request a service, the {@link auto.$injector $injector} is responsible for finding the\n * correct **service provider**, instantiating it and then calling its `$get` **service factory**\n * function to get the instance of the **service**.\n *\n * Often services have no configuration options and there is no need to add methods to the service\n * provider. The provider will be no more than a constructor function with a `$get` property. For\n * these cases the {@link auto.$provide $provide} service has additional helper methods to register\n * services without specifying a provider.\n *\n * * {@link auto.$provide#provider provider(provider)} - registers a **service provider** with the\n * {@link auto.$injector $injector}\n * * {@link auto.$provide#constant constant(obj)} - registers a value/object that can be accessed by\n * providers and services.\n * * {@link auto.$provide#value value(obj)} - registers a value/object that can only be accessed by\n * services, not providers.\n * * {@link auto.$provide#factory factory(fn)} - registers a service **factory function**, `fn`,\n * that will be wrapped in a **service provider** object, whose `$get` property will contain the\n * given factory function.\n * * {@link auto.$provide#service service(class)} - registers a **constructor function**, `class`\n * that will be wrapped in a **service provider** object, whose `$get` property will instantiate\n * a new object using the given constructor function.\n *\n * See the individual methods for more information and examples.\n */\n\n/**\n * @ngdoc method\n * @name $provide#provider\n * @description\n *\n * Register a **provider function** with the {@link auto.$injector $injector}. Provider functions\n * are constructor functions, whose instances are responsible for \"providing\" a factory for a\n * service.\n *\n * Service provider names start with the name of the service they provide followed by `Provider`.\n * For example, the {@link ng.$log $log} service has a provider called\n * {@link ng.$logProvider $logProvider}.\n *\n * Service provider objects can have additional methods which allow configuration of the provider\n * and its service. Importantly, you can configure what kind of service is created by the `$get`\n * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a\n * method {@link ng.$logProvider#debugEnabled debugEnabled}\n * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the\n * console or not.\n *\n * @param {string} name The name of the instance. NOTE: the provider will be available under `name +\n 'Provider'` key.\n * @param {(Object|function())} provider If the provider is:\n *\n * - `Object`: then it should have a `$get` method. The `$get` method will be invoked using\n * {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created.\n * - `Constructor`: a new instance of the provider will be created using\n * {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`.\n *\n * @returns {Object} registered provider instance\n\n * @example\n *\n * The following example shows how to create a simple event tracking service and register it using\n * {@link auto.$provide#provider $provide.provider()}.\n *\n * ```js\n * // Define the eventTracker provider\n * function EventTrackerProvider() {\n * var trackingUrl = '/track';\n *\n * // A provider method for configuring where the tracked events should been saved\n * this.setTrackingUrl = function(url) {\n * trackingUrl = url;\n * };\n *\n * // The service factory function\n * this.$get = ['$http', function($http) {\n * var trackedEvents = {};\n * return {\n * // Call this to track an event\n * event: function(event) {\n * var count = trackedEvents[event] || 0;\n * count += 1;\n * trackedEvents[event] = count;\n * return count;\n * },\n * // Call this to save the tracked events to the trackingUrl\n * save: function() {\n * $http.post(trackingUrl, trackedEvents);\n * }\n * };\n * }];\n * }\n *\n * describe('eventTracker', function() {\n * var postSpy;\n *\n * beforeEach(module(function($provide) {\n * // Register the eventTracker provider\n * $provide.provider('eventTracker', EventTrackerProvider);\n * }));\n *\n * beforeEach(module(function(eventTrackerProvider) {\n * // Configure eventTracker provider\n * eventTrackerProvider.setTrackingUrl('/custom-track');\n * }));\n *\n * it('tracks events', inject(function(eventTracker) {\n * expect(eventTracker.event('login')).toEqual(1);\n * expect(eventTracker.event('login')).toEqual(2);\n * }));\n *\n * it('saves to the tracking url', inject(function(eventTracker, $http) {\n * postSpy = spyOn($http, 'post');\n * eventTracker.event('login');\n * eventTracker.save();\n * expect(postSpy).toHaveBeenCalled();\n * expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track');\n * expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track');\n * expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 });\n * }));\n * });\n * ```\n */\n\n/**\n * @ngdoc method\n * @name $provide#factory\n * @description\n *\n * Register a **service factory**, which will be called to return the service instance.\n * This is short for registering a service where its provider consists of only a `$get` property,\n * which is the given service factory function.\n * You should use {@link auto.$provide#factory $provide.factory(getFn)} if you do not need to\n * configure your service in a provider.\n *\n * @param {string} name The name of the instance.\n * @param {Function|Array.<string|Function>} $getFn The injectable $getFn for the instance creation.\n * Internally this is a short hand for `$provide.provider(name, {$get: $getFn})`.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service\n * ```js\n * $provide.factory('ping', ['$http', function($http) {\n * return function ping() {\n * return $http.send('/ping');\n * };\n * }]);\n * ```\n * You would then inject and use this service like this:\n * ```js\n * someModule.controller('Ctrl', ['ping', function(ping) {\n * ping();\n * }]);\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#service\n * @description\n *\n * Register a **service constructor**, which will be invoked with `new` to create the service\n * instance.\n * This is short for registering a service where its provider's `$get` property is a factory\n * function that returns an instance instantiated by the injector from the service constructor\n * function.\n *\n * Internally it looks a bit like this:\n *\n * ```\n * {\n * $get: function() {\n * return $injector.instantiate(constructor);\n * }\n * }\n * ```\n *\n *\n * You should use {@link auto.$provide#service $provide.service(class)} if you define your service\n * as a type/class.\n *\n * @param {string} name The name of the instance.\n * @param {Function|Array.<string|Function>} constructor An injectable class (constructor function)\n * that will be instantiated.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service using\n * {@link auto.$provide#service $provide.service(class)}.\n * ```js\n * var Ping = function($http) {\n * this.$http = $http;\n * };\n *\n * Ping.$inject = ['$http'];\n *\n * Ping.prototype.send = function() {\n * return this.$http.get('/ping');\n * };\n * $provide.service('ping', Ping);\n * ```\n * You would then inject and use this service like this:\n * ```js\n * someModule.controller('Ctrl', ['ping', function(ping) {\n * ping.send();\n * }]);\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#value\n * @description\n *\n * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a\n * number, an array, an object or a function. This is short for registering a service where its\n * provider's `$get` property is a factory function that takes no arguments and returns the **value\n * service**. That also means it is not possible to inject other services into a value service.\n *\n * Value services are similar to constant services, except that they cannot be injected into a\n * module configuration function (see {@link angular.Module#config}) but they can be overridden by\n * an Angular {@link auto.$provide#decorator decorator}.\n *\n * @param {string} name The name of the instance.\n * @param {*} value The value.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here are some examples of creating value services.\n * ```js\n * $provide.value('ADMIN_USER', 'admin');\n *\n * $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 });\n *\n * $provide.value('halfOf', function(value) {\n * return value / 2;\n * });\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#constant\n * @description\n *\n * Register a **constant service** with the {@link auto.$injector $injector}, such as a string,\n * a number, an array, an object or a function. Like the {@link auto.$provide#value value}, it is not\n * possible to inject other services into a constant.\n *\n * But unlike {@link auto.$provide#value value}, a constant can be\n * injected into a module configuration function (see {@link angular.Module#config}) and it cannot\n * be overridden by an Angular {@link auto.$provide#decorator decorator}.\n *\n * @param {string} name The name of the constant.\n * @param {*} value The constant value.\n * @returns {Object} registered instance\n *\n * @example\n * Here a some examples of creating constants:\n * ```js\n * $provide.constant('SHARD_HEIGHT', 306);\n *\n * $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']);\n *\n * $provide.constant('double', function(value) {\n * return value * 2;\n * });\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#decorator\n * @description\n *\n * Register a **service decorator** with the {@link auto.$injector $injector}. A service decorator\n * intercepts the creation of a service, allowing it to override or modify the behavior of the\n * service. The object returned by the decorator may be the original service, or a new service\n * object which replaces or wraps and delegates to the original service.\n *\n * @param {string} name The name of the service to decorate.\n * @param {Function|Array.<string|Function>} decorator This function will be invoked when the service needs to be\n * instantiated and should return the decorated service instance. The function is called using\n * the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable.\n * Local injection arguments:\n *\n * * `$delegate` - The original service instance, which can be monkey patched, configured,\n * decorated or delegated to.\n *\n * @example\n * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting\n * calls to {@link ng.$log#error $log.warn()}.\n * ```js\n * $provide.decorator('$log', ['$delegate', function($delegate) {\n * $delegate.warn = $delegate.error;\n * return $delegate;\n * }]);\n * ```\n */\n\n\nfunction createInjector(modulesToLoad, strictDi) {\n strictDi = (strictDi === true);\n var INSTANTIATING = {},\n providerSuffix = 'Provider',\n path = [],\n loadedModules = new HashMap([], true),\n providerCache = {\n $provide: {\n provider: supportObject(provider),\n factory: supportObject(factory),\n service: supportObject(service),\n value: supportObject(value),\n constant: supportObject(constant),\n decorator: decorator\n }\n },\n providerInjector = (providerCache.$injector =\n createInternalInjector(providerCache, function(serviceName, caller) {\n if (angular.isString(caller)) {\n path.push(caller);\n }\n throw $injectorMinErr('unpr', \"Unknown provider: {0}\", path.join(' <- '));\n })),\n instanceCache = {},\n instanceInjector = (instanceCache.$injector =\n createInternalInjector(instanceCache, function(serviceName, caller) {\n var provider = providerInjector.get(serviceName + providerSuffix, caller);\n return instanceInjector.invoke(provider.$get, provider, undefined, serviceName);\n }));\n\n\n forEach(loadModules(modulesToLoad), function(fn) { if (fn) instanceInjector.invoke(fn); });\n\n return instanceInjector;\n\n ////////////////////////////////////\n // $provider\n ////////////////////////////////////\n\n function supportObject(delegate) {\n return function(key, value) {\n if (isObject(key)) {\n forEach(key, reverseParams(delegate));\n } else {\n return delegate(key, value);\n }\n };\n }\n\n function provider(name, provider_) {\n assertNotHasOwnProperty(name, 'service');\n if (isFunction(provider_) || isArray(provider_)) {\n provider_ = providerInjector.instantiate(provider_);\n }\n if (!provider_.$get) {\n throw $injectorMinErr('pget', \"Provider '{0}' must define $get factory method.\", name);\n }\n return providerCache[name + providerSuffix] = provider_;\n }\n\n function enforceReturnValue(name, factory) {\n return function enforcedReturnValue() {\n var result = instanceInjector.invoke(factory, this);\n if (isUndefined(result)) {\n throw $injectorMinErr('undef', \"Provider '{0}' must return a value from $get factory method.\", name);\n }\n return result;\n };\n }\n\n function factory(name, factoryFn, enforce) {\n return provider(name, {\n $get: enforce !== false ? enforceReturnValue(name, factoryFn) : factoryFn\n });\n }\n\n function service(name, constructor) {\n return factory(name, ['$injector', function($injector) {\n return $injector.instantiate(constructor);\n }]);\n }\n\n function value(name, val) { return factory(name, valueFn(val), false); }\n\n function constant(name, value) {\n assertNotHasOwnProperty(name, 'constant');\n providerCache[name] = value;\n instanceCache[name] = value;\n }\n\n function decorator(serviceName, decorFn) {\n var origProvider = providerInjector.get(serviceName + providerSuffix),\n orig$get = origProvider.$get;\n\n origProvider.$get = function() {\n var origInstance = instanceInjector.invoke(orig$get, origProvider);\n return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});\n };\n }\n\n ////////////////////////////////////\n // Module Loading\n ////////////////////////////////////\n function loadModules(modulesToLoad) {\n assertArg(isUndefined(modulesToLoad) || isArray(modulesToLoad), 'modulesToLoad', 'not an array');\n var runBlocks = [], moduleFn;\n forEach(modulesToLoad, function(module) {\n if (loadedModules.get(module)) return;\n loadedModules.put(module, true);\n\n function runInvokeQueue(queue) {\n var i, ii;\n for (i = 0, ii = queue.length; i < ii; i++) {\n var invokeArgs = queue[i],\n provider = providerInjector.get(invokeArgs[0]);\n\n provider[invokeArgs[1]].apply(provider, invokeArgs[2]);\n }\n }\n\n try {\n if (isString(module)) {\n moduleFn = angularModule(module);\n runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);\n runInvokeQueue(moduleFn._invokeQueue);\n runInvokeQueue(moduleFn._configBlocks);\n } else if (isFunction(module)) {\n runBlocks.push(providerInjector.invoke(module));\n } else if (isArray(module)) {\n runBlocks.push(providerInjector.invoke(module));\n } else {\n assertArgFn(module, 'module');\n }\n } catch (e) {\n if (isArray(module)) {\n module = module[module.length - 1];\n }\n if (e.message && e.stack && e.stack.indexOf(e.message) == -1) {\n // Safari & FF's stack traces don't contain error.message content\n // unlike those of Chrome and IE\n // So if stack doesn't contain message, we create a new string that contains both.\n // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here.\n /* jshint -W022 */\n e = e.message + '\\n' + e.stack;\n }\n throw $injectorMinErr('modulerr', \"Failed to instantiate module {0} due to:\\n{1}\",\n module, e.stack || e.message || e);\n }\n });\n return runBlocks;\n }\n\n ////////////////////////////////////\n // internal Injector\n ////////////////////////////////////\n\n function createInternalInjector(cache, factory) {\n\n function getService(serviceName, caller) {\n if (cache.hasOwnProperty(serviceName)) {\n if (cache[serviceName] === INSTANTIATING) {\n throw $injectorMinErr('cdep', 'Circular dependency found: {0}',\n serviceName + ' <- ' + path.join(' <- '));\n }\n return cache[serviceName];\n } else {\n try {\n path.unshift(serviceName);\n cache[serviceName] = INSTANTIATING;\n return cache[serviceName] = factory(serviceName, caller);\n } catch (err) {\n if (cache[serviceName] === INSTANTIATING) {\n delete cache[serviceName];\n }\n throw err;\n } finally {\n path.shift();\n }\n }\n }\n\n function invoke(fn, self, locals, serviceName) {\n if (typeof locals === 'string') {\n serviceName = locals;\n locals = null;\n }\n\n var args = [],\n $inject = createInjector.$$annotate(fn, strictDi, serviceName),\n length, i,\n key;\n\n for (i = 0, length = $inject.length; i < length; i++) {\n key = $inject[i];\n if (typeof key !== 'string') {\n throw $injectorMinErr('itkn',\n 'Incorrect injection token! Expected service name as string, got {0}', key);\n }\n args.push(\n locals && locals.hasOwnProperty(key)\n ? locals[key]\n : getService(key, serviceName)\n );\n }\n if (isArray(fn)) {\n fn = fn[length];\n }\n\n // http://jsperf.com/angularjs-invoke-apply-vs-switch\n // #5388\n return fn.apply(self, args);\n }\n\n function instantiate(Type, locals, serviceName) {\n // Check if Type is annotated and use just the given function at n-1 as parameter\n // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);\n // Object creation: http://jsperf.com/create-constructor/2\n var instance = Object.create((isArray(Type) ? Type[Type.length - 1] : Type).prototype || null);\n var returnedValue = invoke(Type, instance, locals, serviceName);\n\n return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance;\n }\n\n return {\n invoke: invoke,\n instantiate: instantiate,\n get: getService,\n annotate: createInjector.$$annotate,\n has: function(name) {\n return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name);\n }\n };\n }\n}\n\ncreateInjector.$$annotate = annotate;\n\n/**\n * @ngdoc provider\n * @name $anchorScrollProvider\n *\n * @description\n * Use `$anchorScrollProvider` to disable automatic scrolling whenever\n * {@link ng.$location#hash $location.hash()} changes.\n */\nfunction $AnchorScrollProvider() {\n\n var autoScrollingEnabled = true;\n\n /**\n * @ngdoc method\n * @name $anchorScrollProvider#disableAutoScrolling\n *\n * @description\n * By default, {@link ng.$anchorScroll $anchorScroll()} will automatically detect changes to\n * {@link ng.$location#hash $location.hash()} and scroll to the element matching the new hash.<br />\n * Use this method to disable automatic scrolling.\n *\n * If automatic scrolling is disabled, one must explicitly call\n * {@link ng.$anchorScroll $anchorScroll()} in order to scroll to the element related to the\n * current hash.\n */\n this.disableAutoScrolling = function() {\n autoScrollingEnabled = false;\n };\n\n /**\n * @ngdoc service\n * @name $anchorScroll\n * @kind function\n * @requires $window\n * @requires $location\n * @requires $rootScope\n *\n * @description\n * When called, it scrolls to the element related to the specified `hash` or (if omitted) to the\n * current value of {@link ng.$location#hash $location.hash()}, according to the rules specified\n * in the\n * [HTML5 spec](http://www.w3.org/html/wg/drafts/html/master/browsers.html#an-indicated-part-of-the-document).\n *\n * It also watches the {@link ng.$location#hash $location.hash()} and automatically scrolls to\n * match any anchor whenever it changes. This can be disabled by calling\n * {@link ng.$anchorScrollProvider#disableAutoScrolling $anchorScrollProvider.disableAutoScrolling()}.\n *\n * Additionally, you can use its {@link ng.$anchorScroll#yOffset yOffset} property to specify a\n * vertical scroll-offset (either fixed or dynamic).\n *\n * @param {string=} hash The hash specifying the element to scroll to. If omitted, the value of\n * {@link ng.$location#hash $location.hash()} will be used.\n *\n * @property {(number|function|jqLite)} yOffset\n * If set, specifies a vertical scroll-offset. This is often useful when there are fixed\n * positioned elements at the top of the page, such as navbars, headers etc.\n *\n * `yOffset` can be specified in various ways:\n * - **number**: A fixed number of pixels to be used as offset.<br /><br />\n * - **function**: A getter function called everytime `$anchorScroll()` is executed. Must return\n * a number representing the offset (in pixels).<br /><br />\n * - **jqLite**: A jqLite/jQuery element to be used for specifying the offset. The distance from\n * the top of the page to the element's bottom will be used as offset.<br />\n * **Note**: The element will be taken into account only as long as its `position` is set to\n * `fixed`. This option is useful, when dealing with responsive navbars/headers that adjust\n * their height and/or positioning according to the viewport's size.\n *\n * <br />\n * <div class=\"alert alert-warning\">\n * In order for `yOffset` to work properly, scrolling should take place on the document's root and\n * not some child element.\n * </div>\n *\n * @example\n <example module=\"anchorScrollExample\">\n <file name=\"index.html\">\n <div id=\"scrollArea\" ng-controller=\"ScrollController\">\n <a ng-click=\"gotoBottom()\">Go to bottom</a>\n <a id=\"bottom\"></a> You're at the bottom!\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('anchorScrollExample', [])\n .controller('ScrollController', ['$scope', '$location', '$anchorScroll',\n function ($scope, $location, $anchorScroll) {\n $scope.gotoBottom = function() {\n // set the location.hash to the id of\n // the element you wish to scroll to.\n $location.hash('bottom');\n\n // call $anchorScroll()\n $anchorScroll();\n };\n }]);\n </file>\n <file name=\"style.css\">\n #scrollArea {\n height: 280px;\n overflow: auto;\n }\n\n #bottom {\n display: block;\n margin-top: 2000px;\n }\n </file>\n </example>\n *\n * <hr />\n * The example below illustrates the use of a vertical scroll-offset (specified as a fixed value).\n * See {@link ng.$anchorScroll#yOffset $anchorScroll.yOffset} for more details.\n *\n * @example\n <example module=\"anchorScrollOffsetExample\">\n <file name=\"index.html\">\n <div class=\"fixed-header\" ng-controller=\"headerCtrl\">\n <a href=\"\" ng-click=\"gotoAnchor(x)\" ng-repeat=\"x in [1,2,3,4,5]\">\n Go to anchor {{x}}\n </a>\n </div>\n <div id=\"anchor{{x}}\" class=\"anchor\" ng-repeat=\"x in [1,2,3,4,5]\">\n Anchor {{x}} of 5\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('anchorScrollOffsetExample', [])\n .run(['$anchorScroll', function($anchorScroll) {\n $anchorScroll.yOffset = 50; // always scroll by 50 extra pixels\n }])\n .controller('headerCtrl', ['$anchorScroll', '$location', '$scope',\n function ($anchorScroll, $location, $scope) {\n $scope.gotoAnchor = function(x) {\n var newHash = 'anchor' + x;\n if ($location.hash() !== newHash) {\n // set the $location.hash to `newHash` and\n // $anchorScroll will automatically scroll to it\n $location.hash('anchor' + x);\n } else {\n // call $anchorScroll() explicitly,\n // since $location.hash hasn't changed\n $anchorScroll();\n }\n };\n }\n ]);\n </file>\n <file name=\"style.css\">\n body {\n padding-top: 50px;\n }\n\n .anchor {\n border: 2px dashed DarkOrchid;\n padding: 10px 10px 200px 10px;\n }\n\n .fixed-header {\n background-color: rgba(0, 0, 0, 0.2);\n height: 50px;\n position: fixed;\n top: 0; left: 0; right: 0;\n }\n\n .fixed-header > a {\n display: inline-block;\n margin: 5px 15px;\n }\n </file>\n </example>\n */\n this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {\n var document = $window.document;\n\n // Helper function to get first anchor from a NodeList\n // (using `Array#some()` instead of `angular#forEach()` since it's more performant\n // and working in all supported browsers.)\n function getFirstAnchor(list) {\n var result = null;\n Array.prototype.some.call(list, function(element) {\n if (nodeName_(element) === 'a') {\n result = element;\n return true;\n }\n });\n return result;\n }\n\n function getYOffset() {\n\n var offset = scroll.yOffset;\n\n if (isFunction(offset)) {\n offset = offset();\n } else if (isElement(offset)) {\n var elem = offset[0];\n var style = $window.getComputedStyle(elem);\n if (style.position !== 'fixed') {\n offset = 0;\n } else {\n offset = elem.getBoundingClientRect().bottom;\n }\n } else if (!isNumber(offset)) {\n offset = 0;\n }\n\n return offset;\n }\n\n function scrollTo(elem) {\n if (elem) {\n elem.scrollIntoView();\n\n var offset = getYOffset();\n\n if (offset) {\n // `offset` is the number of pixels we should scroll UP in order to align `elem` properly.\n // This is true ONLY if the call to `elem.scrollIntoView()` initially aligns `elem` at the\n // top of the viewport.\n //\n // IF the number of pixels from the top of `elem` to the end of the page's content is less\n // than the height of the viewport, then `elem.scrollIntoView()` will align the `elem` some\n // way down the page.\n //\n // This is often the case for elements near the bottom of the page.\n //\n // In such cases we do not need to scroll the whole `offset` up, just the difference between\n // the top of the element and the offset, which is enough to align the top of `elem` at the\n // desired position.\n var elemTop = elem.getBoundingClientRect().top;\n $window.scrollBy(0, elemTop - offset);\n }\n } else {\n $window.scrollTo(0, 0);\n }\n }\n\n function scroll(hash) {\n hash = isString(hash) ? hash : $location.hash();\n var elm;\n\n // empty hash, scroll to the top of the page\n if (!hash) scrollTo(null);\n\n // element with given id\n else if ((elm = document.getElementById(hash))) scrollTo(elm);\n\n // first anchor with given name :-D\n else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) scrollTo(elm);\n\n // no element and hash == 'top', scroll to the top of the page\n else if (hash === 'top') scrollTo(null);\n }\n\n // does not scroll when user clicks on anchor link that is currently on\n // (no url change, no $location.hash() change), browser native does scroll\n if (autoScrollingEnabled) {\n $rootScope.$watch(function autoScrollWatch() {return $location.hash();},\n function autoScrollWatchAction(newVal, oldVal) {\n // skip the initial scroll if $location.hash is empty\n if (newVal === oldVal && newVal === '') return;\n\n jqLiteDocumentLoaded(function() {\n $rootScope.$evalAsync(scroll);\n });\n });\n }\n\n return scroll;\n }];\n}\n\nvar $animateMinErr = minErr('$animate');\nvar ELEMENT_NODE = 1;\nvar NG_ANIMATE_CLASSNAME = 'ng-animate';\n\nfunction mergeClasses(a,b) {\n if (!a && !b) return '';\n if (!a) return b;\n if (!b) return a;\n if (isArray(a)) a = a.join(' ');\n if (isArray(b)) b = b.join(' ');\n return a + ' ' + b;\n}\n\nfunction extractElementNode(element) {\n for (var i = 0; i < element.length; i++) {\n var elm = element[i];\n if (elm.nodeType === ELEMENT_NODE) {\n return elm;\n }\n }\n}\n\nfunction splitClasses(classes) {\n if (isString(classes)) {\n classes = classes.split(' ');\n }\n\n // Use createMap() to prevent class assumptions involving property names in\n // Object.prototype\n var obj = createMap();\n forEach(classes, function(klass) {\n // sometimes the split leaves empty string values\n // incase extra spaces were applied to the options\n if (klass.length) {\n obj[klass] = true;\n }\n });\n return obj;\n}\n\n// if any other type of options value besides an Object value is\n// passed into the $animate.method() animation then this helper code\n// will be run which will ignore it. While this patch is not the\n// greatest solution to this, a lot of existing plugins depend on\n// $animate to either call the callback (< 1.2) or return a promise\n// that can be changed. This helper function ensures that the options\n// are wiped clean incase a callback function is provided.\nfunction prepareAnimateOptions(options) {\n return isObject(options)\n ? options\n : {};\n}\n\nvar $$CoreAnimateJsProvider = function() {\n this.$get = function() {};\n};\n\n// this is prefixed with Core since it conflicts with\n// the animateQueueProvider defined in ngAnimate/animateQueue.js\nvar $$CoreAnimateQueueProvider = function() {\n var postDigestQueue = new HashMap();\n var postDigestElements = [];\n\n this.$get = ['$$AnimateRunner', '$rootScope',\n function($$AnimateRunner, $rootScope) {\n return {\n enabled: noop,\n on: noop,\n off: noop,\n pin: noop,\n\n push: function(element, event, options, domOperation) {\n domOperation && domOperation();\n\n options = options || {};\n options.from && element.css(options.from);\n options.to && element.css(options.to);\n\n if (options.addClass || options.removeClass) {\n addRemoveClassesPostDigest(element, options.addClass, options.removeClass);\n }\n\n var runner = new $$AnimateRunner(); // jshint ignore:line\n\n // since there are no animations to run the runner needs to be\n // notified that the animation call is complete.\n runner.complete();\n return runner;\n }\n };\n\n\n function updateData(data, classes, value) {\n var changed = false;\n if (classes) {\n classes = isString(classes) ? classes.split(' ') :\n isArray(classes) ? classes : [];\n forEach(classes, function(className) {\n if (className) {\n changed = true;\n data[className] = value;\n }\n });\n }\n return changed;\n }\n\n function handleCSSClassChanges() {\n forEach(postDigestElements, function(element) {\n var data = postDigestQueue.get(element);\n if (data) {\n var existing = splitClasses(element.attr('class'));\n var toAdd = '';\n var toRemove = '';\n forEach(data, function(status, className) {\n var hasClass = !!existing[className];\n if (status !== hasClass) {\n if (status) {\n toAdd += (toAdd.length ? ' ' : '') + className;\n } else {\n toRemove += (toRemove.length ? ' ' : '') + className;\n }\n }\n });\n\n forEach(element, function(elm) {\n toAdd && jqLiteAddClass(elm, toAdd);\n toRemove && jqLiteRemoveClass(elm, toRemove);\n });\n postDigestQueue.remove(element);\n }\n });\n postDigestElements.length = 0;\n }\n\n\n function addRemoveClassesPostDigest(element, add, remove) {\n var data = postDigestQueue.get(element) || {};\n\n var classesAdded = updateData(data, add, true);\n var classesRemoved = updateData(data, remove, false);\n\n if (classesAdded || classesRemoved) {\n\n postDigestQueue.put(element, data);\n postDigestElements.push(element);\n\n if (postDigestElements.length === 1) {\n $rootScope.$$postDigest(handleCSSClassChanges);\n }\n }\n }\n }];\n};\n\n/**\n * @ngdoc provider\n * @name $animateProvider\n *\n * @description\n * Default implementation of $animate that doesn't perform any animations, instead just\n * synchronously performs DOM updates and resolves the returned runner promise.\n *\n * In order to enable animations the `ngAnimate` module has to be loaded.\n *\n * To see the functional implementation check out `src/ngAnimate/animate.js`.\n */\nvar $AnimateProvider = ['$provide', function($provide) {\n var provider = this;\n\n this.$$registeredAnimations = Object.create(null);\n\n /**\n * @ngdoc method\n * @name $animateProvider#register\n *\n * @description\n * Registers a new injectable animation factory function. The factory function produces the\n * animation object which contains callback functions for each event that is expected to be\n * animated.\n *\n * * `eventFn`: `function(element, ... , doneFunction, options)`\n * The element to animate, the `doneFunction` and the options fed into the animation. Depending\n * on the type of animation additional arguments will be injected into the animation function. The\n * list below explains the function signatures for the different animation methods:\n *\n * - setClass: function(element, addedClasses, removedClasses, doneFunction, options)\n * - addClass: function(element, addedClasses, doneFunction, options)\n * - removeClass: function(element, removedClasses, doneFunction, options)\n * - enter, leave, move: function(element, doneFunction, options)\n * - animate: function(element, fromStyles, toStyles, doneFunction, options)\n *\n * Make sure to trigger the `doneFunction` once the animation is fully complete.\n *\n * ```js\n * return {\n * //enter, leave, move signature\n * eventFn : function(element, done, options) {\n * //code to run the animation\n * //once complete, then run done()\n * return function endFunction(wasCancelled) {\n * //code to cancel the animation\n * }\n * }\n * }\n * ```\n *\n * @param {string} name The name of the animation (this is what the class-based CSS value will be compared to).\n * @param {Function} factory The factory function that will be executed to return the animation\n * object.\n */\n this.register = function(name, factory) {\n if (name && name.charAt(0) !== '.') {\n throw $animateMinErr('notcsel', \"Expecting class selector starting with '.' got '{0}'.\", name);\n }\n\n var key = name + '-animation';\n provider.$$registeredAnimations[name.substr(1)] = key;\n $provide.factory(key, factory);\n };\n\n /**\n * @ngdoc method\n * @name $animateProvider#classNameFilter\n *\n * @description\n * Sets and/or returns the CSS class regular expression that is checked when performing\n * an animation. Upon bootstrap the classNameFilter value is not set at all and will\n * therefore enable $animate to attempt to perform an animation on any element that is triggered.\n * When setting the `classNameFilter` value, animations will only be performed on elements\n * that successfully match the filter expression. This in turn can boost performance\n * for low-powered devices as well as applications containing a lot of structural operations.\n * @param {RegExp=} expression The className expression which will be checked against all animations\n * @return {RegExp} The current CSS className expression value. If null then there is no expression value\n */\n this.classNameFilter = function(expression) {\n if (arguments.length === 1) {\n this.$$classNameFilter = (expression instanceof RegExp) ? expression : null;\n if (this.$$classNameFilter) {\n var reservedRegex = new RegExp(\"(\\\\s+|\\\\/)\" + NG_ANIMATE_CLASSNAME + \"(\\\\s+|\\\\/)\");\n if (reservedRegex.test(this.$$classNameFilter.toString())) {\n throw $animateMinErr('nongcls','$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the \"{0}\" CSS class.', NG_ANIMATE_CLASSNAME);\n\n }\n }\n }\n return this.$$classNameFilter;\n };\n\n this.$get = ['$$animateQueue', function($$animateQueue) {\n function domInsert(element, parentElement, afterElement) {\n // if for some reason the previous element was removed\n // from the dom sometime before this code runs then let's\n // just stick to using the parent element as the anchor\n if (afterElement) {\n var afterNode = extractElementNode(afterElement);\n if (afterNode && !afterNode.parentNode && !afterNode.previousElementSibling) {\n afterElement = null;\n }\n }\n afterElement ? afterElement.after(element) : parentElement.prepend(element);\n }\n\n /**\n * @ngdoc service\n * @name $animate\n * @description The $animate service exposes a series of DOM utility methods that provide support\n * for animation hooks. The default behavior is the application of DOM operations, however,\n * when an animation is detected (and animations are enabled), $animate will do the heavy lifting\n * to ensure that animation runs with the triggered DOM operation.\n *\n * By default $animate doesn't trigger any animations. This is because the `ngAnimate` module isn't\n * included and only when it is active then the animation hooks that `$animate` triggers will be\n * functional. Once active then all structural `ng-` directives will trigger animations as they perform\n * their DOM-related operations (enter, leave and move). Other directives such as `ngClass`,\n * `ngShow`, `ngHide` and `ngMessages` also provide support for animations.\n *\n * It is recommended that the`$animate` service is always used when executing DOM-related procedures within directives.\n *\n * To learn more about enabling animation support, click here to visit the\n * {@link ngAnimate ngAnimate module page}.\n */\n return {\n // we don't call it directly since non-existant arguments may\n // be interpreted as null within the sub enabled function\n\n /**\n *\n * @ngdoc method\n * @name $animate#on\n * @kind function\n * @description Sets up an event listener to fire whenever the animation event (enter, leave, move, etc...)\n * has fired on the given element or among any of its children. Once the listener is fired, the provided callback\n * is fired with the following params:\n *\n * ```js\n * $animate.on('enter', container,\n * function callback(element, phase) {\n * // cool we detected an enter animation within the container\n * }\n * );\n * ```\n *\n * @param {string} event the animation event that will be captured (e.g. enter, leave, move, addClass, removeClass, etc...)\n * @param {DOMElement} container the container element that will capture each of the animation events that are fired on itself\n * as well as among its children\n * @param {Function} callback the callback function that will be fired when the listener is triggered\n *\n * The arguments present in the callback function are:\n * * `element` - The captured DOM element that the animation was fired on.\n * * `phase` - The phase of the animation. The two possible phases are **start** (when the animation starts) and **close** (when it ends).\n */\n on: $$animateQueue.on,\n\n /**\n *\n * @ngdoc method\n * @name $animate#off\n * @kind function\n * @description Deregisters an event listener based on the event which has been associated with the provided element. This method\n * can be used in three different ways depending on the arguments:\n *\n * ```js\n * // remove all the animation event listeners listening for `enter`\n * $animate.off('enter');\n *\n * // remove all the animation event listeners listening for `enter` on the given element and its children\n * $animate.off('enter', container);\n *\n * // remove the event listener function provided by `listenerFn` that is set\n * // to listen for `enter` on the given `element` as well as its children\n * $animate.off('enter', container, callback);\n * ```\n *\n * @param {string} event the animation event (e.g. enter, leave, move, addClass, removeClass, etc...)\n * @param {DOMElement=} container the container element the event listener was placed on\n * @param {Function=} callback the callback function that was registered as the listener\n */\n off: $$animateQueue.off,\n\n /**\n * @ngdoc method\n * @name $animate#pin\n * @kind function\n * @description Associates the provided element with a host parent element to allow the element to be animated even if it exists\n * outside of the DOM structure of the Angular application. By doing so, any animation triggered via `$animate` can be issued on the\n * element despite being outside the realm of the application or within another application. Say for example if the application\n * was bootstrapped on an element that is somewhere inside of the `<body>` tag, but we wanted to allow for an element to be situated\n * as a direct child of `document.body`, then this can be achieved by pinning the element via `$animate.pin(element)`. Keep in mind\n * that calling `$animate.pin(element, parentElement)` will not actually insert into the DOM anywhere; it will just create the association.\n *\n * Note that this feature is only active when the `ngAnimate` module is used.\n *\n * @param {DOMElement} element the external element that will be pinned\n * @param {DOMElement} parentElement the host parent element that will be associated with the external element\n */\n pin: $$animateQueue.pin,\n\n /**\n *\n * @ngdoc method\n * @name $animate#enabled\n * @kind function\n * @description Used to get and set whether animations are enabled or not on the entire application or on an element and its children. This\n * function can be called in four ways:\n *\n * ```js\n * // returns true or false\n * $animate.enabled();\n *\n * // changes the enabled state for all animations\n * $animate.enabled(false);\n * $animate.enabled(true);\n *\n * // returns true or false if animations are enabled for an element\n * $animate.enabled(element);\n *\n * // changes the enabled state for an element and its children\n * $animate.enabled(element, true);\n * $animate.enabled(element, false);\n * ```\n *\n * @param {DOMElement=} element the element that will be considered for checking/setting the enabled state\n * @param {boolean=} enabled whether or not the animations will be enabled for the element\n *\n * @return {boolean} whether or not animations are enabled\n */\n enabled: $$animateQueue.enabled,\n\n /**\n * @ngdoc method\n * @name $animate#cancel\n * @kind function\n * @description Cancels the provided animation.\n *\n * @param {Promise} animationPromise The animation promise that is returned when an animation is started.\n */\n cancel: function(runner) {\n runner.end && runner.end();\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#enter\n * @kind function\n * @description Inserts the element into the DOM either after the `after` element (if provided) or\n * as the first child within the `parent` element and then triggers an animation.\n * A promise is returned that will be resolved during the next digest once the animation\n * has completed.\n *\n * @param {DOMElement} element the element which will be inserted into the DOM\n * @param {DOMElement} parent the parent element which will append the element as\n * a child (so long as the after element is not present)\n * @param {DOMElement=} after the sibling element after which the element will be appended\n * @param {object=} options an optional collection of options/styles that will be applied to the element\n *\n * @return {Promise} the animation callback promise\n */\n enter: function(element, parent, after, options) {\n parent = parent && jqLite(parent);\n after = after && jqLite(after);\n parent = parent || after.parent();\n domInsert(element, parent, after);\n return $$animateQueue.push(element, 'enter', prepareAnimateOptions(options));\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#move\n * @kind function\n * @description Inserts (moves) the element into its new position in the DOM either after\n * the `after` element (if provided) or as the first child within the `parent` element\n * and then triggers an animation. A promise is returned that will be resolved\n * during the next digest once the animation has completed.\n *\n * @param {DOMElement} element the element which will be moved into the new DOM position\n * @param {DOMElement} parent the parent element which will append the element as\n * a child (so long as the after element is not present)\n * @param {DOMElement=} after the sibling element after which the element will be appended\n * @param {object=} options an optional collection of options/styles that will be applied to the element\n *\n * @return {Promise} the animation callback promise\n */\n move: function(element, parent, after, options) {\n parent = parent && jqLite(parent);\n after = after && jqLite(after);\n parent = parent || after.parent();\n domInsert(element, parent, after);\n return $$animateQueue.push(element, 'move', prepareAnimateOptions(options));\n },\n\n /**\n * @ngdoc method\n * @name $animate#leave\n * @kind function\n * @description Triggers an animation and then removes the element from the DOM.\n * When the function is called a promise is returned that will be resolved during the next\n * digest once the animation has completed.\n *\n * @param {DOMElement} element the element which will be removed from the DOM\n * @param {object=} options an optional collection of options/styles that will be applied to the element\n *\n * @return {Promise} the animation callback promise\n */\n leave: function(element, options) {\n return $$animateQueue.push(element, 'leave', prepareAnimateOptions(options), function() {\n element.remove();\n });\n },\n\n /**\n * @ngdoc method\n * @name $animate#addClass\n * @kind function\n *\n * @description Triggers an addClass animation surrounding the addition of the provided CSS class(es). Upon\n * execution, the addClass operation will only be handled after the next digest and it will not trigger an\n * animation if element already contains the CSS class or if the class is removed at a later step.\n * Note that class-based animations are treated differently compared to structural animations\n * (like enter, move and leave) since the CSS classes may be added/removed at different points\n * depending if CSS or JavaScript animations are used.\n *\n * @param {DOMElement} element the element which the CSS classes will be applied to\n * @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces)\n * @param {object=} options an optional collection of options/styles that will be applied to the element\n *\n * @return {Promise} the animation callback promise\n */\n addClass: function(element, className, options) {\n options = prepareAnimateOptions(options);\n options.addClass = mergeClasses(options.addclass, className);\n return $$animateQueue.push(element, 'addClass', options);\n },\n\n /**\n * @ngdoc method\n * @name $animate#removeClass\n * @kind function\n *\n * @description Triggers a removeClass animation surrounding the removal of the provided CSS class(es). Upon\n * execution, the removeClass operation will only be handled after the next digest and it will not trigger an\n * animation if element does not contain the CSS class or if the class is added at a later step.\n * Note that class-based animations are treated differently compared to structural animations\n * (like enter, move and leave) since the CSS classes may be added/removed at different points\n * depending if CSS or JavaScript animations are used.\n *\n * @param {DOMElement} element the element which the CSS classes will be applied to\n * @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces)\n * @param {object=} options an optional collection of options/styles that will be applied to the element\n *\n * @return {Promise} the animation callback promise\n */\n removeClass: function(element, className, options) {\n options = prepareAnimateOptions(options);\n options.removeClass = mergeClasses(options.removeClass, className);\n return $$animateQueue.push(element, 'removeClass', options);\n },\n\n /**\n * @ngdoc method\n * @name $animate#setClass\n * @kind function\n *\n * @description Performs both the addition and removal of a CSS classes on an element and (during the process)\n * triggers an animation surrounding the class addition/removal. Much like `$animate.addClass` and\n * `$animate.removeClass`, `setClass` will only evaluate the classes being added/removed once a digest has\n * passed. Note that class-based animations are treated differently compared to structural animations\n * (like enter, move and leave) since the CSS classes may be added/removed at different points\n * depending if CSS or JavaScript animations are used.\n *\n * @param {DOMElement} element the element which the CSS classes will be applied to\n * @param {string} add the CSS class(es) that will be added (multiple classes are separated via spaces)\n * @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces)\n * @param {object=} options an optional collection of options/styles that will be applied to the element\n *\n * @return {Promise} the animation callback promise\n */\n setClass: function(element, add, remove, options) {\n options = prepareAnimateOptions(options);\n options.addClass = mergeClasses(options.addClass, add);\n options.removeClass = mergeClasses(options.removeClass, remove);\n return $$animateQueue.push(element, 'setClass', options);\n },\n\n /**\n * @ngdoc method\n * @name $animate#animate\n * @kind function\n *\n * @description Performs an inline animation on the element which applies the provided to and from CSS styles to the element.\n * If any detected CSS transition, keyframe or JavaScript matches the provided className value, then the animation will take\n * on the provided styles. For example, if a transition animation is set for the given className, then the provided `from` and\n * `to` styles will be applied alongside the given transition. If the CSS style provided in `from` does not have a corresponding\n * style in `to`, the style in `from` is applied immediately, and no animation is run.\n * If a JavaScript animation is detected then the provided styles will be given in as function parameters into the `animate`\n * method (or as part of the `options` parameter):\n *\n * ```js\n * ngModule.animation('.my-inline-animation', function() {\n * return {\n * animate : function(element, from, to, done, options) {\n * //animation\n * done();\n * }\n * }\n * });\n * ```\n *\n * @param {DOMElement} element the element which the CSS styles will be applied to\n * @param {object} from the from (starting) CSS styles that will be applied to the element and across the animation.\n * @param {object} to the to (destination) CSS styles that will be applied to the element and across the animation.\n * @param {string=} className an optional CSS class that will be applied to the element for the duration of the animation. If\n * this value is left as empty then a CSS class of `ng-inline-animate` will be applied to the element.\n * (Note that if no animation is detected then this value will not be appplied to the element.)\n * @param {object=} options an optional collection of options/styles that will be applied to the element\n *\n * @return {Promise} the animation callback promise\n */\n animate: function(element, from, to, className, options) {\n options = prepareAnimateOptions(options);\n options.from = options.from ? extend(options.from, from) : from;\n options.to = options.to ? extend(options.to, to) : to;\n\n className = className || 'ng-inline-animate';\n options.tempClasses = mergeClasses(options.tempClasses, className);\n return $$animateQueue.push(element, 'animate', options);\n }\n };\n }];\n}];\n\nvar $$AnimateAsyncRunFactoryProvider = function() {\n this.$get = ['$$rAF', function($$rAF) {\n var waitQueue = [];\n\n function waitForTick(fn) {\n waitQueue.push(fn);\n if (waitQueue.length > 1) return;\n $$rAF(function() {\n for (var i = 0; i < waitQueue.length; i++) {\n waitQueue[i]();\n }\n waitQueue = [];\n });\n }\n\n return function() {\n var passed = false;\n waitForTick(function() {\n passed = true;\n });\n return function(callback) {\n passed ? callback() : waitForTick(callback);\n };\n };\n }];\n};\n\nvar $$AnimateRunnerFactoryProvider = function() {\n this.$get = ['$q', '$sniffer', '$$animateAsyncRun', '$document', '$timeout',\n function($q, $sniffer, $$animateAsyncRun, $document, $timeout) {\n\n var INITIAL_STATE = 0;\n var DONE_PENDING_STATE = 1;\n var DONE_COMPLETE_STATE = 2;\n\n AnimateRunner.chain = function(chain, callback) {\n var index = 0;\n\n next();\n function next() {\n if (index === chain.length) {\n callback(true);\n return;\n }\n\n chain[index](function(response) {\n if (response === false) {\n callback(false);\n return;\n }\n index++;\n next();\n });\n }\n };\n\n AnimateRunner.all = function(runners, callback) {\n var count = 0;\n var status = true;\n forEach(runners, function(runner) {\n runner.done(onProgress);\n });\n\n function onProgress(response) {\n status = status && response;\n if (++count === runners.length) {\n callback(status);\n }\n }\n };\n\n function AnimateRunner(host) {\n this.setHost(host);\n\n var rafTick = $$animateAsyncRun();\n var timeoutTick = function(fn) {\n $timeout(fn, 0, false);\n };\n\n this._doneCallbacks = [];\n this._tick = function(fn) {\n var doc = $document[0];\n\n // the document may not be ready or attached\n // to the module for some internal tests\n if (doc && doc.hidden) {\n timeoutTick(fn);\n } else {\n rafTick(fn);\n }\n };\n this._state = 0;\n }\n\n AnimateRunner.prototype = {\n setHost: function(host) {\n this.host = host || {};\n },\n\n done: function(fn) {\n if (this._state === DONE_COMPLETE_STATE) {\n fn();\n } else {\n this._doneCallbacks.push(fn);\n }\n },\n\n progress: noop,\n\n getPromise: function() {\n if (!this.promise) {\n var self = this;\n this.promise = $q(function(resolve, reject) {\n self.done(function(status) {\n status === false ? reject() : resolve();\n });\n });\n }\n return this.promise;\n },\n\n then: function(resolveHandler, rejectHandler) {\n return this.getPromise().then(resolveHandler, rejectHandler);\n },\n\n 'catch': function(handler) {\n return this.getPromise()['catch'](handler);\n },\n\n 'finally': function(handler) {\n return this.getPromise()['finally'](handler);\n },\n\n pause: function() {\n if (this.host.pause) {\n this.host.pause();\n }\n },\n\n resume: function() {\n if (this.host.resume) {\n this.host.resume();\n }\n },\n\n end: function() {\n if (this.host.end) {\n this.host.end();\n }\n this._resolve(true);\n },\n\n cancel: function() {\n if (this.host.cancel) {\n this.host.cancel();\n }\n this._resolve(false);\n },\n\n complete: function(response) {\n var self = this;\n if (self._state === INITIAL_STATE) {\n self._state = DONE_PENDING_STATE;\n self._tick(function() {\n self._resolve(response);\n });\n }\n },\n\n _resolve: function(response) {\n if (this._state !== DONE_COMPLETE_STATE) {\n forEach(this._doneCallbacks, function(fn) {\n fn(response);\n });\n this._doneCallbacks.length = 0;\n this._state = DONE_COMPLETE_STATE;\n }\n }\n };\n\n return AnimateRunner;\n }];\n};\n\n/**\n * @ngdoc service\n * @name $animateCss\n * @kind object\n *\n * @description\n * This is the core version of `$animateCss`. By default, only when the `ngAnimate` is included,\n * then the `$animateCss` service will actually perform animations.\n *\n * Click here {@link ngAnimate.$animateCss to read the documentation for $animateCss}.\n */\nvar $CoreAnimateCssProvider = function() {\n this.$get = ['$$rAF', '$q', '$$AnimateRunner', function($$rAF, $q, $$AnimateRunner) {\n\n return function(element, initialOptions) {\n // all of the animation functions should create\n // a copy of the options data, however, if a\n // parent service has already created a copy then\n // we should stick to using that\n var options = initialOptions || {};\n if (!options.$$prepared) {\n options = copy(options);\n }\n\n // there is no point in applying the styles since\n // there is no animation that goes on at all in\n // this version of $animateCss.\n if (options.cleanupStyles) {\n options.from = options.to = null;\n }\n\n if (options.from) {\n element.css(options.from);\n options.from = null;\n }\n\n /* jshint newcap: false*/\n var closed, runner = new $$AnimateRunner();\n return {\n start: run,\n end: run\n };\n\n function run() {\n $$rAF(function() {\n applyAnimationContents();\n if (!closed) {\n runner.complete();\n }\n closed = true;\n });\n return runner;\n }\n\n function applyAnimationContents() {\n if (options.addClass) {\n element.addClass(options.addClass);\n options.addClass = null;\n }\n if (options.removeClass) {\n element.removeClass(options.removeClass);\n options.removeClass = null;\n }\n if (options.to) {\n element.css(options.to);\n options.to = null;\n }\n }\n };\n }];\n};\n\n/* global stripHash: true */\n\n/**\n * ! This is a private undocumented service !\n *\n * @name $browser\n * @requires $log\n * @description\n * This object has two goals:\n *\n * - hide all the global state in the browser caused by the window object\n * - abstract away all the browser specific features and inconsistencies\n *\n * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`\n * service, which can be used for convenient testing of the application without the interaction with\n * the real browser apis.\n */\n/**\n * @param {object} window The global window object.\n * @param {object} document jQuery wrapped document.\n * @param {object} $log window.console or an object with the same interface.\n * @param {object} $sniffer $sniffer service\n */\nfunction Browser(window, document, $log, $sniffer) {\n var self = this,\n rawDocument = document[0],\n location = window.location,\n history = window.history,\n setTimeout = window.setTimeout,\n clearTimeout = window.clearTimeout,\n pendingDeferIds = {};\n\n self.isMock = false;\n\n var outstandingRequestCount = 0;\n var outstandingRequestCallbacks = [];\n\n // TODO(vojta): remove this temporary api\n self.$$completeOutstandingRequest = completeOutstandingRequest;\n self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; };\n\n /**\n * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks`\n * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.\n */\n function completeOutstandingRequest(fn) {\n try {\n fn.apply(null, sliceArgs(arguments, 1));\n } finally {\n outstandingRequestCount--;\n if (outstandingRequestCount === 0) {\n while (outstandingRequestCallbacks.length) {\n try {\n outstandingRequestCallbacks.pop()();\n } catch (e) {\n $log.error(e);\n }\n }\n }\n }\n }\n\n function getHash(url) {\n var index = url.indexOf('#');\n return index === -1 ? '' : url.substr(index);\n }\n\n /**\n * @private\n * Note: this method is used only by scenario runner\n * TODO(vojta): prefix this method with $$ ?\n * @param {function()} callback Function that will be called when no outstanding request\n */\n self.notifyWhenNoOutstandingRequests = function(callback) {\n if (outstandingRequestCount === 0) {\n callback();\n } else {\n outstandingRequestCallbacks.push(callback);\n }\n };\n\n //////////////////////////////////////////////////////////////\n // URL API\n //////////////////////////////////////////////////////////////\n\n var cachedState, lastHistoryState,\n lastBrowserUrl = location.href,\n baseElement = document.find('base'),\n pendingLocation = null;\n\n cacheState();\n lastHistoryState = cachedState;\n\n /**\n * @name $browser#url\n *\n * @description\n * GETTER:\n * Without any argument, this method just returns current value of location.href.\n *\n * SETTER:\n * With at least one argument, this method sets url to new value.\n * If html5 history api supported, pushState/replaceState is used, otherwise\n * location.href/location.replace is used.\n * Returns its own instance to allow chaining\n *\n * NOTE: this api is intended for use only by the $location service. Please use the\n * {@link ng.$location $location service} to change url.\n *\n * @param {string} url New url (when used as setter)\n * @param {boolean=} replace Should new url replace current history record?\n * @param {object=} state object to use with pushState/replaceState\n */\n self.url = function(url, replace, state) {\n // In modern browsers `history.state` is `null` by default; treating it separately\n // from `undefined` would cause `$browser.url('/foo')` to change `history.state`\n // to undefined via `pushState`. Instead, let's change `undefined` to `null` here.\n if (isUndefined(state)) {\n state = null;\n }\n\n // Android Browser BFCache causes location, history reference to become stale.\n if (location !== window.location) location = window.location;\n if (history !== window.history) history = window.history;\n\n // setter\n if (url) {\n var sameState = lastHistoryState === state;\n\n // Don't change anything if previous and current URLs and states match. This also prevents\n // IE<10 from getting into redirect loop when in LocationHashbangInHtml5Url mode.\n // See https://github.com/angular/angular.js/commit/ffb2701\n if (lastBrowserUrl === url && (!$sniffer.history || sameState)) {\n return self;\n }\n var sameBase = lastBrowserUrl && stripHash(lastBrowserUrl) === stripHash(url);\n lastBrowserUrl = url;\n lastHistoryState = state;\n // Don't use history API if only the hash changed\n // due to a bug in IE10/IE11 which leads\n // to not firing a `hashchange` nor `popstate` event\n // in some cases (see #9143).\n if ($sniffer.history && (!sameBase || !sameState)) {\n history[replace ? 'replaceState' : 'pushState'](state, '', url);\n cacheState();\n // Do the assignment again so that those two variables are referentially identical.\n lastHistoryState = cachedState;\n } else {\n if (!sameBase || pendingLocation) {\n pendingLocation = url;\n }\n if (replace) {\n location.replace(url);\n } else if (!sameBase) {\n location.href = url;\n } else {\n location.hash = getHash(url);\n }\n if (location.href !== url) {\n pendingLocation = url;\n }\n }\n return self;\n // getter\n } else {\n // - pendingLocation is needed as browsers don't allow to read out\n // the new location.href if a reload happened or if there is a bug like in iOS 9 (see\n // https://openradar.appspot.com/22186109).\n // - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172\n return pendingLocation || location.href.replace(/%27/g,\"'\");\n }\n };\n\n /**\n * @name $browser#state\n *\n * @description\n * This method is a getter.\n *\n * Return history.state or null if history.state is undefined.\n *\n * @returns {object} state\n */\n self.state = function() {\n return cachedState;\n };\n\n var urlChangeListeners = [],\n urlChangeInit = false;\n\n function cacheStateAndFireUrlChange() {\n pendingLocation = null;\n cacheState();\n fireUrlChange();\n }\n\n function getCurrentState() {\n try {\n return history.state;\n } catch (e) {\n // MSIE can reportedly throw when there is no state (UNCONFIRMED).\n }\n }\n\n // This variable should be used *only* inside the cacheState function.\n var lastCachedState = null;\n function cacheState() {\n // This should be the only place in $browser where `history.state` is read.\n cachedState = getCurrentState();\n cachedState = isUndefined(cachedState) ? null : cachedState;\n\n // Prevent callbacks fo fire twice if both hashchange & popstate were fired.\n if (equals(cachedState, lastCachedState)) {\n cachedState = lastCachedState;\n }\n lastCachedState = cachedState;\n }\n\n function fireUrlChange() {\n if (lastBrowserUrl === self.url() && lastHistoryState === cachedState) {\n return;\n }\n\n lastBrowserUrl = self.url();\n lastHistoryState = cachedState;\n forEach(urlChangeListeners, function(listener) {\n listener(self.url(), cachedState);\n });\n }\n\n /**\n * @name $browser#onUrlChange\n *\n * @description\n * Register callback function that will be called, when url changes.\n *\n * It's only called when the url is changed from outside of angular:\n * - user types different url into address bar\n * - user clicks on history (forward/back) button\n * - user clicks on a link\n *\n * It's not called when url is changed by $browser.url() method\n *\n * The listener gets called with new url as parameter.\n *\n * NOTE: this api is intended for use only by the $location service. Please use the\n * {@link ng.$location $location service} to monitor url changes in angular apps.\n *\n * @param {function(string)} listener Listener function to be called when url changes.\n * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.\n */\n self.onUrlChange = function(callback) {\n // TODO(vojta): refactor to use node's syntax for events\n if (!urlChangeInit) {\n // We listen on both (hashchange/popstate) when available, as some browsers (e.g. Opera)\n // don't fire popstate when user change the address bar and don't fire hashchange when url\n // changed by push/replaceState\n\n // html5 history api - popstate event\n if ($sniffer.history) jqLite(window).on('popstate', cacheStateAndFireUrlChange);\n // hashchange event\n jqLite(window).on('hashchange', cacheStateAndFireUrlChange);\n\n urlChangeInit = true;\n }\n\n urlChangeListeners.push(callback);\n return callback;\n };\n\n /**\n * @private\n * Remove popstate and hashchange handler from window.\n *\n * NOTE: this api is intended for use only by $rootScope.\n */\n self.$$applicationDestroyed = function() {\n jqLite(window).off('hashchange popstate', cacheStateAndFireUrlChange);\n };\n\n /**\n * Checks whether the url has changed outside of Angular.\n * Needs to be exported to be able to check for changes that have been done in sync,\n * as hashchange/popstate events fire in async.\n */\n self.$$checkUrlChange = fireUrlChange;\n\n //////////////////////////////////////////////////////////////\n // Misc API\n //////////////////////////////////////////////////////////////\n\n /**\n * @name $browser#baseHref\n *\n * @description\n * Returns current <base href>\n * (always relative - without domain)\n *\n * @returns {string} The current base href\n */\n self.baseHref = function() {\n var href = baseElement.attr('href');\n return href ? href.replace(/^(https?\\:)?\\/\\/[^\\/]*/, '') : '';\n };\n\n /**\n * @name $browser#defer\n * @param {function()} fn A function, who's execution should be deferred.\n * @param {number=} [delay=0] of milliseconds to defer the function execution.\n * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.\n *\n * @description\n * Executes a fn asynchronously via `setTimeout(fn, delay)`.\n *\n * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using\n * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed\n * via `$browser.defer.flush()`.\n *\n */\n self.defer = function(fn, delay) {\n var timeoutId;\n outstandingRequestCount++;\n timeoutId = setTimeout(function() {\n delete pendingDeferIds[timeoutId];\n completeOutstandingRequest(fn);\n }, delay || 0);\n pendingDeferIds[timeoutId] = true;\n return timeoutId;\n };\n\n\n /**\n * @name $browser#defer.cancel\n *\n * @description\n * Cancels a deferred task identified with `deferId`.\n *\n * @param {*} deferId Token returned by the `$browser.defer` function.\n * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n * canceled.\n */\n self.defer.cancel = function(deferId) {\n if (pendingDeferIds[deferId]) {\n delete pendingDeferIds[deferId];\n clearTimeout(deferId);\n completeOutstandingRequest(noop);\n return true;\n }\n return false;\n };\n\n}\n\nfunction $BrowserProvider() {\n this.$get = ['$window', '$log', '$sniffer', '$document',\n function($window, $log, $sniffer, $document) {\n return new Browser($window, $document, $log, $sniffer);\n }];\n}\n\n/**\n * @ngdoc service\n * @name $cacheFactory\n *\n * @description\n * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to\n * them.\n *\n * ```js\n *\n * var cache = $cacheFactory('cacheId');\n * expect($cacheFactory.get('cacheId')).toBe(cache);\n * expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();\n *\n * cache.put(\"key\", \"value\");\n * cache.put(\"another key\", \"another value\");\n *\n * // We've specified no options on creation\n * expect(cache.info()).toEqual({id: 'cacheId', size: 2});\n *\n * ```\n *\n *\n * @param {string} cacheId Name or id of the newly created cache.\n * @param {object=} options Options object that specifies the cache behavior. Properties:\n *\n * - `{number=}` `capacity` — turns the cache into LRU cache.\n *\n * @returns {object} Newly created cache object with the following set of methods:\n *\n * - `{object}` `info()` — Returns id, size, and options of cache.\n * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns\n * it.\n * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss.\n * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache.\n * - `{void}` `removeAll()` — Removes all cached values.\n * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.\n *\n * @example\n <example module=\"cacheExampleApp\">\n <file name=\"index.html\">\n <div ng-controller=\"CacheController\">\n <input ng-model=\"newCacheKey\" placeholder=\"Key\">\n <input ng-model=\"newCacheValue\" placeholder=\"Value\">\n <button ng-click=\"put(newCacheKey, newCacheValue)\">Cache</button>\n\n <p ng-if=\"keys.length\">Cached Values</p>\n <div ng-repeat=\"key in keys\">\n <span ng-bind=\"key\"></span>\n <span>: </span>\n <b ng-bind=\"cache.get(key)\"></b>\n </div>\n\n <p>Cache Info</p>\n <div ng-repeat=\"(key, value) in cache.info()\">\n <span ng-bind=\"key\"></span>\n <span>: </span>\n <b ng-bind=\"value\"></b>\n </div>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('cacheExampleApp', []).\n controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {\n $scope.keys = [];\n $scope.cache = $cacheFactory('cacheId');\n $scope.put = function(key, value) {\n if (angular.isUndefined($scope.cache.get(key))) {\n $scope.keys.push(key);\n }\n $scope.cache.put(key, angular.isUndefined(value) ? null : value);\n };\n }]);\n </file>\n <file name=\"style.css\">\n p {\n margin: 10px 0 3px;\n }\n </file>\n </example>\n */\nfunction $CacheFactoryProvider() {\n\n this.$get = function() {\n var caches = {};\n\n function cacheFactory(cacheId, options) {\n if (cacheId in caches) {\n throw minErr('$cacheFactory')('iid', \"CacheId '{0}' is already taken!\", cacheId);\n }\n\n var size = 0,\n stats = extend({}, options, {id: cacheId}),\n data = createMap(),\n capacity = (options && options.capacity) || Number.MAX_VALUE,\n lruHash = createMap(),\n freshEnd = null,\n staleEnd = null;\n\n /**\n * @ngdoc type\n * @name $cacheFactory.Cache\n *\n * @description\n * A cache object used to store and retrieve data, primarily used by\n * {@link $http $http} and the {@link ng.directive:script script} directive to cache\n * templates and other data.\n *\n * ```js\n * angular.module('superCache')\n * .factory('superCache', ['$cacheFactory', function($cacheFactory) {\n * return $cacheFactory('super-cache');\n * }]);\n * ```\n *\n * Example test:\n *\n * ```js\n * it('should behave like a cache', inject(function(superCache) {\n * superCache.put('key', 'value');\n * superCache.put('another key', 'another value');\n *\n * expect(superCache.info()).toEqual({\n * id: 'super-cache',\n * size: 2\n * });\n *\n * superCache.remove('another key');\n * expect(superCache.get('another key')).toBeUndefined();\n *\n * superCache.removeAll();\n * expect(superCache.info()).toEqual({\n * id: 'super-cache',\n * size: 0\n * });\n * }));\n * ```\n */\n return caches[cacheId] = {\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#put\n * @kind function\n *\n * @description\n * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be\n * retrieved later, and incrementing the size of the cache if the key was not already\n * present in the cache. If behaving like an LRU cache, it will also remove stale\n * entries from the set.\n *\n * It will not insert undefined values into the cache.\n *\n * @param {string} key the key under which the cached data is stored.\n * @param {*} value the value to store alongside the key. If it is undefined, the key\n * will not be stored.\n * @returns {*} the value stored.\n */\n put: function(key, value) {\n if (isUndefined(value)) return;\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key] || (lruHash[key] = {key: key});\n\n refresh(lruEntry);\n }\n\n if (!(key in data)) size++;\n data[key] = value;\n\n if (size > capacity) {\n this.remove(staleEnd.key);\n }\n\n return value;\n },\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#get\n * @kind function\n *\n * @description\n * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object.\n *\n * @param {string} key the key of the data to be retrieved\n * @returns {*} the value stored.\n */\n get: function(key) {\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key];\n\n if (!lruEntry) return;\n\n refresh(lruEntry);\n }\n\n return data[key];\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#remove\n * @kind function\n *\n * @description\n * Removes an entry from the {@link $cacheFactory.Cache Cache} object.\n *\n * @param {string} key the key of the entry to be removed\n */\n remove: function(key) {\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key];\n\n if (!lruEntry) return;\n\n if (lruEntry == freshEnd) freshEnd = lruEntry.p;\n if (lruEntry == staleEnd) staleEnd = lruEntry.n;\n link(lruEntry.n,lruEntry.p);\n\n delete lruHash[key];\n }\n\n if (!(key in data)) return;\n\n delete data[key];\n size--;\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#removeAll\n * @kind function\n *\n * @description\n * Clears the cache object of any entries.\n */\n removeAll: function() {\n data = createMap();\n size = 0;\n lruHash = createMap();\n freshEnd = staleEnd = null;\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#destroy\n * @kind function\n *\n * @description\n * Destroys the {@link $cacheFactory.Cache Cache} object entirely,\n * removing it from the {@link $cacheFactory $cacheFactory} set.\n */\n destroy: function() {\n data = null;\n stats = null;\n lruHash = null;\n delete caches[cacheId];\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#info\n * @kind function\n *\n * @description\n * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}.\n *\n * @returns {object} an object with the following properties:\n * <ul>\n * <li>**id**: the id of the cache instance</li>\n * <li>**size**: the number of entries kept in the cache instance</li>\n * <li>**...**: any additional properties from the options object when creating the\n * cache.</li>\n * </ul>\n */\n info: function() {\n return extend({}, stats, {size: size});\n }\n };\n\n\n /**\n * makes the `entry` the freshEnd of the LRU linked list\n */\n function refresh(entry) {\n if (entry != freshEnd) {\n if (!staleEnd) {\n staleEnd = entry;\n } else if (staleEnd == entry) {\n staleEnd = entry.n;\n }\n\n link(entry.n, entry.p);\n link(entry, freshEnd);\n freshEnd = entry;\n freshEnd.n = null;\n }\n }\n\n\n /**\n * bidirectionally links two entries of the LRU linked list\n */\n function link(nextEntry, prevEntry) {\n if (nextEntry != prevEntry) {\n if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify\n if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify\n }\n }\n }\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory#info\n *\n * @description\n * Get information about all the caches that have been created\n *\n * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`\n */\n cacheFactory.info = function() {\n var info = {};\n forEach(caches, function(cache, cacheId) {\n info[cacheId] = cache.info();\n });\n return info;\n };\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory#get\n *\n * @description\n * Get access to a cache object by the `cacheId` used when it was created.\n *\n * @param {string} cacheId Name or id of a cache to access.\n * @returns {object} Cache object identified by the cacheId or undefined if no such cache.\n */\n cacheFactory.get = function(cacheId) {\n return caches[cacheId];\n };\n\n\n return cacheFactory;\n };\n}\n\n/**\n * @ngdoc service\n * @name $templateCache\n *\n * @description\n * The first time a template is used, it is loaded in the template cache for quick retrieval. You\n * can load templates directly into the cache in a `script` tag, or by consuming the\n * `$templateCache` service directly.\n *\n * Adding via the `script` tag:\n *\n * ```html\n * <script type=\"text/ng-template\" id=\"templateId.html\">\n * <p>This is the content of the template</p>\n * </script>\n * ```\n *\n * **Note:** the `script` tag containing the template does not need to be included in the `head` of\n * the document, but it must be a descendent of the {@link ng.$rootElement $rootElement} (IE,\n * element with ng-app attribute), otherwise the template will be ignored.\n *\n * Adding via the `$templateCache` service:\n *\n * ```js\n * var myApp = angular.module('myApp', []);\n * myApp.run(function($templateCache) {\n * $templateCache.put('templateId.html', 'This is the content of the template');\n * });\n * ```\n *\n * To retrieve the template later, simply use it in your HTML:\n * ```html\n * <div ng-include=\" 'templateId.html' \"></div>\n * ```\n *\n * or get it via Javascript:\n * ```js\n * $templateCache.get('templateId.html')\n * ```\n *\n * See {@link ng.$cacheFactory $cacheFactory}.\n *\n */\nfunction $TemplateCacheProvider() {\n this.$get = ['$cacheFactory', function($cacheFactory) {\n return $cacheFactory('templates');\n }];\n}\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * Any commits to this file should be reviewed with security in mind. *\n * Changes to this file can potentially create security vulnerabilities. *\n * An approval from 2 Core members with history of modifying *\n * this file is required. *\n * *\n * Does the change somehow allow for arbitrary javascript to be executed? *\n * Or allows for someone to change the prototype of built-in objects? *\n * Or gives undesired access to variables likes document or window? *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\n/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!\n *\n * DOM-related variables:\n *\n * - \"node\" - DOM Node\n * - \"element\" - DOM Element or Node\n * - \"$node\" or \"$element\" - jqLite-wrapped node or element\n *\n *\n * Compiler related stuff:\n *\n * - \"linkFn\" - linking fn of a single directive\n * - \"nodeLinkFn\" - function that aggregates all linking fns for a particular node\n * - \"childLinkFn\" - function that aggregates all linking fns for child nodes of a particular node\n * - \"compositeLinkFn\" - function that aggregates all linking fns for a compilation root (nodeList)\n */\n\n\n/**\n * @ngdoc service\n * @name $compile\n * @kind function\n *\n * @description\n * Compiles an HTML string or DOM into a template and produces a template function, which\n * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together.\n *\n * The compilation is a process of walking the DOM tree and matching DOM elements to\n * {@link ng.$compileProvider#directive directives}.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** This document is an in-depth reference of all directive options.\n * For a gentle introduction to directives with examples of common use cases,\n * see the {@link guide/directive directive guide}.\n * </div>\n *\n * ## Comprehensive Directive API\n *\n * There are many different options for a directive.\n *\n * The difference resides in the return value of the factory function.\n * You can either return a \"Directive Definition Object\" (see below) that defines the directive properties,\n * or just the `postLink` function (all other properties will have the default values).\n *\n * <div class=\"alert alert-success\">\n * **Best Practice:** It's recommended to use the \"directive definition object\" form.\n * </div>\n *\n * Here's an example directive declared with a Directive Definition Object:\n *\n * ```js\n * var myModule = angular.module(...);\n *\n * myModule.directive('directiveName', function factory(injectables) {\n * var directiveDefinitionObject = {\n * priority: 0,\n * template: '<div></div>', // or // function(tElement, tAttrs) { ... },\n * // or\n * // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... },\n * transclude: false,\n * restrict: 'A',\n * templateNamespace: 'html',\n * scope: false,\n * controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },\n * controllerAs: 'stringIdentifier',\n * bindToController: false,\n * require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],\n * compile: function compile(tElement, tAttrs, transclude) {\n * return {\n * pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n * post: function postLink(scope, iElement, iAttrs, controller) { ... }\n * }\n * // or\n * // return function postLink( ... ) { ... }\n * },\n * // or\n * // link: {\n * // pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n * // post: function postLink(scope, iElement, iAttrs, controller) { ... }\n * // }\n * // or\n * // link: function postLink( ... ) { ... }\n * };\n * return directiveDefinitionObject;\n * });\n * ```\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Any unspecified options will use the default value. You can see the default values below.\n * </div>\n *\n * Therefore the above can be simplified as:\n *\n * ```js\n * var myModule = angular.module(...);\n *\n * myModule.directive('directiveName', function factory(injectables) {\n * var directiveDefinitionObject = {\n * link: function postLink(scope, iElement, iAttrs) { ... }\n * };\n * return directiveDefinitionObject;\n * // or\n * // return function postLink(scope, iElement, iAttrs) { ... }\n * });\n * ```\n *\n *\n *\n * ### Directive Definition Object\n *\n * The directive definition object provides instructions to the {@link ng.$compile\n * compiler}. The attributes are:\n *\n * #### `multiElement`\n * When this property is set to true, the HTML compiler will collect DOM nodes between\n * nodes with the attributes `directive-name-start` and `directive-name-end`, and group them\n * together as the directive elements. It is recommended that this feature be used on directives\n * which are not strictly behavioural (such as {@link ngClick}), and which\n * do not manipulate or replace child nodes (such as {@link ngInclude}).\n *\n * #### `priority`\n * When there are multiple directives defined on a single DOM element, sometimes it\n * is necessary to specify the order in which the directives are applied. The `priority` is used\n * to sort the directives before their `compile` functions get called. Priority is defined as a\n * number. Directives with greater numerical `priority` are compiled first. Pre-link functions\n * are also run in priority order, but post-link functions are run in reverse order. The order\n * of directives with the same priority is undefined. The default priority is `0`.\n *\n * #### `terminal`\n * If set to true then the current `priority` will be the last set of directives\n * which will execute (any directives at the current priority will still execute\n * as the order of execution on same `priority` is undefined). Note that expressions\n * and other directives used in the directive's template will also be excluded from execution.\n *\n * #### `scope`\n * The scope property can be `true`, an object or a falsy value:\n *\n * * **falsy:** No scope will be created for the directive. The directive will use its parent's scope.\n *\n * * **`true`:** A new child scope that prototypically inherits from its parent will be created for\n * the directive's element. If multiple directives on the same element request a new scope,\n * only one new scope is created. The new scope rule does not apply for the root of the template\n * since the root of the template always gets a new scope.\n *\n * * **`{...}` (an object hash):** A new \"isolate\" scope is created for the directive's element. The\n * 'isolate' scope differs from normal scope in that it does not prototypically inherit from its parent\n * scope. This is useful when creating reusable components, which should not accidentally read or modify\n * data in the parent scope.\n *\n * The 'isolate' scope object hash defines a set of local scope properties derived from attributes on the\n * directive's element. These local properties are useful for aliasing values for templates. The keys in\n * the object hash map to the name of the property on the isolate scope; the values define how the property\n * is bound to the parent scope, via matching attributes on the directive's element:\n *\n * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is\n * always a string since DOM attributes are strings. If no `attr` name is specified then the\n * attribute name is assumed to be the same as the local name. Given `<my-component\n * my-attr=\"hello {{name}}\">` and the isolate scope definition `scope: { localName:'@myAttr' }`,\n * the directive's scope property `localName` will reflect the interpolated value of `hello\n * {{name}}`. As the `name` attribute changes so will the `localName` property on the directive's\n * scope. The `name` is read from the parent scope (not the directive's scope).\n *\n * * `=` or `=attr` - set up a bidirectional binding between a local scope property and an expression\n * passed via the attribute `attr`. The expression is evaluated in the context of the parent scope.\n * If no `attr` name is specified then the attribute name is assumed to be the same as the local\n * name. Given `<my-component my-attr=\"parentModel\">` and the isolate scope definition `scope: {\n * localModel: '=myAttr' }`, the property `localModel` on the directive's scope will reflect the\n * value of `parentModel` on the parent scope. Changes to `parentModel` will be reflected in\n * `localModel` and vice versa. Optional attributes should be marked as such with a question mark:\n * `=?` or `=?attr`. If the binding expression is non-assignable, or if the attribute isn't\n * optional and doesn't exist, an exception ({@link error/$compile/nonassign `$compile:nonassign`})\n * will be thrown upon discovering changes to the local value, since it will be impossible to sync\n * them back to the parent scope. By default, the {@link ng.$rootScope.Scope#$watch `$watch`}\n * method is used for tracking changes, and the equality check is based on object identity.\n * However, if an object literal or an array literal is passed as the binding expression, the\n * equality check is done by value (using the {@link angular.equals} function). It's also possible\n * to watch the evaluated value shallowly with {@link ng.$rootScope.Scope#$watchCollection\n * `$watchCollection`}: use `=*` or `=*attr` (`=*?` or `=*?attr` if the attribute is optional).\n *\n * * `&` or `&attr` - provides a way to execute an expression in the context of the parent scope. If\n * no `attr` name is specified then the attribute name is assumed to be the same as the local name.\n * Given `<my-component my-attr=\"count = count + value\">` and the isolate scope definition `scope: {\n * localFn:'&myAttr' }`, the isolate scope property `localFn` will point to a function wrapper for\n * the `count = count + value` expression. Often it's desirable to pass data from the isolated scope\n * via an expression to the parent scope. This can be done by passing a map of local variable names\n * and values into the expression wrapper fn. For example, if the expression is `increment(amount)`\n * then we can specify the amount value by calling the `localFn` as `localFn({amount: 22})`.\n *\n * In general it's possible to apply more than one directive to one element, but there might be limitations\n * depending on the type of scope required by the directives. The following points will help explain these limitations.\n * For simplicity only two directives are taken into account, but it is also applicable for several directives:\n *\n * * **no scope** + **no scope** => Two directives which don't require their own scope will use their parent's scope\n * * **child scope** + **no scope** => Both directives will share one single child scope\n * * **child scope** + **child scope** => Both directives will share one single child scope\n * * **isolated scope** + **no scope** => The isolated directive will use it's own created isolated scope. The other directive will use\n * its parent's scope\n * * **isolated scope** + **child scope** => **Won't work!** Only one scope can be related to one element. Therefore these directives cannot\n * be applied to the same element.\n * * **isolated scope** + **isolated scope** => **Won't work!** Only one scope can be related to one element. Therefore these directives\n * cannot be applied to the same element.\n *\n *\n * #### `bindToController`\n * This property is used to bind scope properties directly to the controller. It can be either\n * `true` or an object hash with the same format as the `scope` property. Additionally, a controller\n * alias must be set, either by using `controllerAs: 'myAlias'` or by specifying the alias in the controller\n * definition: `controller: 'myCtrl as myAlias'`.\n *\n * When an isolate scope is used for a directive (see above), `bindToController: true` will\n * allow a component to have its properties bound to the controller, rather than to scope. When the controller\n * is instantiated, the initial values of the isolate scope bindings are already available.\n *\n * It is also possible to set `bindToController` to an object hash with the same format as the `scope` property.\n * This will set up the scope bindings to the controller directly. Note that `scope` can still be used\n * to define which kind of scope is created. By default, no scope is created. Use `scope: {}` to create an isolate\n * scope (useful for component directives).\n *\n * If both `bindToController` and `scope` are defined and have object hashes, `bindToController` overrides `scope`.\n *\n *\n * #### `controller`\n * Controller constructor function. The controller is instantiated before the\n * pre-linking phase and can be accessed by other directives (see\n * `require` attribute). This allows the directives to communicate with each other and augment\n * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals:\n *\n * * `$scope` - Current scope associated with the element\n * * `$element` - Current element\n * * `$attrs` - Current attributes object for the element\n * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope:\n * `function([scope], cloneLinkingFn, futureParentElement)`.\n * * `scope`: optional argument to override the scope.\n * * `cloneLinkingFn`: optional argument to create clones of the original transcluded content.\n * * `futureParentElement`:\n * * defines the parent to which the `cloneLinkingFn` will add the cloned elements.\n * * default: `$element.parent()` resp. `$element` for `transclude:'element'` resp. `transclude:true`.\n * * only needed for transcludes that are allowed to contain non html elements (e.g. SVG elements)\n * and when the `cloneLinkinFn` is passed,\n * as those elements need to created and cloned in a special way when they are defined outside their\n * usual containers (e.g. like `<svg>`).\n * * See also the `directive.templateNamespace` property.\n *\n *\n * #### `require`\n * Require another directive and inject its controller as the fourth argument to the linking function. The\n * `require` takes a string name (or array of strings) of the directive(s) to pass in. If an array is used, the\n * injected argument will be an array in corresponding order. If no such directive can be\n * found, or if the directive does not have a controller, then an error is raised (unless no link function\n * is specified, in which case error checking is skipped). The name can be prefixed with:\n *\n * * (no prefix) - Locate the required controller on the current element. Throw an error if not found.\n * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.\n * * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found.\n * * `^^` - Locate the required controller by searching the element's parents. Throw an error if not found.\n * * `?^` - Attempt to locate the required controller by searching the element and its parents or pass\n * `null` to the `link` fn if not found.\n * * `?^^` - Attempt to locate the required controller by searching the element's parents, or pass\n * `null` to the `link` fn if not found.\n *\n *\n * #### `controllerAs`\n * Identifier name for a reference to the controller in the directive's scope.\n * This allows the controller to be referenced from the directive template. This is especially\n * useful when a directive is used as component, i.e. with an `isolate` scope. It's also possible\n * to use it in a directive without an `isolate` / `new` scope, but you need to be aware that the\n * `controllerAs` reference might overwrite a property that already exists on the parent scope.\n *\n *\n * #### `restrict`\n * String of subset of `EACM` which restricts the directive to a specific directive\n * declaration style. If omitted, the defaults (elements and attributes) are used.\n *\n * * `E` - Element name (default): `<my-directive></my-directive>`\n * * `A` - Attribute (default): `<div my-directive=\"exp\"></div>`\n * * `C` - Class: `<div class=\"my-directive: exp;\"></div>`\n * * `M` - Comment: `<!-- directive: my-directive exp -->`\n *\n *\n * #### `templateNamespace`\n * String representing the document type used by the markup in the template.\n * AngularJS needs this information as those elements need to be created and cloned\n * in a special way when they are defined outside their usual containers like `<svg>` and `<math>`.\n *\n * * `html` - All root nodes in the template are HTML. Root nodes may also be\n * top-level elements such as `<svg>` or `<math>`.\n * * `svg` - The root nodes in the template are SVG elements (excluding `<math>`).\n * * `math` - The root nodes in the template are MathML elements (excluding `<svg>`).\n *\n * If no `templateNamespace` is specified, then the namespace is considered to be `html`.\n *\n * #### `template`\n * HTML markup that may:\n * * Replace the contents of the directive's element (default).\n * * Replace the directive's element itself (if `replace` is true - DEPRECATED).\n * * Wrap the contents of the directive's element (if `transclude` is true).\n *\n * Value may be:\n *\n * * A string. For example `<div red-on-hover>{{delete_str}}</div>`.\n * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile`\n * function api below) and returns a string value.\n *\n *\n * #### `templateUrl`\n * This is similar to `template` but the template is loaded from the specified URL, asynchronously.\n *\n * Because template loading is asynchronous the compiler will suspend compilation of directives on that element\n * for later when the template has been resolved. In the meantime it will continue to compile and link\n * sibling and parent elements as though this element had not contained any directives.\n *\n * The compiler does not suspend the entire compilation to wait for templates to be loaded because this\n * would result in the whole app \"stalling\" until all templates are loaded asynchronously - even in the\n * case when only one deeply nested directive has `templateUrl`.\n *\n * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}\n *\n * You can specify `templateUrl` as a string representing the URL or as a function which takes two\n * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns\n * a string value representing the url. In either case, the template URL is passed through {@link\n * $sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.\n *\n *\n * #### `replace` ([*DEPRECATED*!], will be removed in next major release - i.e. v2.0)\n * specify what the template should replace. Defaults to `false`.\n *\n * * `true` - the template will replace the directive's element.\n * * `false` - the template will replace the contents of the directive's element.\n *\n * The replacement process migrates all of the attributes / classes from the old element to the new\n * one. See the {@link guide/directive#template-expanding-directive\n * Directives Guide} for an example.\n *\n * There are very few scenarios where element replacement is required for the application function,\n * the main one being reusable custom components that are used within SVG contexts\n * (because SVG doesn't work with custom elements in the DOM tree).\n *\n * #### `transclude`\n * Extract the contents of the element where the directive appears and make it available to the directive.\n * The contents are compiled and provided to the directive as a **transclusion function**. See the\n * {@link $compile#transclusion Transclusion} section below.\n *\n * There are two kinds of transclusion depending upon whether you want to transclude just the contents of the\n * directive's element or the entire element:\n *\n * * `true` - transclude the content (i.e. the child nodes) of the directive's element.\n * * `'element'` - transclude the whole of the directive's element including any directives on this\n * element that defined at a lower priority than this directive. When used, the `template`\n * property is ignored.\n *\n *\n * #### `compile`\n *\n * ```js\n * function compile(tElement, tAttrs, transclude) { ... }\n * ```\n *\n * The compile function deals with transforming the template DOM. Since most directives do not do\n * template transformation, it is not used often. The compile function takes the following arguments:\n *\n * * `tElement` - template element - The element where the directive has been declared. It is\n * safe to do template transformation on the element and child elements only.\n *\n * * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared\n * between all directive compile functions.\n *\n * * `transclude` - [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)`\n *\n * <div class=\"alert alert-warning\">\n * **Note:** The template instance and the link instance may be different objects if the template has\n * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that\n * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration\n * should be done in a linking function rather than in a compile function.\n * </div>\n\n * <div class=\"alert alert-warning\">\n * **Note:** The compile function cannot handle directives that recursively use themselves in their\n * own templates or compile functions. Compiling these directives results in an infinite loop and\n * stack overflow errors.\n *\n * This can be avoided by manually using $compile in the postLink function to imperatively compile\n * a directive's template instead of relying on automatic template compilation via `template` or\n * `templateUrl` declaration or manual compilation inside the compile function.\n * </div>\n *\n * <div class=\"alert alert-danger\">\n * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it\n * e.g. does not know about the right outer scope. Please use the transclude function that is passed\n * to the link function instead.\n * </div>\n\n * A compile function can have a return value which can be either a function or an object.\n *\n * * returning a (post-link) function - is equivalent to registering the linking function via the\n * `link` property of the config object when the compile function is empty.\n *\n * * returning an object with function(s) registered via `pre` and `post` properties - allows you to\n * control when a linking function should be called during the linking phase. See info about\n * pre-linking and post-linking functions below.\n *\n *\n * #### `link`\n * This property is used only if the `compile` property is not defined.\n *\n * ```js\n * function link(scope, iElement, iAttrs, controller, transcludeFn) { ... }\n * ```\n *\n * The link function is responsible for registering DOM listeners as well as updating the DOM. It is\n * executed after the template has been cloned. This is where most of the directive logic will be\n * put.\n *\n * * `scope` - {@link ng.$rootScope.Scope Scope} - The scope to be used by the\n * directive for registering {@link ng.$rootScope.Scope#$watch watches}.\n *\n * * `iElement` - instance element - The element where the directive is to be used. It is safe to\n * manipulate the children of the element only in `postLink` function since the children have\n * already been linked.\n *\n * * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared\n * between all directive linking functions.\n *\n * * `controller` - the directive's required controller instance(s) - Instances are shared\n * among all directives, which allows the directives to use the controllers as a communication\n * channel. The exact value depends on the directive's `require` property:\n * * no controller(s) required: the directive's own controller, or `undefined` if it doesn't have one\n * * `string`: the controller instance\n * * `array`: array of controller instances\n *\n * If a required controller cannot be found, and it is optional, the instance is `null`,\n * otherwise the {@link error:$compile:ctreq Missing Required Controller} error is thrown.\n *\n * Note that you can also require the directive's own controller - it will be made available like\n * any other controller.\n *\n * * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.\n * This is the same as the `$transclude`\n * parameter of directive controllers, see there for details.\n * `function([scope], cloneLinkingFn, futureParentElement)`.\n *\n * #### Pre-linking function\n *\n * Executed before the child elements are linked. Not safe to do DOM transformation since the\n * compiler linking function will fail to locate the correct elements for linking.\n *\n * #### Post-linking function\n *\n * Executed after the child elements are linked.\n *\n * Note that child elements that contain `templateUrl` directives will not have been compiled\n * and linked since they are waiting for their template to load asynchronously and their own\n * compilation and linking has been suspended until that occurs.\n *\n * It is safe to do DOM transformation in the post-linking function on elements that are not waiting\n * for their async templates to be resolved.\n *\n *\n * ### Transclusion\n *\n * Transclusion is the process of extracting a collection of DOM elements from one part of the DOM and\n * copying them to another part of the DOM, while maintaining their connection to the original AngularJS\n * scope from where they were taken.\n *\n * Transclusion is used (often with {@link ngTransclude}) to insert the\n * original contents of a directive's element into a specified place in the template of the directive.\n * The benefit of transclusion, over simply moving the DOM elements manually, is that the transcluded\n * content has access to the properties on the scope from which it was taken, even if the directive\n * has isolated scope.\n * See the {@link guide/directive#creating-a-directive-that-wraps-other-elements Directives Guide}.\n *\n * This makes it possible for the widget to have private state for its template, while the transcluded\n * content has access to its originating scope.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** When testing an element transclude directive you must not place the directive at the root of the\n * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives\n * Testing Transclusion Directives}.\n * </div>\n *\n * #### Transclusion Functions\n *\n * When a directive requests transclusion, the compiler extracts its contents and provides a **transclusion\n * function** to the directive's `link` function and `controller`. This transclusion function is a special\n * **linking function** that will return the compiled contents linked to a new transclusion scope.\n *\n * <div class=\"alert alert-info\">\n * If you are just using {@link ngTransclude} then you don't need to worry about this function, since\n * ngTransclude will deal with it for us.\n * </div>\n *\n * If you want to manually control the insertion and removal of the transcluded content in your directive\n * then you must use this transclude function. When you call a transclude function it returns a a jqLite/JQuery\n * object that contains the compiled DOM, which is linked to the correct transclusion scope.\n *\n * When you call a transclusion function you can pass in a **clone attach function**. This function accepts\n * two parameters, `function(clone, scope) { ... }`, where the `clone` is a fresh compiled copy of your transcluded\n * content and the `scope` is the newly created transclusion scope, to which the clone is bound.\n *\n * <div class=\"alert alert-info\">\n * **Best Practice**: Always provide a `cloneFn` (clone attach function) when you call a translude function\n * since you then get a fresh clone of the original DOM and also have access to the new transclusion scope.\n * </div>\n *\n * It is normal practice to attach your transcluded content (`clone`) to the DOM inside your **clone\n * attach function**:\n *\n * ```js\n * var transcludedContent, transclusionScope;\n *\n * $transclude(function(clone, scope) {\n * element.append(clone);\n * transcludedContent = clone;\n * transclusionScope = scope;\n * });\n * ```\n *\n * Later, if you want to remove the transcluded content from your DOM then you should also destroy the\n * associated transclusion scope:\n *\n * ```js\n * transcludedContent.remove();\n * transclusionScope.$destroy();\n * ```\n *\n * <div class=\"alert alert-info\">\n * **Best Practice**: if you intend to add and remove transcluded content manually in your directive\n * (by calling the transclude function to get the DOM and calling `element.remove()` to remove it),\n * then you are also responsible for calling `$destroy` on the transclusion scope.\n * </div>\n *\n * The built-in DOM manipulation directives, such as {@link ngIf}, {@link ngSwitch} and {@link ngRepeat}\n * automatically destroy their transluded clones as necessary so you do not need to worry about this if\n * you are simply using {@link ngTransclude} to inject the transclusion into your directive.\n *\n *\n * #### Transclusion Scopes\n *\n * When you call a transclude function it returns a DOM fragment that is pre-bound to a **transclusion\n * scope**. This scope is special, in that it is a child of the directive's scope (and so gets destroyed\n * when the directive's scope gets destroyed) but it inherits the properties of the scope from which it\n * was taken.\n *\n * For example consider a directive that uses transclusion and isolated scope. The DOM hierarchy might look\n * like this:\n *\n * ```html\n * <div ng-app>\n * <div isolate>\n * <div transclusion>\n * </div>\n * </div>\n * </div>\n * ```\n *\n * The `$parent` scope hierarchy will look like this:\n *\n ```\n - $rootScope\n - isolate\n - transclusion\n ```\n *\n * but the scopes will inherit prototypically from different scopes to their `$parent`.\n *\n ```\n - $rootScope\n - transclusion\n - isolate\n ```\n *\n *\n * ### Attributes\n *\n * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the\n * `link()` or `compile()` functions. It has a variety of uses.\n *\n * * *Accessing normalized attribute names:* Directives like 'ngBind' can be expressed in many ways:\n * 'ng:bind', `data-ng-bind`, or 'x-ng-bind'. The attributes object allows for normalized access\n * to the attributes.\n *\n * * *Directive inter-communication:* All directives share the same instance of the attributes\n * object which allows the directives to use the attributes object as inter directive\n * communication.\n *\n * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object\n * allowing other directives to read the interpolated value.\n *\n * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes\n * that contain interpolation (e.g. `src=\"{{bar}}\"`). Not only is this very efficient but it's also\n * the only way to easily get the actual value because during the linking phase the interpolation\n * hasn't been evaluated yet and so the value is at this time set to `undefined`.\n *\n * ```js\n * function linkingFn(scope, elm, attrs, ctrl) {\n * // get the attribute value\n * console.log(attrs.ngModel);\n *\n * // change the attribute\n * attrs.$set('ngModel', 'new value');\n *\n * // observe changes to interpolated attribute\n * attrs.$observe('ngModel', function(value) {\n * console.log('ngModel has changed value to ' + value);\n * });\n * }\n * ```\n *\n * ## Example\n *\n * <div class=\"alert alert-warning\">\n * **Note**: Typically directives are registered with `module.directive`. The example below is\n * to illustrate how `$compile` works.\n * </div>\n *\n <example module=\"compileExample\">\n <file name=\"index.html\">\n <script>\n angular.module('compileExample', [], function($compileProvider) {\n // configure new 'compile' directive by passing a directive\n // factory function. The factory function injects the '$compile'\n $compileProvider.directive('compile', function($compile) {\n // directive factory creates a link function\n return function(scope, element, attrs) {\n scope.$watch(\n function(scope) {\n // watch the 'compile' expression for changes\n return scope.$eval(attrs.compile);\n },\n function(value) {\n // when the 'compile' expression changes\n // assign it into the current DOM\n element.html(value);\n\n // compile the new DOM and link it to the current\n // scope.\n // NOTE: we only compile .childNodes so that\n // we don't get into infinite loop compiling ourselves\n $compile(element.contents())(scope);\n }\n );\n };\n });\n })\n .controller('GreeterController', ['$scope', function($scope) {\n $scope.name = 'Angular';\n $scope.html = 'Hello {{name}}';\n }]);\n </script>\n <div ng-controller=\"GreeterController\">\n <input ng-model=\"name\"> <br/>\n <textarea ng-model=\"html\"></textarea> <br/>\n <div compile=\"html\"></div>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should auto compile', function() {\n var textarea = $('textarea');\n var output = $('div[compile]');\n // The initial state reads 'Hello Angular'.\n expect(output.getText()).toBe('Hello Angular');\n textarea.clear();\n textarea.sendKeys('{{name}}!');\n expect(output.getText()).toBe('Angular!');\n });\n </file>\n </example>\n\n *\n *\n * @param {string|DOMElement} element Element or HTML string to compile into a template function.\n * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives - DEPRECATED.\n *\n * <div class=\"alert alert-danger\">\n * **Note:** Passing a `transclude` function to the $compile function is deprecated, as it\n * e.g. will not use the right outer scope. Please pass the transclude function as a\n * `parentBoundTranscludeFn` to the link function instead.\n * </div>\n *\n * @param {number} maxPriority only apply directives lower than given priority (Only effects the\n * root element(s), not their children)\n * @returns {function(scope, cloneAttachFn=, options=)} a link function which is used to bind template\n * (a DOM element/tree) to a scope. Where:\n *\n * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.\n * * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the\n * `template` and call the `cloneAttachFn` function allowing the caller to attach the\n * cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is\n * called as: <br/> `cloneAttachFn(clonedElement, scope)` where:\n *\n * * `clonedElement` - is a clone of the original `element` passed into the compiler.\n * * `scope` - is the current scope with which the linking function is working with.\n *\n * * `options` - An optional object hash with linking options. If `options` is provided, then the following\n * keys may be used to control linking behavior:\n *\n * * `parentBoundTranscludeFn` - the transclude function made available to\n * directives; if given, it will be passed through to the link functions of\n * directives found in `element` during compilation.\n * * `transcludeControllers` - an object hash with keys that map controller names\n * to a hash with the key `instance`, which maps to the controller instance;\n * if given, it will make the controllers available to directives on the compileNode:\n * ```\n * {\n * parent: {\n * instance: parentControllerInstance\n * }\n * }\n * ```\n * * `futureParentElement` - defines the parent to which the `cloneAttachFn` will add\n * the cloned elements; only needed for transcludes that are allowed to contain non html\n * elements (e.g. SVG elements). See also the directive.controller property.\n *\n * Calling the linking function returns the element of the template. It is either the original\n * element passed in, or the clone of the element if the `cloneAttachFn` is provided.\n *\n * After linking the view is not updated until after a call to $digest which typically is done by\n * Angular automatically.\n *\n * If you need access to the bound view, there are two ways to do it:\n *\n * - If you are not asking the linking function to clone the template, create the DOM element(s)\n * before you send them to the compiler and keep this reference around.\n * ```js\n * var element = $compile('<p>{{total}}</p>')(scope);\n * ```\n *\n * - if on the other hand, you need the element to be cloned, the view reference from the original\n * example would not point to the clone, but rather to the original template that was cloned. In\n * this case, you can access the clone via the cloneAttachFn:\n * ```js\n * var templateElement = angular.element('<p>{{total}}</p>'),\n * scope = ....;\n *\n * var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {\n * //attach the clone to DOM document at the right place\n * });\n *\n * //now we have reference to the cloned DOM via `clonedElement`\n * ```\n *\n *\n * For information on how the compiler works, see the\n * {@link guide/compiler Angular HTML Compiler} section of the Developer Guide.\n */\n\nvar $compileMinErr = minErr('$compile');\n\n/**\n * @ngdoc provider\n * @name $compileProvider\n *\n * @description\n */\n$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];\nfunction $CompileProvider($provide, $$sanitizeUriProvider) {\n var hasDirectives = {},\n Suffix = 'Directive',\n COMMENT_DIRECTIVE_REGEXP = /^\\s*directive\\:\\s*([\\w\\-]+)\\s+(.*)$/,\n CLASS_DIRECTIVE_REGEXP = /(([\\w\\-]+)(?:\\:([^;]+))?;?)/,\n ALL_OR_NOTHING_ATTRS = makeMap('ngSrc,ngSrcset,src,srcset'),\n REQUIRE_PREFIX_REGEXP = /^(?:(\\^\\^?)?(\\?)?(\\^\\^?)?)?/;\n\n // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes\n // The assumption is that future DOM event attribute names will begin with\n // 'on' and be composed of only English letters.\n var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;\n var bindingCache = createMap();\n\n function parseIsolateBindings(scope, directiveName, isController) {\n var LOCAL_REGEXP = /^\\s*([@&]|=(\\*?))(\\??)\\s*(\\w*)\\s*$/;\n\n var bindings = createMap();\n\n forEach(scope, function(definition, scopeName) {\n if (definition in bindingCache) {\n bindings[scopeName] = bindingCache[definition];\n return;\n }\n var match = definition.match(LOCAL_REGEXP);\n\n if (!match) {\n throw $compileMinErr('iscp',\n \"Invalid {3} for directive '{0}'.\" +\n \" Definition: {... {1}: '{2}' ...}\",\n directiveName, scopeName, definition,\n (isController ? \"controller bindings definition\" :\n \"isolate scope definition\"));\n }\n\n bindings[scopeName] = {\n mode: match[1][0],\n collection: match[2] === '*',\n optional: match[3] === '?',\n attrName: match[4] || scopeName\n };\n if (match[4]) {\n bindingCache[definition] = bindings[scopeName];\n }\n });\n\n return bindings;\n }\n\n function parseDirectiveBindings(directive, directiveName) {\n var bindings = {\n isolateScope: null,\n bindToController: null\n };\n if (isObject(directive.scope)) {\n if (directive.bindToController === true) {\n bindings.bindToController = parseIsolateBindings(directive.scope,\n directiveName, true);\n bindings.isolateScope = {};\n } else {\n bindings.isolateScope = parseIsolateBindings(directive.scope,\n directiveName, false);\n }\n }\n if (isObject(directive.bindToController)) {\n bindings.bindToController =\n parseIsolateBindings(directive.bindToController, directiveName, true);\n }\n if (isObject(bindings.bindToController)) {\n var controller = directive.controller;\n var controllerAs = directive.controllerAs;\n if (!controller) {\n // There is no controller, there may or may not be a controllerAs property\n throw $compileMinErr('noctrl',\n \"Cannot bind to controller without directive '{0}'s controller.\",\n directiveName);\n } else if (!identifierForController(controller, controllerAs)) {\n // There is a controller, but no identifier or controllerAs property\n throw $compileMinErr('noident',\n \"Cannot bind to controller without identifier for directive '{0}'.\",\n directiveName);\n }\n }\n return bindings;\n }\n\n function assertValidDirectiveName(name) {\n var letter = name.charAt(0);\n if (!letter || letter !== lowercase(letter)) {\n throw $compileMinErr('baddir', \"Directive name '{0}' is invalid. The first character must be a lowercase letter\", name);\n }\n if (name !== name.trim()) {\n throw $compileMinErr('baddir',\n \"Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces\",\n name);\n }\n }\n\n /**\n * @ngdoc method\n * @name $compileProvider#directive\n * @kind function\n *\n * @description\n * Register a new directive with the compiler.\n *\n * @param {string|Object} name Name of the directive in camel-case (i.e. <code>ngBind</code> which\n * will match as <code>ng-bind</code>), or an object map of directives where the keys are the\n * names and the values are the factories.\n * @param {Function|Array} directiveFactory An injectable directive factory function. See\n * {@link guide/directive} for more info.\n * @returns {ng.$compileProvider} Self for chaining.\n */\n this.directive = function registerDirective(name, directiveFactory) {\n assertNotHasOwnProperty(name, 'directive');\n if (isString(name)) {\n assertValidDirectiveName(name);\n assertArg(directiveFactory, 'directiveFactory');\n if (!hasDirectives.hasOwnProperty(name)) {\n hasDirectives[name] = [];\n $provide.factory(name + Suffix, ['$injector', '$exceptionHandler',\n function($injector, $exceptionHandler) {\n var directives = [];\n forEach(hasDirectives[name], function(directiveFactory, index) {\n try {\n var directive = $injector.invoke(directiveFactory);\n if (isFunction(directive)) {\n directive = { compile: valueFn(directive) };\n } else if (!directive.compile && directive.link) {\n directive.compile = valueFn(directive.link);\n }\n directive.priority = directive.priority || 0;\n directive.index = index;\n directive.name = directive.name || name;\n directive.require = directive.require || (directive.controller && directive.name);\n directive.restrict = directive.restrict || 'EA';\n directive.$$moduleName = directiveFactory.$$moduleName;\n directives.push(directive);\n } catch (e) {\n $exceptionHandler(e);\n }\n });\n return directives;\n }]);\n }\n hasDirectives[name].push(directiveFactory);\n } else {\n forEach(name, reverseParams(registerDirective));\n }\n return this;\n };\n\n\n /**\n * @ngdoc method\n * @name $compileProvider#aHrefSanitizationWhitelist\n * @kind function\n *\n * @description\n * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n * urls during a[href] sanitization.\n *\n * The sanitization is a security measure aimed at preventing XSS attacks via html links.\n *\n * Any url about to be assigned to a[href] via data-binding is first normalized and turned into\n * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`\n * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n *\n * @param {RegExp=} regexp New regexp to whitelist urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.aHrefSanitizationWhitelist = function(regexp) {\n if (isDefined(regexp)) {\n $$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp);\n return this;\n } else {\n return $$sanitizeUriProvider.aHrefSanitizationWhitelist();\n }\n };\n\n\n /**\n * @ngdoc method\n * @name $compileProvider#imgSrcSanitizationWhitelist\n * @kind function\n *\n * @description\n * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n * urls during img[src] sanitization.\n *\n * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n *\n * Any url about to be assigned to img[src] via data-binding is first normalized and turned into\n * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`\n * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n *\n * @param {RegExp=} regexp New regexp to whitelist urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.imgSrcSanitizationWhitelist = function(regexp) {\n if (isDefined(regexp)) {\n $$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp);\n return this;\n } else {\n return $$sanitizeUriProvider.imgSrcSanitizationWhitelist();\n }\n };\n\n /**\n * @ngdoc method\n * @name $compileProvider#debugInfoEnabled\n *\n * @param {boolean=} enabled update the debugInfoEnabled state if provided, otherwise just return the\n * current debugInfoEnabled state\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n *\n * @kind function\n *\n * @description\n * Call this method to enable/disable various debug runtime information in the compiler such as adding\n * binding information and a reference to the current scope on to DOM elements.\n * If enabled, the compiler will add the following to DOM elements that have been bound to the scope\n * * `ng-binding` CSS class\n * * `$binding` data property containing an array of the binding expressions\n *\n * You may want to disable this in production for a significant performance boost. See\n * {@link guide/production#disabling-debug-data Disabling Debug Data} for more.\n *\n * The default value is true.\n */\n var debugInfoEnabled = true;\n this.debugInfoEnabled = function(enabled) {\n if (isDefined(enabled)) {\n debugInfoEnabled = enabled;\n return this;\n }\n return debugInfoEnabled;\n };\n\n this.$get = [\n '$injector', '$interpolate', '$exceptionHandler', '$templateRequest', '$parse',\n '$controller', '$rootScope', '$sce', '$animate', '$$sanitizeUri',\n function($injector, $interpolate, $exceptionHandler, $templateRequest, $parse,\n $controller, $rootScope, $sce, $animate, $$sanitizeUri) {\n\n var Attributes = function(element, attributesToCopy) {\n if (attributesToCopy) {\n var keys = Object.keys(attributesToCopy);\n var i, l, key;\n\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n this[key] = attributesToCopy[key];\n }\n } else {\n this.$attr = {};\n }\n\n this.$$element = element;\n };\n\n Attributes.prototype = {\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$normalize\n * @kind function\n *\n * @description\n * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with `x-` or\n * `data-`) to its normalized, camelCase form.\n *\n * Also there is special case for Moz prefix starting with upper case letter.\n *\n * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives}\n *\n * @param {string} name Name to normalize\n */\n $normalize: directiveNormalize,\n\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$addClass\n * @kind function\n *\n * @description\n * Adds the CSS class value specified by the classVal parameter to the element. If animations\n * are enabled then an animation will be triggered for the class addition.\n *\n * @param {string} classVal The className value that will be added to the element\n */\n $addClass: function(classVal) {\n if (classVal && classVal.length > 0) {\n $animate.addClass(this.$$element, classVal);\n }\n },\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$removeClass\n * @kind function\n *\n * @description\n * Removes the CSS class value specified by the classVal parameter from the element. If\n * animations are enabled then an animation will be triggered for the class removal.\n *\n * @param {string} classVal The className value that will be removed from the element\n */\n $removeClass: function(classVal) {\n if (classVal && classVal.length > 0) {\n $animate.removeClass(this.$$element, classVal);\n }\n },\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$updateClass\n * @kind function\n *\n * @description\n * Adds and removes the appropriate CSS class values to the element based on the difference\n * between the new and old CSS class values (specified as newClasses and oldClasses).\n *\n * @param {string} newClasses The current CSS className value\n * @param {string} oldClasses The former CSS className value\n */\n $updateClass: function(newClasses, oldClasses) {\n var toAdd = tokenDifference(newClasses, oldClasses);\n if (toAdd && toAdd.length) {\n $animate.addClass(this.$$element, toAdd);\n }\n\n var toRemove = tokenDifference(oldClasses, newClasses);\n if (toRemove && toRemove.length) {\n $animate.removeClass(this.$$element, toRemove);\n }\n },\n\n /**\n * Set a normalized attribute on the element in a way such that all directives\n * can share the attribute. This function properly handles boolean attributes.\n * @param {string} key Normalized key. (ie ngAttribute)\n * @param {string|boolean} value The value to set. If `null` attribute will be deleted.\n * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute.\n * Defaults to true.\n * @param {string=} attrName Optional none normalized name. Defaults to key.\n */\n $set: function(key, value, writeAttr, attrName) {\n // TODO: decide whether or not to throw an error if \"class\"\n //is set through this function since it may cause $updateClass to\n //become unstable.\n\n var node = this.$$element[0],\n booleanKey = getBooleanAttrName(node, key),\n aliasedKey = getAliasedAttrName(key),\n observer = key,\n nodeName;\n\n if (booleanKey) {\n this.$$element.prop(key, value);\n attrName = booleanKey;\n } else if (aliasedKey) {\n this[aliasedKey] = value;\n observer = aliasedKey;\n }\n\n this[key] = value;\n\n // translate normalized key to actual key\n if (attrName) {\n this.$attr[key] = attrName;\n } else {\n attrName = this.$attr[key];\n if (!attrName) {\n this.$attr[key] = attrName = snake_case(key, '-');\n }\n }\n\n nodeName = nodeName_(this.$$element);\n\n if ((nodeName === 'a' && key === 'href') ||\n (nodeName === 'img' && key === 'src')) {\n // sanitize a[href] and img[src] values\n this[key] = value = $$sanitizeUri(value, key === 'src');\n } else if (nodeName === 'img' && key === 'srcset' && isDefined(value)) {\n // sanitize img[srcset] values\n var result = \"\";\n\n // first check if there are spaces because it's not the same pattern\n var trimmedSrcset = trim(value);\n // ( 999x ,| 999w ,| ,|, )\n var srcPattern = /(\\s+\\d+x\\s*,|\\s+\\d+w\\s*,|\\s+,|,\\s+)/;\n var pattern = /\\s/.test(trimmedSrcset) ? srcPattern : /(,)/;\n\n // split srcset into tuple of uri and descriptor except for the last item\n var rawUris = trimmedSrcset.split(pattern);\n\n // for each tuples\n var nbrUrisWith2parts = Math.floor(rawUris.length / 2);\n for (var i = 0; i < nbrUrisWith2parts; i++) {\n var innerIdx = i * 2;\n // sanitize the uri\n result += $$sanitizeUri(trim(rawUris[innerIdx]), true);\n // add the descriptor\n result += (\" \" + trim(rawUris[innerIdx + 1]));\n }\n\n // split the last item into uri and descriptor\n var lastTuple = trim(rawUris[i * 2]).split(/\\s/);\n\n // sanitize the last uri\n result += $$sanitizeUri(trim(lastTuple[0]), true);\n\n // and add the last descriptor if any\n if (lastTuple.length === 2) {\n result += (\" \" + trim(lastTuple[1]));\n }\n this[key] = value = result;\n }\n\n if (writeAttr !== false) {\n if (value === null || isUndefined(value)) {\n this.$$element.removeAttr(attrName);\n } else {\n this.$$element.attr(attrName, value);\n }\n }\n\n // fire observers\n var $$observers = this.$$observers;\n $$observers && forEach($$observers[observer], function(fn) {\n try {\n fn(value);\n } catch (e) {\n $exceptionHandler(e);\n }\n });\n },\n\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$observe\n * @kind function\n *\n * @description\n * Observes an interpolated attribute.\n *\n * The observer function will be invoked once during the next `$digest` following\n * compilation. The observer is then invoked whenever the interpolated value\n * changes.\n *\n * @param {string} key Normalized key. (ie ngAttribute) .\n * @param {function(interpolatedValue)} fn Function that will be called whenever\n the interpolated value of the attribute changes.\n * See the {@link guide/interpolation#how-text-and-attribute-bindings-work Interpolation\n * guide} for more info.\n * @returns {function()} Returns a deregistration function for this observer.\n */\n $observe: function(key, fn) {\n var attrs = this,\n $$observers = (attrs.$$observers || (attrs.$$observers = createMap())),\n listeners = ($$observers[key] || ($$observers[key] = []));\n\n listeners.push(fn);\n $rootScope.$evalAsync(function() {\n if (!listeners.$$inter && attrs.hasOwnProperty(key) && !isUndefined(attrs[key])) {\n // no one registered attribute interpolation function, so lets call it manually\n fn(attrs[key]);\n }\n });\n\n return function() {\n arrayRemove(listeners, fn);\n };\n }\n };\n\n\n function safeAddClass($element, className) {\n try {\n $element.addClass(className);\n } catch (e) {\n // ignore, since it means that we are trying to set class on\n // SVG element, where class name is read-only.\n }\n }\n\n\n var startSymbol = $interpolate.startSymbol(),\n endSymbol = $interpolate.endSymbol(),\n denormalizeTemplate = (startSymbol == '{{' && endSymbol == '}}')\n ? identity\n : function denormalizeTemplate(template) {\n return template.replace(/\\{\\{/g, startSymbol).replace(/}}/g, endSymbol);\n },\n NG_ATTR_BINDING = /^ngAttr[A-Z]/;\n var MULTI_ELEMENT_DIR_RE = /^(.+)Start$/;\n\n compile.$$addBindingInfo = debugInfoEnabled ? function $$addBindingInfo($element, binding) {\n var bindings = $element.data('$binding') || [];\n\n if (isArray(binding)) {\n bindings = bindings.concat(binding);\n } else {\n bindings.push(binding);\n }\n\n $element.data('$binding', bindings);\n } : noop;\n\n compile.$$addBindingClass = debugInfoEnabled ? function $$addBindingClass($element) {\n safeAddClass($element, 'ng-binding');\n } : noop;\n\n compile.$$addScopeInfo = debugInfoEnabled ? function $$addScopeInfo($element, scope, isolated, noTemplate) {\n var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope';\n $element.data(dataName, scope);\n } : noop;\n\n compile.$$addScopeClass = debugInfoEnabled ? function $$addScopeClass($element, isolated) {\n safeAddClass($element, isolated ? 'ng-isolate-scope' : 'ng-scope');\n } : noop;\n\n return compile;\n\n //================================\n\n function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective,\n previousCompileContext) {\n if (!($compileNodes instanceof jqLite)) {\n // jquery always rewraps, whereas we need to preserve the original selector so that we can\n // modify it.\n $compileNodes = jqLite($compileNodes);\n }\n\n var NOT_EMPTY = /\\S+/;\n\n // We can not compile top level text elements since text nodes can be merged and we will\n // not be able to attach scope data to them, so we will wrap them in <span>\n for (var i = 0, len = $compileNodes.length; i < len; i++) {\n var domNode = $compileNodes[i];\n\n if (domNode.nodeType === NODE_TYPE_TEXT && domNode.nodeValue.match(NOT_EMPTY) /* non-empty */) {\n jqLiteWrapNode(domNode, $compileNodes[i] = document.createElement('span'));\n }\n }\n\n var compositeLinkFn =\n compileNodes($compileNodes, transcludeFn, $compileNodes,\n maxPriority, ignoreDirective, previousCompileContext);\n compile.$$addScopeClass($compileNodes);\n var namespace = null;\n return function publicLinkFn(scope, cloneConnectFn, options) {\n assertArg(scope, 'scope');\n\n if (previousCompileContext && previousCompileContext.needsNewScope) {\n // A parent directive did a replace and a directive on this element asked\n // for transclusion, which caused us to lose a layer of element on which\n // we could hold the new transclusion scope, so we will create it manually\n // here.\n scope = scope.$parent.$new();\n }\n\n options = options || {};\n var parentBoundTranscludeFn = options.parentBoundTranscludeFn,\n transcludeControllers = options.transcludeControllers,\n futureParentElement = options.futureParentElement;\n\n // When `parentBoundTranscludeFn` is passed, it is a\n // `controllersBoundTransclude` function (it was previously passed\n // as `transclude` to directive.link) so we must unwrap it to get\n // its `boundTranscludeFn`\n if (parentBoundTranscludeFn && parentBoundTranscludeFn.$$boundTransclude) {\n parentBoundTranscludeFn = parentBoundTranscludeFn.$$boundTransclude;\n }\n\n if (!namespace) {\n namespace = detectNamespaceForChildElements(futureParentElement);\n }\n var $linkNode;\n if (namespace !== 'html') {\n // When using a directive with replace:true and templateUrl the $compileNodes\n // (or a child element inside of them)\n // might change, so we need to recreate the namespace adapted compileNodes\n // for call to the link function.\n // Note: This will already clone the nodes...\n $linkNode = jqLite(\n wrapTemplate(namespace, jqLite('<div>').append($compileNodes).html())\n );\n } else if (cloneConnectFn) {\n // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart\n // and sometimes changes the structure of the DOM.\n $linkNode = JQLitePrototype.clone.call($compileNodes);\n } else {\n $linkNode = $compileNodes;\n }\n\n if (transcludeControllers) {\n for (var controllerName in transcludeControllers) {\n $linkNode.data('$' + controllerName + 'Controller', transcludeControllers[controllerName].instance);\n }\n }\n\n compile.$$addScopeInfo($linkNode, scope);\n\n if (cloneConnectFn) cloneConnectFn($linkNode, scope);\n if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn);\n return $linkNode;\n };\n }\n\n function detectNamespaceForChildElements(parentElement) {\n // TODO: Make this detect MathML as well...\n var node = parentElement && parentElement[0];\n if (!node) {\n return 'html';\n } else {\n return nodeName_(node) !== 'foreignobject' && node.toString().match(/SVG/) ? 'svg' : 'html';\n }\n }\n\n /**\n * Compile function matches each node in nodeList against the directives. Once all directives\n * for a particular node are collected their compile functions are executed. The compile\n * functions return values - the linking functions - are combined into a composite linking\n * function, which is the a linking function for the node.\n *\n * @param {NodeList} nodeList an array of nodes or NodeList to compile\n * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n * scope argument is auto-generated to the new child of the transcluded parent scope.\n * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then\n * the rootElement must be set the jqLite collection of the compile root. This is\n * needed so that the jqLite collection items can be replaced with widgets.\n * @param {number=} maxPriority Max directive priority.\n * @returns {Function} A composite linking function of all of the matched directives or null.\n */\n function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,\n previousCompileContext) {\n var linkFns = [],\n attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound, nodeLinkFnFound;\n\n for (var i = 0; i < nodeList.length; i++) {\n attrs = new Attributes();\n\n // we must always refer to nodeList[i] since the nodes can be replaced underneath us.\n directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined,\n ignoreDirective);\n\n nodeLinkFn = (directives.length)\n ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement,\n null, [], [], previousCompileContext)\n : null;\n\n if (nodeLinkFn && nodeLinkFn.scope) {\n compile.$$addScopeClass(attrs.$$element);\n }\n\n childLinkFn = (nodeLinkFn && nodeLinkFn.terminal ||\n !(childNodes = nodeList[i].childNodes) ||\n !childNodes.length)\n ? null\n : compileNodes(childNodes,\n nodeLinkFn ? (\n (nodeLinkFn.transcludeOnThisElement || !nodeLinkFn.templateOnThisElement)\n && nodeLinkFn.transclude) : transcludeFn);\n\n if (nodeLinkFn || childLinkFn) {\n linkFns.push(i, nodeLinkFn, childLinkFn);\n linkFnFound = true;\n nodeLinkFnFound = nodeLinkFnFound || nodeLinkFn;\n }\n\n //use the previous context only for the first element in the virtual group\n previousCompileContext = null;\n }\n\n // return a linking function if we have found anything, null otherwise\n return linkFnFound ? compositeLinkFn : null;\n\n function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) {\n var nodeLinkFn, childLinkFn, node, childScope, i, ii, idx, childBoundTranscludeFn;\n var stableNodeList;\n\n\n if (nodeLinkFnFound) {\n // copy nodeList so that if a nodeLinkFn removes or adds an element at this DOM level our\n // offsets don't get screwed up\n var nodeListLength = nodeList.length;\n stableNodeList = new Array(nodeListLength);\n\n // create a sparse array by only copying the elements which have a linkFn\n for (i = 0; i < linkFns.length; i+=3) {\n idx = linkFns[i];\n stableNodeList[idx] = nodeList[idx];\n }\n } else {\n stableNodeList = nodeList;\n }\n\n for (i = 0, ii = linkFns.length; i < ii;) {\n node = stableNodeList[linkFns[i++]];\n nodeLinkFn = linkFns[i++];\n childLinkFn = linkFns[i++];\n\n if (nodeLinkFn) {\n if (nodeLinkFn.scope) {\n childScope = scope.$new();\n compile.$$addScopeInfo(jqLite(node), childScope);\n } else {\n childScope = scope;\n }\n\n if (nodeLinkFn.transcludeOnThisElement) {\n childBoundTranscludeFn = createBoundTranscludeFn(\n scope, nodeLinkFn.transclude, parentBoundTranscludeFn);\n\n } else if (!nodeLinkFn.templateOnThisElement && parentBoundTranscludeFn) {\n childBoundTranscludeFn = parentBoundTranscludeFn;\n\n } else if (!parentBoundTranscludeFn && transcludeFn) {\n childBoundTranscludeFn = createBoundTranscludeFn(scope, transcludeFn);\n\n } else {\n childBoundTranscludeFn = null;\n }\n\n nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn);\n\n } else if (childLinkFn) {\n childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn);\n }\n }\n }\n }\n\n function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {\n\n var boundTranscludeFn = function(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) {\n\n if (!transcludedScope) {\n transcludedScope = scope.$new(false, containingScope);\n transcludedScope.$$transcluded = true;\n }\n\n return transcludeFn(transcludedScope, cloneFn, {\n parentBoundTranscludeFn: previousBoundTranscludeFn,\n transcludeControllers: controllers,\n futureParentElement: futureParentElement\n });\n };\n\n return boundTranscludeFn;\n }\n\n /**\n * Looks for directives on the given node and adds them to the directive collection which is\n * sorted.\n *\n * @param node Node to search.\n * @param directives An array to which the directives are added to. This array is sorted before\n * the function returns.\n * @param attrs The shared attrs object which is used to populate the normalized attributes.\n * @param {number=} maxPriority Max directive priority.\n */\n function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) {\n var nodeType = node.nodeType,\n attrsMap = attrs.$attr,\n match,\n nodeName,\n className;\n\n switch (nodeType) {\n case NODE_TYPE_ELEMENT: /* Element */\n\n nodeName = nodeName_(node);\n\n // use the node name: <directive>\n addDirective(directives,\n directiveNormalize(nodeName), 'E', maxPriority, ignoreDirective);\n\n // iterate over the attributes\n for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes,\n j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) {\n var attrStartName = false;\n var attrEndName = false;\n\n attr = nAttrs[j];\n name = attr.name;\n value = trim(attr.value);\n\n // support ngAttr attribute binding\n ngAttrName = directiveNormalize(name);\n if (isNgAttr = NG_ATTR_BINDING.test(ngAttrName)) {\n name = name.replace(PREFIX_REGEXP, '')\n .substr(8).replace(/_(.)/g, function(match, letter) {\n return letter.toUpperCase();\n });\n }\n\n var multiElementMatch = ngAttrName.match(MULTI_ELEMENT_DIR_RE);\n if (multiElementMatch && directiveIsMultiElement(multiElementMatch[1])) {\n attrStartName = name;\n attrEndName = name.substr(0, name.length - 5) + 'end';\n name = name.substr(0, name.length - 6);\n }\n\n nName = directiveNormalize(name.toLowerCase());\n attrsMap[nName] = name;\n if (isNgAttr || !attrs.hasOwnProperty(nName)) {\n attrs[nName] = value;\n if (getBooleanAttrName(node, nName)) {\n attrs[nName] = true; // presence means true\n }\n }\n addAttrInterpolateDirective(node, directives, value, nName, isNgAttr);\n addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,\n attrEndName);\n }\n\n if (nodeName === 'input' && node.getAttribute('type') === 'hidden') {\n // Hidden input elements can have strange behaviour when navigating back to the page\n // This tells the browser not to try to cache and reinstate previous values\n node.setAttribute('autocomplete', 'off');\n }\n\n // use class as directive\n className = node.className;\n if (isObject(className)) {\n // Maybe SVGAnimatedString\n className = className.animVal;\n }\n if (isString(className) && className !== '') {\n while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {\n nName = directiveNormalize(match[2]);\n if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) {\n attrs[nName] = trim(match[3]);\n }\n className = className.substr(match.index + match[0].length);\n }\n }\n break;\n case NODE_TYPE_TEXT: /* Text Node */\n if (msie === 11) {\n // Workaround for #11781\n while (node.parentNode && node.nextSibling && node.nextSibling.nodeType === NODE_TYPE_TEXT) {\n node.nodeValue = node.nodeValue + node.nextSibling.nodeValue;\n node.parentNode.removeChild(node.nextSibling);\n }\n }\n addTextInterpolateDirective(directives, node.nodeValue);\n break;\n case NODE_TYPE_COMMENT: /* Comment */\n try {\n match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);\n if (match) {\n nName = directiveNormalize(match[1]);\n if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {\n attrs[nName] = trim(match[2]);\n }\n }\n } catch (e) {\n // turns out that under some circumstances IE9 throws errors when one attempts to read\n // comment's node value.\n // Just ignore it and continue. (Can't seem to reproduce in test case.)\n }\n break;\n }\n\n directives.sort(byPriority);\n return directives;\n }\n\n /**\n * Given a node with an directive-start it collects all of the siblings until it finds\n * directive-end.\n * @param node\n * @param attrStart\n * @param attrEnd\n * @returns {*}\n */\n function groupScan(node, attrStart, attrEnd) {\n var nodes = [];\n var depth = 0;\n if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {\n do {\n if (!node) {\n throw $compileMinErr('uterdir',\n \"Unterminated attribute, found '{0}' but no matching '{1}' found.\",\n attrStart, attrEnd);\n }\n if (node.nodeType == NODE_TYPE_ELEMENT) {\n if (node.hasAttribute(attrStart)) depth++;\n if (node.hasAttribute(attrEnd)) depth--;\n }\n nodes.push(node);\n node = node.nextSibling;\n } while (depth > 0);\n } else {\n nodes.push(node);\n }\n\n return jqLite(nodes);\n }\n\n /**\n * Wrapper for linking function which converts normal linking function into a grouped\n * linking function.\n * @param linkFn\n * @param attrStart\n * @param attrEnd\n * @returns {Function}\n */\n function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) {\n return function(scope, element, attrs, controllers, transcludeFn) {\n element = groupScan(element[0], attrStart, attrEnd);\n return linkFn(scope, element, attrs, controllers, transcludeFn);\n };\n }\n\n /**\n * Once the directives have been collected, their compile functions are executed. This method\n * is responsible for inlining directive templates as well as terminating the application\n * of the directives if the terminal directive has been reached.\n *\n * @param {Array} directives Array of collected directives to execute their compile function.\n * this needs to be pre-sorted by priority order.\n * @param {Node} compileNode The raw DOM node to apply the compile functions to\n * @param {Object} templateAttrs The shared attribute function\n * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n * scope argument is auto-generated to the new\n * child of the transcluded parent scope.\n * @param {JQLite} jqCollection If we are working on the root of the compile tree then this\n * argument has the root jqLite array so that we can replace nodes\n * on it.\n * @param {Object=} originalReplaceDirective An optional directive that will be ignored when\n * compiling the transclusion.\n * @param {Array.<Function>} preLinkFns\n * @param {Array.<Function>} postLinkFns\n * @param {Object} previousCompileContext Context used for previous compilation of the current\n * node\n * @returns {Function} linkFn\n */\n function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn,\n jqCollection, originalReplaceDirective, preLinkFns, postLinkFns,\n previousCompileContext) {\n previousCompileContext = previousCompileContext || {};\n\n var terminalPriority = -Number.MAX_VALUE,\n newScopeDirective = previousCompileContext.newScopeDirective,\n controllerDirectives = previousCompileContext.controllerDirectives,\n newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective,\n templateDirective = previousCompileContext.templateDirective,\n nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective,\n hasTranscludeDirective = false,\n hasTemplate = false,\n hasElementTranscludeDirective = previousCompileContext.hasElementTranscludeDirective,\n $compileNode = templateAttrs.$$element = jqLite(compileNode),\n directive,\n directiveName,\n $template,\n replaceDirective = originalReplaceDirective,\n childTranscludeFn = transcludeFn,\n linkFn,\n directiveValue;\n\n // executes all directives on the current element\n for (var i = 0, ii = directives.length; i < ii; i++) {\n directive = directives[i];\n var attrStart = directive.$$start;\n var attrEnd = directive.$$end;\n\n // collect multiblock sections\n if (attrStart) {\n $compileNode = groupScan(compileNode, attrStart, attrEnd);\n }\n $template = undefined;\n\n if (terminalPriority > directive.priority) {\n break; // prevent further processing of directives\n }\n\n if (directiveValue = directive.scope) {\n\n // skip the check for directives with async templates, we'll check the derived sync\n // directive when the template arrives\n if (!directive.templateUrl) {\n if (isObject(directiveValue)) {\n // This directive is trying to add an isolated scope.\n // Check that there is no scope of any kind already\n assertNoDuplicate('new/isolated scope', newIsolateScopeDirective || newScopeDirective,\n directive, $compileNode);\n newIsolateScopeDirective = directive;\n } else {\n // This directive is trying to add a child scope.\n // Check that there is no isolated scope already\n assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive,\n $compileNode);\n }\n }\n\n newScopeDirective = newScopeDirective || directive;\n }\n\n directiveName = directive.name;\n\n if (!directive.templateUrl && directive.controller) {\n directiveValue = directive.controller;\n controllerDirectives = controllerDirectives || createMap();\n assertNoDuplicate(\"'\" + directiveName + \"' controller\",\n controllerDirectives[directiveName], directive, $compileNode);\n controllerDirectives[directiveName] = directive;\n }\n\n if (directiveValue = directive.transclude) {\n hasTranscludeDirective = true;\n\n // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion.\n // This option should only be used by directives that know how to safely handle element transclusion,\n // where the transcluded nodes are added or replaced after linking.\n if (!directive.$$tlb) {\n assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode);\n nonTlbTranscludeDirective = directive;\n }\n\n if (directiveValue == 'element') {\n hasElementTranscludeDirective = true;\n terminalPriority = directive.priority;\n $template = $compileNode;\n $compileNode = templateAttrs.$$element =\n jqLite(document.createComment(' ' + directiveName + ': ' +\n templateAttrs[directiveName] + ' '));\n compileNode = $compileNode[0];\n replaceWith(jqCollection, sliceArgs($template), compileNode);\n\n childTranscludeFn = compile($template, transcludeFn, terminalPriority,\n replaceDirective && replaceDirective.name, {\n // Don't pass in:\n // - controllerDirectives - otherwise we'll create duplicates controllers\n // - newIsolateScopeDirective or templateDirective - combining templates with\n // element transclusion doesn't make sense.\n //\n // We need only nonTlbTranscludeDirective so that we prevent putting transclusion\n // on the same element more than once.\n nonTlbTranscludeDirective: nonTlbTranscludeDirective\n });\n } else {\n $template = jqLite(jqLiteClone(compileNode)).contents();\n $compileNode.empty(); // clear contents\n childTranscludeFn = compile($template, transcludeFn, undefined,\n undefined, { needsNewScope: directive.$$isolateScope || directive.$$newScope});\n }\n }\n\n if (directive.template) {\n hasTemplate = true;\n assertNoDuplicate('template', templateDirective, directive, $compileNode);\n templateDirective = directive;\n\n directiveValue = (isFunction(directive.template))\n ? directive.template($compileNode, templateAttrs)\n : directive.template;\n\n directiveValue = denormalizeTemplate(directiveValue);\n\n if (directive.replace) {\n replaceDirective = directive;\n if (jqLiteIsTextNode(directiveValue)) {\n $template = [];\n } else {\n $template = removeComments(wrapTemplate(directive.templateNamespace, trim(directiveValue)));\n }\n compileNode = $template[0];\n\n if ($template.length != 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) {\n throw $compileMinErr('tplrt',\n \"Template for directive '{0}' must have exactly one root element. {1}\",\n directiveName, '');\n }\n\n replaceWith(jqCollection, $compileNode, compileNode);\n\n var newTemplateAttrs = {$attr: {}};\n\n // combine directives from the original node and from the template:\n // - take the array of directives for this element\n // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed)\n // - collect directives from the template and sort them by priority\n // - combine directives as: processed + template + unprocessed\n var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs);\n var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1));\n\n if (newIsolateScopeDirective || newScopeDirective) {\n // The original directive caused the current element to be replaced but this element\n // also needs to have a new scope, so we need to tell the template directives\n // that they would need to get their scope from further up, if they require transclusion\n markDirectiveScope(templateDirectives, newIsolateScopeDirective, newScopeDirective);\n }\n directives = directives.concat(templateDirectives).concat(unprocessedDirectives);\n mergeTemplateAttributes(templateAttrs, newTemplateAttrs);\n\n ii = directives.length;\n } else {\n $compileNode.html(directiveValue);\n }\n }\n\n if (directive.templateUrl) {\n hasTemplate = true;\n assertNoDuplicate('template', templateDirective, directive, $compileNode);\n templateDirective = directive;\n\n if (directive.replace) {\n replaceDirective = directive;\n }\n\n nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode,\n templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, {\n controllerDirectives: controllerDirectives,\n newScopeDirective: (newScopeDirective !== directive) && newScopeDirective,\n newIsolateScopeDirective: newIsolateScopeDirective,\n templateDirective: templateDirective,\n nonTlbTranscludeDirective: nonTlbTranscludeDirective\n });\n ii = directives.length;\n } else if (directive.compile) {\n try {\n linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn);\n if (isFunction(linkFn)) {\n addLinkFns(null, linkFn, attrStart, attrEnd);\n } else if (linkFn) {\n addLinkFns(linkFn.pre, linkFn.post, attrStart, attrEnd);\n }\n } catch (e) {\n $exceptionHandler(e, startingTag($compileNode));\n }\n }\n\n if (directive.terminal) {\n nodeLinkFn.terminal = true;\n terminalPriority = Math.max(terminalPriority, directive.priority);\n }\n\n }\n\n nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true;\n nodeLinkFn.transcludeOnThisElement = hasTranscludeDirective;\n nodeLinkFn.templateOnThisElement = hasTemplate;\n nodeLinkFn.transclude = childTranscludeFn;\n\n previousCompileContext.hasElementTranscludeDirective = hasElementTranscludeDirective;\n\n // might be normal or delayed nodeLinkFn depending on if templateUrl is present\n return nodeLinkFn;\n\n ////////////////////\n\n function addLinkFns(pre, post, attrStart, attrEnd) {\n if (pre) {\n if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd);\n pre.require = directive.require;\n pre.directiveName = directiveName;\n if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n pre = cloneAndAnnotateFn(pre, {isolateScope: true});\n }\n preLinkFns.push(pre);\n }\n if (post) {\n if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd);\n post.require = directive.require;\n post.directiveName = directiveName;\n if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n post = cloneAndAnnotateFn(post, {isolateScope: true});\n }\n postLinkFns.push(post);\n }\n }\n\n\n function getControllers(directiveName, require, $element, elementControllers) {\n var value;\n\n if (isString(require)) {\n var match = require.match(REQUIRE_PREFIX_REGEXP);\n var name = require.substring(match[0].length);\n var inheritType = match[1] || match[3];\n var optional = match[2] === '?';\n\n //If only parents then start at the parent element\n if (inheritType === '^^') {\n $element = $element.parent();\n //Otherwise attempt getting the controller from elementControllers in case\n //the element is transcluded (and has no data) and to avoid .data if possible\n } else {\n value = elementControllers && elementControllers[name];\n value = value && value.instance;\n }\n\n if (!value) {\n var dataName = '$' + name + 'Controller';\n value = inheritType ? $element.inheritedData(dataName) : $element.data(dataName);\n }\n\n if (!value && !optional) {\n throw $compileMinErr('ctreq',\n \"Controller '{0}', required by directive '{1}', can't be found!\",\n name, directiveName);\n }\n } else if (isArray(require)) {\n value = [];\n for (var i = 0, ii = require.length; i < ii; i++) {\n value[i] = getControllers(directiveName, require[i], $element, elementControllers);\n }\n }\n\n return value || null;\n }\n\n function setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope) {\n var elementControllers = createMap();\n for (var controllerKey in controllerDirectives) {\n var directive = controllerDirectives[controllerKey];\n var locals = {\n $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope,\n $element: $element,\n $attrs: attrs,\n $transclude: transcludeFn\n };\n\n var controller = directive.controller;\n if (controller == '@') {\n controller = attrs[directive.name];\n }\n\n var controllerInstance = $controller(controller, locals, true, directive.controllerAs);\n\n // For directives with element transclusion the element is a comment.\n // In this case .data will not attach any data.\n // Instead, we save the controllers for the element in a local hash and attach to .data\n // later, once we have the actual element.\n elementControllers[directive.name] = controllerInstance;\n $element.data('$' + directive.name + 'Controller', controllerInstance.instance);\n }\n return elementControllers;\n }\n\n function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {\n var linkFn, isolateScope, controllerScope, elementControllers, transcludeFn, $element,\n attrs, removeScopeBindingWatches, removeControllerBindingWatches;\n\n if (compileNode === linkNode) {\n attrs = templateAttrs;\n $element = templateAttrs.$$element;\n } else {\n $element = jqLite(linkNode);\n attrs = new Attributes($element, templateAttrs);\n }\n\n controllerScope = scope;\n if (newIsolateScopeDirective) {\n isolateScope = scope.$new(true);\n } else if (newScopeDirective) {\n controllerScope = scope.$parent;\n }\n\n if (boundTranscludeFn) {\n // track `boundTranscludeFn` so it can be unwrapped if `transcludeFn`\n // is later passed as `parentBoundTranscludeFn` to `publicLinkFn`\n transcludeFn = controllersBoundTransclude;\n transcludeFn.$$boundTransclude = boundTranscludeFn;\n }\n\n if (controllerDirectives) {\n elementControllers = setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope);\n }\n\n if (newIsolateScopeDirective) {\n // Initialize isolate scope bindings for new isolate scope directive.\n compile.$$addScopeInfo($element, isolateScope, true, !(templateDirective && (templateDirective === newIsolateScopeDirective ||\n templateDirective === newIsolateScopeDirective.$$originalDirective)));\n compile.$$addScopeClass($element, true);\n isolateScope.$$isolateBindings =\n newIsolateScopeDirective.$$isolateBindings;\n removeScopeBindingWatches = initializeDirectiveBindings(scope, attrs, isolateScope,\n isolateScope.$$isolateBindings,\n newIsolateScopeDirective);\n if (removeScopeBindingWatches) {\n isolateScope.$on('$destroy', removeScopeBindingWatches);\n }\n }\n\n // Initialize bindToController bindings\n for (var name in elementControllers) {\n var controllerDirective = controllerDirectives[name];\n var controller = elementControllers[name];\n var bindings = controllerDirective.$$bindings.bindToController;\n\n if (controller.identifier && bindings) {\n removeControllerBindingWatches =\n initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective);\n }\n\n var controllerResult = controller();\n if (controllerResult !== controller.instance) {\n // If the controller constructor has a return value, overwrite the instance\n // from setupControllers\n controller.instance = controllerResult;\n $element.data('$' + controllerDirective.name + 'Controller', controllerResult);\n removeControllerBindingWatches && removeControllerBindingWatches();\n removeControllerBindingWatches =\n initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective);\n }\n }\n\n // PRELINKING\n for (i = 0, ii = preLinkFns.length; i < ii; i++) {\n linkFn = preLinkFns[i];\n invokeLinkFn(linkFn,\n linkFn.isolateScope ? isolateScope : scope,\n $element,\n attrs,\n linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),\n transcludeFn\n );\n }\n\n // RECURSION\n // We only pass the isolate scope, if the isolate directive has a template,\n // otherwise the child elements do not belong to the isolate directive.\n var scopeToChild = scope;\n if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) {\n scopeToChild = isolateScope;\n }\n childLinkFn && childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn);\n\n // POSTLINKING\n for (i = postLinkFns.length - 1; i >= 0; i--) {\n linkFn = postLinkFns[i];\n invokeLinkFn(linkFn,\n linkFn.isolateScope ? isolateScope : scope,\n $element,\n attrs,\n linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),\n transcludeFn\n );\n }\n\n // This is the function that is injected as `$transclude`.\n // Note: all arguments are optional!\n function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement) {\n var transcludeControllers;\n\n // No scope passed in:\n if (!isScope(scope)) {\n futureParentElement = cloneAttachFn;\n cloneAttachFn = scope;\n scope = undefined;\n }\n\n if (hasElementTranscludeDirective) {\n transcludeControllers = elementControllers;\n }\n if (!futureParentElement) {\n futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element;\n }\n return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild);\n }\n }\n }\n\n // Depending upon the context in which a directive finds itself it might need to have a new isolated\n // or child scope created. For instance:\n // * if the directive has been pulled into a template because another directive with a higher priority\n // asked for element transclusion\n // * if the directive itself asks for transclusion but it is at the root of a template and the original\n // element was replaced. See https://github.com/angular/angular.js/issues/12936\n function markDirectiveScope(directives, isolateScope, newScope) {\n for (var j = 0, jj = directives.length; j < jj; j++) {\n directives[j] = inherit(directives[j], {$$isolateScope: isolateScope, $$newScope: newScope});\n }\n }\n\n /**\n * looks up the directive and decorates it with exception handling and proper parameters. We\n * call this the boundDirective.\n *\n * @param {string} name name of the directive to look up.\n * @param {string} location The directive must be found in specific format.\n * String containing any of theses characters:\n *\n * * `E`: element name\n * * `A': attribute\n * * `C`: class\n * * `M`: comment\n * @returns {boolean} true if directive was added.\n */\n function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,\n endAttrName) {\n if (name === ignoreDirective) return null;\n var match = null;\n if (hasDirectives.hasOwnProperty(name)) {\n for (var directive, directives = $injector.get(name + Suffix),\n i = 0, ii = directives.length; i < ii; i++) {\n try {\n directive = directives[i];\n if ((isUndefined(maxPriority) || maxPriority > directive.priority) &&\n directive.restrict.indexOf(location) != -1) {\n if (startAttrName) {\n directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});\n }\n if (!directive.$$bindings) {\n var bindings = directive.$$bindings =\n parseDirectiveBindings(directive, directive.name);\n if (isObject(bindings.isolateScope)) {\n directive.$$isolateBindings = bindings.isolateScope;\n }\n }\n tDirectives.push(directive);\n match = directive;\n }\n } catch (e) { $exceptionHandler(e); }\n }\n }\n return match;\n }\n\n\n /**\n * looks up the directive and returns true if it is a multi-element directive,\n * and therefore requires DOM nodes between -start and -end markers to be grouped\n * together.\n *\n * @param {string} name name of the directive to look up.\n * @returns true if directive was registered as multi-element.\n */\n function directiveIsMultiElement(name) {\n if (hasDirectives.hasOwnProperty(name)) {\n for (var directive, directives = $injector.get(name + Suffix),\n i = 0, ii = directives.length; i < ii; i++) {\n directive = directives[i];\n if (directive.multiElement) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * When the element is replaced with HTML template then the new attributes\n * on the template need to be merged with the existing attributes in the DOM.\n * The desired effect is to have both of the attributes present.\n *\n * @param {object} dst destination attributes (original DOM)\n * @param {object} src source attributes (from the directive template)\n */\n function mergeTemplateAttributes(dst, src) {\n var srcAttr = src.$attr,\n dstAttr = dst.$attr,\n $element = dst.$$element;\n\n // reapply the old attributes to the new element\n forEach(dst, function(value, key) {\n if (key.charAt(0) != '$') {\n if (src[key] && src[key] !== value) {\n value += (key === 'style' ? ';' : ' ') + src[key];\n }\n dst.$set(key, value, true, srcAttr[key]);\n }\n });\n\n // copy the new attributes on the old attrs object\n forEach(src, function(value, key) {\n if (key == 'class') {\n safeAddClass($element, value);\n dst['class'] = (dst['class'] ? dst['class'] + ' ' : '') + value;\n } else if (key == 'style') {\n $element.attr('style', $element.attr('style') + ';' + value);\n dst['style'] = (dst['style'] ? dst['style'] + ';' : '') + value;\n // `dst` will never contain hasOwnProperty as DOM parser won't let it.\n // You will get an \"InvalidCharacterError: DOM Exception 5\" error if you\n // have an attribute like \"has-own-property\" or \"data-has-own-property\", etc.\n } else if (key.charAt(0) != '$' && !dst.hasOwnProperty(key)) {\n dst[key] = value;\n dstAttr[key] = srcAttr[key];\n }\n });\n }\n\n\n function compileTemplateUrl(directives, $compileNode, tAttrs,\n $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) {\n var linkQueue = [],\n afterTemplateNodeLinkFn,\n afterTemplateChildLinkFn,\n beforeTemplateCompileNode = $compileNode[0],\n origAsyncDirective = directives.shift(),\n derivedSyncDirective = inherit(origAsyncDirective, {\n templateUrl: null, transclude: null, replace: null, $$originalDirective: origAsyncDirective\n }),\n templateUrl = (isFunction(origAsyncDirective.templateUrl))\n ? origAsyncDirective.templateUrl($compileNode, tAttrs)\n : origAsyncDirective.templateUrl,\n templateNamespace = origAsyncDirective.templateNamespace;\n\n $compileNode.empty();\n\n $templateRequest(templateUrl)\n .then(function(content) {\n var compileNode, tempTemplateAttrs, $template, childBoundTranscludeFn;\n\n content = denormalizeTemplate(content);\n\n if (origAsyncDirective.replace) {\n if (jqLiteIsTextNode(content)) {\n $template = [];\n } else {\n $template = removeComments(wrapTemplate(templateNamespace, trim(content)));\n }\n compileNode = $template[0];\n\n if ($template.length != 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) {\n throw $compileMinErr('tplrt',\n \"Template for directive '{0}' must have exactly one root element. {1}\",\n origAsyncDirective.name, templateUrl);\n }\n\n tempTemplateAttrs = {$attr: {}};\n replaceWith($rootElement, $compileNode, compileNode);\n var templateDirectives = collectDirectives(compileNode, [], tempTemplateAttrs);\n\n if (isObject(origAsyncDirective.scope)) {\n // the original directive that caused the template to be loaded async required\n // an isolate scope\n markDirectiveScope(templateDirectives, true);\n }\n directives = templateDirectives.concat(directives);\n mergeTemplateAttributes(tAttrs, tempTemplateAttrs);\n } else {\n compileNode = beforeTemplateCompileNode;\n $compileNode.html(content);\n }\n\n directives.unshift(derivedSyncDirective);\n\n afterTemplateNodeLinkFn = applyDirectivesToNode(directives, compileNode, tAttrs,\n childTranscludeFn, $compileNode, origAsyncDirective, preLinkFns, postLinkFns,\n previousCompileContext);\n forEach($rootElement, function(node, i) {\n if (node == compileNode) {\n $rootElement[i] = $compileNode[0];\n }\n });\n afterTemplateChildLinkFn = compileNodes($compileNode[0].childNodes, childTranscludeFn);\n\n while (linkQueue.length) {\n var scope = linkQueue.shift(),\n beforeTemplateLinkNode = linkQueue.shift(),\n linkRootElement = linkQueue.shift(),\n boundTranscludeFn = linkQueue.shift(),\n linkNode = $compileNode[0];\n\n if (scope.$$destroyed) continue;\n\n if (beforeTemplateLinkNode !== beforeTemplateCompileNode) {\n var oldClasses = beforeTemplateLinkNode.className;\n\n if (!(previousCompileContext.hasElementTranscludeDirective &&\n origAsyncDirective.replace)) {\n // it was cloned therefore we have to clone as well.\n linkNode = jqLiteClone(compileNode);\n }\n replaceWith(linkRootElement, jqLite(beforeTemplateLinkNode), linkNode);\n\n // Copy in CSS classes from original node\n safeAddClass(jqLite(linkNode), oldClasses);\n }\n if (afterTemplateNodeLinkFn.transcludeOnThisElement) {\n childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);\n } else {\n childBoundTranscludeFn = boundTranscludeFn;\n }\n afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, linkNode, $rootElement,\n childBoundTranscludeFn);\n }\n linkQueue = null;\n });\n\n return function delayedNodeLinkFn(ignoreChildLinkFn, scope, node, rootElement, boundTranscludeFn) {\n var childBoundTranscludeFn = boundTranscludeFn;\n if (scope.$$destroyed) return;\n if (linkQueue) {\n linkQueue.push(scope,\n node,\n rootElement,\n childBoundTranscludeFn);\n } else {\n if (afterTemplateNodeLinkFn.transcludeOnThisElement) {\n childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);\n }\n afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, childBoundTranscludeFn);\n }\n };\n }\n\n\n /**\n * Sorting function for bound directives.\n */\n function byPriority(a, b) {\n var diff = b.priority - a.priority;\n if (diff !== 0) return diff;\n if (a.name !== b.name) return (a.name < b.name) ? -1 : 1;\n return a.index - b.index;\n }\n\n function assertNoDuplicate(what, previousDirective, directive, element) {\n\n function wrapModuleNameIfDefined(moduleName) {\n return moduleName ?\n (' (module: ' + moduleName + ')') :\n '';\n }\n\n if (previousDirective) {\n throw $compileMinErr('multidir', 'Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}',\n previousDirective.name, wrapModuleNameIfDefined(previousDirective.$$moduleName),\n directive.name, wrapModuleNameIfDefined(directive.$$moduleName), what, startingTag(element));\n }\n }\n\n\n function addTextInterpolateDirective(directives, text) {\n var interpolateFn = $interpolate(text, true);\n if (interpolateFn) {\n directives.push({\n priority: 0,\n compile: function textInterpolateCompileFn(templateNode) {\n var templateNodeParent = templateNode.parent(),\n hasCompileParent = !!templateNodeParent.length;\n\n // When transcluding a template that has bindings in the root\n // we don't have a parent and thus need to add the class during linking fn.\n if (hasCompileParent) compile.$$addBindingClass(templateNodeParent);\n\n return function textInterpolateLinkFn(scope, node) {\n var parent = node.parent();\n if (!hasCompileParent) compile.$$addBindingClass(parent);\n compile.$$addBindingInfo(parent, interpolateFn.expressions);\n scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {\n node[0].nodeValue = value;\n });\n };\n }\n });\n }\n }\n\n\n function wrapTemplate(type, template) {\n type = lowercase(type || 'html');\n switch (type) {\n case 'svg':\n case 'math':\n var wrapper = document.createElement('div');\n wrapper.innerHTML = '<' + type + '>' + template + '</' + type + '>';\n return wrapper.childNodes[0].childNodes;\n default:\n return template;\n }\n }\n\n\n function getTrustedContext(node, attrNormalizedName) {\n if (attrNormalizedName == \"srcdoc\") {\n return $sce.HTML;\n }\n var tag = nodeName_(node);\n // maction[xlink:href] can source SVG. It's not limited to <maction>.\n if (attrNormalizedName == \"xlinkHref\" ||\n (tag == \"form\" && attrNormalizedName == \"action\") ||\n (tag != \"img\" && (attrNormalizedName == \"src\" ||\n attrNormalizedName == \"ngSrc\"))) {\n return $sce.RESOURCE_URL;\n }\n }\n\n\n function addAttrInterpolateDirective(node, directives, value, name, allOrNothing) {\n var trustedContext = getTrustedContext(node, name);\n allOrNothing = ALL_OR_NOTHING_ATTRS[name] || allOrNothing;\n\n var interpolateFn = $interpolate(value, true, trustedContext, allOrNothing);\n\n // no interpolation found -> ignore\n if (!interpolateFn) return;\n\n\n if (name === \"multiple\" && nodeName_(node) === \"select\") {\n throw $compileMinErr(\"selmulti\",\n \"Binding to the 'multiple' attribute is not supported. Element: {0}\",\n startingTag(node));\n }\n\n directives.push({\n priority: 100,\n compile: function() {\n return {\n pre: function attrInterpolatePreLinkFn(scope, element, attr) {\n var $$observers = (attr.$$observers || (attr.$$observers = createMap()));\n\n if (EVENT_HANDLER_ATTR_REGEXP.test(name)) {\n throw $compileMinErr('nodomevents',\n \"Interpolations for HTML DOM event attributes are disallowed. Please use the \" +\n \"ng- versions (such as ng-click instead of onclick) instead.\");\n }\n\n // If the attribute has changed since last $interpolate()ed\n var newValue = attr[name];\n if (newValue !== value) {\n // we need to interpolate again since the attribute value has been updated\n // (e.g. by another directive's compile function)\n // ensure unset/empty values make interpolateFn falsy\n interpolateFn = newValue && $interpolate(newValue, true, trustedContext, allOrNothing);\n value = newValue;\n }\n\n // if attribute was updated so that there is no interpolation going on we don't want to\n // register any observers\n if (!interpolateFn) return;\n\n // initialize attr object so that it's ready in case we need the value for isolate\n // scope initialization, otherwise the value would not be available from isolate\n // directive's linking fn during linking phase\n attr[name] = interpolateFn(scope);\n\n ($$observers[name] || ($$observers[name] = [])).$$inter = true;\n (attr.$$observers && attr.$$observers[name].$$scope || scope).\n $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) {\n //special case for class attribute addition + removal\n //so that class changes can tap into the animation\n //hooks provided by the $animate service. Be sure to\n //skip animations when the first digest occurs (when\n //both the new and the old values are the same) since\n //the CSS classes are the non-interpolated values\n if (name === 'class' && newValue != oldValue) {\n attr.$updateClass(newValue, oldValue);\n } else {\n attr.$set(name, newValue);\n }\n });\n }\n };\n }\n });\n }\n\n\n /**\n * This is a special jqLite.replaceWith, which can replace items which\n * have no parents, provided that the containing jqLite collection is provided.\n *\n * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes\n * in the root of the tree.\n * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep\n * the shell, but replace its DOM node reference.\n * @param {Node} newNode The new DOM node.\n */\n function replaceWith($rootElement, elementsToRemove, newNode) {\n var firstElementToRemove = elementsToRemove[0],\n removeCount = elementsToRemove.length,\n parent = firstElementToRemove.parentNode,\n i, ii;\n\n if ($rootElement) {\n for (i = 0, ii = $rootElement.length; i < ii; i++) {\n if ($rootElement[i] == firstElementToRemove) {\n $rootElement[i++] = newNode;\n for (var j = i, j2 = j + removeCount - 1,\n jj = $rootElement.length;\n j < jj; j++, j2++) {\n if (j2 < jj) {\n $rootElement[j] = $rootElement[j2];\n } else {\n delete $rootElement[j];\n }\n }\n $rootElement.length -= removeCount - 1;\n\n // If the replaced element is also the jQuery .context then replace it\n // .context is a deprecated jQuery api, so we should set it only when jQuery set it\n // http://api.jquery.com/context/\n if ($rootElement.context === firstElementToRemove) {\n $rootElement.context = newNode;\n }\n break;\n }\n }\n }\n\n if (parent) {\n parent.replaceChild(newNode, firstElementToRemove);\n }\n\n // TODO(perf): what's this document fragment for? is it needed? can we at least reuse it?\n var fragment = document.createDocumentFragment();\n fragment.appendChild(firstElementToRemove);\n\n if (jqLite.hasData(firstElementToRemove)) {\n // Copy over user data (that includes Angular's $scope etc.). Don't copy private\n // data here because there's no public interface in jQuery to do that and copying over\n // event listeners (which is the main use of private data) wouldn't work anyway.\n jqLite.data(newNode, jqLite.data(firstElementToRemove));\n\n // Remove data of the replaced element. We cannot just call .remove()\n // on the element it since that would deallocate scope that is needed\n // for the new node. Instead, remove the data \"manually\".\n if (!jQuery) {\n delete jqLite.cache[firstElementToRemove[jqLite.expando]];\n } else {\n // jQuery 2.x doesn't expose the data storage. Use jQuery.cleanData to clean up after\n // the replaced element. The cleanData version monkey-patched by Angular would cause\n // the scope to be trashed and we do need the very same scope to work with the new\n // element. However, we cannot just cache the non-patched version and use it here as\n // that would break if another library patches the method after Angular does (one\n // example is jQuery UI). Instead, set a flag indicating scope destroying should be\n // skipped this one time.\n skipDestroyOnNextJQueryCleanData = true;\n jQuery.cleanData([firstElementToRemove]);\n }\n }\n\n for (var k = 1, kk = elementsToRemove.length; k < kk; k++) {\n var element = elementsToRemove[k];\n jqLite(element).remove(); // must do this way to clean up expando\n fragment.appendChild(element);\n delete elementsToRemove[k];\n }\n\n elementsToRemove[0] = newNode;\n elementsToRemove.length = 1;\n }\n\n\n function cloneAndAnnotateFn(fn, annotation) {\n return extend(function() { return fn.apply(null, arguments); }, fn, annotation);\n }\n\n\n function invokeLinkFn(linkFn, scope, $element, attrs, controllers, transcludeFn) {\n try {\n linkFn(scope, $element, attrs, controllers, transcludeFn);\n } catch (e) {\n $exceptionHandler(e, startingTag($element));\n }\n }\n\n\n // Set up $watches for isolate scope and controller bindings. This process\n // only occurs for isolate scopes and new scopes with controllerAs.\n function initializeDirectiveBindings(scope, attrs, destination, bindings, directive) {\n var removeWatchCollection = [];\n forEach(bindings, function(definition, scopeName) {\n var attrName = definition.attrName,\n optional = definition.optional,\n mode = definition.mode, // @, =, or &\n lastValue,\n parentGet, parentSet, compare;\n\n switch (mode) {\n\n case '@':\n if (!optional && !hasOwnProperty.call(attrs, attrName)) {\n destination[scopeName] = attrs[attrName] = void 0;\n }\n attrs.$observe(attrName, function(value) {\n if (isString(value)) {\n destination[scopeName] = value;\n }\n });\n attrs.$$observers[attrName].$$scope = scope;\n lastValue = attrs[attrName];\n if (isString(lastValue)) {\n // If the attribute has been provided then we trigger an interpolation to ensure\n // the value is there for use in the link fn\n destination[scopeName] = $interpolate(lastValue)(scope);\n } else if (isBoolean(lastValue)) {\n // If the attributes is one of the BOOLEAN_ATTR then Angular will have converted\n // the value to boolean rather than a string, so we special case this situation\n destination[scopeName] = lastValue;\n }\n break;\n\n case '=':\n if (!hasOwnProperty.call(attrs, attrName)) {\n if (optional) break;\n attrs[attrName] = void 0;\n }\n if (optional && !attrs[attrName]) break;\n\n parentGet = $parse(attrs[attrName]);\n if (parentGet.literal) {\n compare = equals;\n } else {\n compare = function(a, b) { return a === b || (a !== a && b !== b); };\n }\n parentSet = parentGet.assign || function() {\n // reset the change, or we will throw this exception on every $digest\n lastValue = destination[scopeName] = parentGet(scope);\n throw $compileMinErr('nonassign',\n \"Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!\",\n attrs[attrName], attrName, directive.name);\n };\n lastValue = destination[scopeName] = parentGet(scope);\n var parentValueWatch = function parentValueWatch(parentValue) {\n if (!compare(parentValue, destination[scopeName])) {\n // we are out of sync and need to copy\n if (!compare(parentValue, lastValue)) {\n // parent changed and it has precedence\n destination[scopeName] = parentValue;\n } else {\n // if the parent can be assigned then do so\n parentSet(scope, parentValue = destination[scopeName]);\n }\n }\n return lastValue = parentValue;\n };\n parentValueWatch.$stateful = true;\n var removeWatch;\n if (definition.collection) {\n removeWatch = scope.$watchCollection(attrs[attrName], parentValueWatch);\n } else {\n removeWatch = scope.$watch($parse(attrs[attrName], parentValueWatch), null, parentGet.literal);\n }\n removeWatchCollection.push(removeWatch);\n break;\n\n case '&':\n // Don't assign Object.prototype method to scope\n parentGet = attrs.hasOwnProperty(attrName) ? $parse(attrs[attrName]) : noop;\n\n // Don't assign noop to destination if expression is not valid\n if (parentGet === noop && optional) break;\n\n destination[scopeName] = function(locals) {\n return parentGet(scope, locals);\n };\n break;\n }\n });\n\n return removeWatchCollection.length && function removeWatches() {\n for (var i = 0, ii = removeWatchCollection.length; i < ii; ++i) {\n removeWatchCollection[i]();\n }\n };\n }\n }];\n}\n\nvar PREFIX_REGEXP = /^((?:x|data)[\\:\\-_])/i;\n/**\n * Converts all accepted directives format into proper directive name.\n * @param name Name to normalize\n */\nfunction directiveNormalize(name) {\n return camelCase(name.replace(PREFIX_REGEXP, ''));\n}\n\n/**\n * @ngdoc type\n * @name $compile.directive.Attributes\n *\n * @description\n * A shared object between directive compile / linking functions which contains normalized DOM\n * element attributes. The values reflect current binding state `{{ }}`. The normalization is\n * needed since all of these are treated as equivalent in Angular:\n *\n * ```\n * <span ng:bind=\"a\" ng-bind=\"a\" data-ng-bind=\"a\" x-ng-bind=\"a\">\n * ```\n */\n\n/**\n * @ngdoc property\n * @name $compile.directive.Attributes#$attr\n *\n * @description\n * A map of DOM element attribute names to the normalized name. This is\n * needed to do reverse lookup from normalized name back to actual name.\n */\n\n\n/**\n * @ngdoc method\n * @name $compile.directive.Attributes#$set\n * @kind function\n *\n * @description\n * Set DOM element attribute value.\n *\n *\n * @param {string} name Normalized element attribute name of the property to modify. The name is\n * reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr}\n * property to the original name.\n * @param {string} value Value to set the attribute to. The value can be an interpolated string.\n */\n\n\n\n/**\n * Closure compiler type information\n */\n\nfunction nodesetLinkingFn(\n /* angular.Scope */ scope,\n /* NodeList */ nodeList,\n /* Element */ rootElement,\n /* function(Function) */ boundTranscludeFn\n) {}\n\nfunction directiveLinkingFn(\n /* nodesetLinkingFn */ nodesetLinkingFn,\n /* angular.Scope */ scope,\n /* Node */ node,\n /* Element */ rootElement,\n /* function(Function) */ boundTranscludeFn\n) {}\n\nfunction tokenDifference(str1, str2) {\n var values = '',\n tokens1 = str1.split(/\\s+/),\n tokens2 = str2.split(/\\s+/);\n\n outer:\n for (var i = 0; i < tokens1.length; i++) {\n var token = tokens1[i];\n for (var j = 0; j < tokens2.length; j++) {\n if (token == tokens2[j]) continue outer;\n }\n values += (values.length > 0 ? ' ' : '') + token;\n }\n return values;\n}\n\nfunction removeComments(jqNodes) {\n jqNodes = jqLite(jqNodes);\n var i = jqNodes.length;\n\n if (i <= 1) {\n return jqNodes;\n }\n\n while (i--) {\n var node = jqNodes[i];\n if (node.nodeType === NODE_TYPE_COMMENT) {\n splice.call(jqNodes, i, 1);\n }\n }\n return jqNodes;\n}\n\nvar $controllerMinErr = minErr('$controller');\n\n\nvar CNTRL_REG = /^(\\S+)(\\s+as\\s+([\\w$]+))?$/;\nfunction identifierForController(controller, ident) {\n if (ident && isString(ident)) return ident;\n if (isString(controller)) {\n var match = CNTRL_REG.exec(controller);\n if (match) return match[3];\n }\n}\n\n\n/**\n * @ngdoc provider\n * @name $controllerProvider\n * @description\n * The {@link ng.$controller $controller service} is used by Angular to create new\n * controllers.\n *\n * This provider allows controller registration via the\n * {@link ng.$controllerProvider#register register} method.\n */\nfunction $ControllerProvider() {\n var controllers = {},\n globals = false;\n\n /**\n * @ngdoc method\n * @name $controllerProvider#register\n * @param {string|Object} name Controller name, or an object map of controllers where the keys are\n * the names and the values are the constructors.\n * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI\n * annotations in the array notation).\n */\n this.register = function(name, constructor) {\n assertNotHasOwnProperty(name, 'controller');\n if (isObject(name)) {\n extend(controllers, name);\n } else {\n controllers[name] = constructor;\n }\n };\n\n /**\n * @ngdoc method\n * @name $controllerProvider#allowGlobals\n * @description If called, allows `$controller` to find controller constructors on `window`\n */\n this.allowGlobals = function() {\n globals = true;\n };\n\n\n this.$get = ['$injector', '$window', function($injector, $window) {\n\n /**\n * @ngdoc service\n * @name $controller\n * @requires $injector\n *\n * @param {Function|string} constructor If called with a function then it's considered to be the\n * controller constructor function. Otherwise it's considered to be a string which is used\n * to retrieve the controller constructor using the following steps:\n *\n * * check if a controller with given name is registered via `$controllerProvider`\n * * check if evaluating the string on the current scope returns a constructor\n * * if $controllerProvider#allowGlobals, check `window[constructor]` on the global\n * `window` object (not recommended)\n *\n * The string can use the `controller as property` syntax, where the controller instance is published\n * as the specified property on the `scope`; the `scope` must be injected into `locals` param for this\n * to work correctly.\n *\n * @param {Object} locals Injection locals for Controller.\n * @return {Object} Instance of given controller.\n *\n * @description\n * `$controller` service is responsible for instantiating controllers.\n *\n * It's just a simple call to {@link auto.$injector $injector}, but extracted into\n * a service, so that one can override this service with [BC version](https://gist.github.com/1649788).\n */\n return function(expression, locals, later, ident) {\n // PRIVATE API:\n // param `later` --- indicates that the controller's constructor is invoked at a later time.\n // If true, $controller will allocate the object with the correct\n // prototype chain, but will not invoke the controller until a returned\n // callback is invoked.\n // param `ident` --- An optional label which overrides the label parsed from the controller\n // expression, if any.\n var instance, match, constructor, identifier;\n later = later === true;\n if (ident && isString(ident)) {\n identifier = ident;\n }\n\n if (isString(expression)) {\n match = expression.match(CNTRL_REG);\n if (!match) {\n throw $controllerMinErr('ctrlfmt',\n \"Badly formed controller string '{0}'. \" +\n \"Must match `__name__ as __id__` or `__name__`.\", expression);\n }\n constructor = match[1],\n identifier = identifier || match[3];\n expression = controllers.hasOwnProperty(constructor)\n ? controllers[constructor]\n : getter(locals.$scope, constructor, true) ||\n (globals ? getter($window, constructor, true) : undefined);\n\n assertArgFn(expression, constructor, true);\n }\n\n if (later) {\n // Instantiate controller later:\n // This machinery is used to create an instance of the object before calling the\n // controller's constructor itself.\n //\n // This allows properties to be added to the controller before the constructor is\n // invoked. Primarily, this is used for isolate scope bindings in $compile.\n //\n // This feature is not intended for use by applications, and is thus not documented\n // publicly.\n // Object creation: http://jsperf.com/create-constructor/2\n var controllerPrototype = (isArray(expression) ?\n expression[expression.length - 1] : expression).prototype;\n instance = Object.create(controllerPrototype || null);\n\n if (identifier) {\n addIdentifier(locals, identifier, instance, constructor || expression.name);\n }\n\n var instantiate;\n return instantiate = extend(function() {\n var result = $injector.invoke(expression, instance, locals, constructor);\n if (result !== instance && (isObject(result) || isFunction(result))) {\n instance = result;\n if (identifier) {\n // If result changed, re-assign controllerAs value to scope.\n addIdentifier(locals, identifier, instance, constructor || expression.name);\n }\n }\n return instance;\n }, {\n instance: instance,\n identifier: identifier\n });\n }\n\n instance = $injector.instantiate(expression, locals, constructor);\n\n if (identifier) {\n addIdentifier(locals, identifier, instance, constructor || expression.name);\n }\n\n return instance;\n };\n\n function addIdentifier(locals, identifier, instance, name) {\n if (!(locals && isObject(locals.$scope))) {\n throw minErr('$controller')('noscp',\n \"Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.\",\n name, identifier);\n }\n\n locals.$scope[identifier] = instance;\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $document\n * @requires $window\n *\n * @description\n * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object.\n *\n * @example\n <example module=\"documentExample\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <p>$document title: <b ng-bind=\"title\"></b></p>\n <p>window.document title: <b ng-bind=\"windowTitle\"></b></p>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('documentExample', [])\n .controller('ExampleController', ['$scope', '$document', function($scope, $document) {\n $scope.title = $document[0].title;\n $scope.windowTitle = angular.element(window.document)[0].title;\n }]);\n </file>\n </example>\n */\nfunction $DocumentProvider() {\n this.$get = ['$window', function(window) {\n return jqLite(window.document);\n }];\n}\n\n/**\n * @ngdoc service\n * @name $exceptionHandler\n * @requires ng.$log\n *\n * @description\n * Any uncaught exception in angular expressions is delegated to this service.\n * The default implementation simply delegates to `$log.error` which logs it into\n * the browser console.\n *\n * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by\n * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.\n *\n * ## Example:\n *\n * ```js\n * angular.module('exceptionOverride', []).factory('$exceptionHandler', function() {\n * return function(exception, cause) {\n * exception.message += ' (caused by \"' + cause + '\")';\n * throw exception;\n * };\n * });\n * ```\n *\n * This example will override the normal action of `$exceptionHandler`, to make angular\n * exceptions fail hard when they happen, instead of just logging to the console.\n *\n * <hr />\n * Note, that code executed in event-listeners (even those registered using jqLite's `on`/`bind`\n * methods) does not delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler}\n * (unless executed during a digest).\n *\n * If you wish, you can manually delegate exceptions, e.g.\n * `try { ... } catch(e) { $exceptionHandler(e); }`\n *\n * @param {Error} exception Exception associated with the error.\n * @param {string=} cause optional information about the context in which\n * the error was thrown.\n *\n */\nfunction $ExceptionHandlerProvider() {\n this.$get = ['$log', function($log) {\n return function(exception, cause) {\n $log.error.apply($log, arguments);\n };\n }];\n}\n\nvar $$ForceReflowProvider = function() {\n this.$get = ['$document', function($document) {\n return function(domNode) {\n //the line below will force the browser to perform a repaint so\n //that all the animated elements within the animation frame will\n //be properly updated and drawn on screen. This is required to\n //ensure that the preparation animation is properly flushed so that\n //the active state picks up from there. DO NOT REMOVE THIS LINE.\n //DO NOT OPTIMIZE THIS LINE. THE MINIFIER WILL REMOVE IT OTHERWISE WHICH\n //WILL RESULT IN AN UNPREDICTABLE BUG THAT IS VERY HARD TO TRACK DOWN AND\n //WILL TAKE YEARS AWAY FROM YOUR LIFE.\n if (domNode) {\n if (!domNode.nodeType && domNode instanceof jqLite) {\n domNode = domNode[0];\n }\n } else {\n domNode = $document[0].body;\n }\n return domNode.offsetWidth + 1;\n };\n }];\n};\n\nvar APPLICATION_JSON = 'application/json';\nvar CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': APPLICATION_JSON + ';charset=utf-8'};\nvar JSON_START = /^\\[|^\\{(?!\\{)/;\nvar JSON_ENDS = {\n '[': /]$/,\n '{': /}$/\n};\nvar JSON_PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/;\nvar $httpMinErr = minErr('$http');\nvar $httpMinErrLegacyFn = function(method) {\n return function() {\n throw $httpMinErr('legacy', 'The method `{0}` on the promise returned from `$http` has been disabled.', method);\n };\n};\n\nfunction serializeValue(v) {\n if (isObject(v)) {\n return isDate(v) ? v.toISOString() : toJson(v);\n }\n return v;\n}\n\n\nfunction $HttpParamSerializerProvider() {\n /**\n * @ngdoc service\n * @name $httpParamSerializer\n * @description\n *\n * Default {@link $http `$http`} params serializer that converts objects to strings\n * according to the following rules:\n *\n * * `{'foo': 'bar'}` results in `foo=bar`\n * * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object)\n * * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element)\n * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D\"` (stringified and encoded representation of an object)\n *\n * Note that serializer will sort the request parameters alphabetically.\n * */\n\n this.$get = function() {\n return function ngParamSerializer(params) {\n if (!params) return '';\n var parts = [];\n forEachSorted(params, function(value, key) {\n if (value === null || isUndefined(value)) return;\n if (isArray(value)) {\n forEach(value, function(v, k) {\n parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(v)));\n });\n } else {\n parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(value)));\n }\n });\n\n return parts.join('&');\n };\n };\n}\n\nfunction $HttpParamSerializerJQLikeProvider() {\n /**\n * @ngdoc service\n * @name $httpParamSerializerJQLike\n * @description\n *\n * Alternative {@link $http `$http`} params serializer that follows\n * jQuery's [`param()`](http://api.jquery.com/jquery.param/) method logic.\n * The serializer will also sort the params alphabetically.\n *\n * To use it for serializing `$http` request parameters, set it as the `paramSerializer` property:\n *\n * ```js\n * $http({\n * url: myUrl,\n * method: 'GET',\n * params: myParams,\n * paramSerializer: '$httpParamSerializerJQLike'\n * });\n * ```\n *\n * It is also possible to set it as the default `paramSerializer` in the\n * {@link $httpProvider#defaults `$httpProvider`}.\n *\n * Additionally, you can inject the serializer and use it explicitly, for example to serialize\n * form data for submission:\n *\n * ```js\n * .controller(function($http, $httpParamSerializerJQLike) {\n * //...\n *\n * $http({\n * url: myUrl,\n * method: 'POST',\n * data: $httpParamSerializerJQLike(myData),\n * headers: {\n * 'Content-Type': 'application/x-www-form-urlencoded'\n * }\n * });\n *\n * });\n * ```\n *\n * */\n this.$get = function() {\n return function jQueryLikeParamSerializer(params) {\n if (!params) return '';\n var parts = [];\n serialize(params, '', true);\n return parts.join('&');\n\n function serialize(toSerialize, prefix, topLevel) {\n if (toSerialize === null || isUndefined(toSerialize)) return;\n if (isArray(toSerialize)) {\n forEach(toSerialize, function(value, index) {\n serialize(value, prefix + '[' + (isObject(value) ? index : '') + ']');\n });\n } else if (isObject(toSerialize) && !isDate(toSerialize)) {\n forEachSorted(toSerialize, function(value, key) {\n serialize(value, prefix +\n (topLevel ? '' : '[') +\n key +\n (topLevel ? '' : ']'));\n });\n } else {\n parts.push(encodeUriQuery(prefix) + '=' + encodeUriQuery(serializeValue(toSerialize)));\n }\n }\n };\n };\n}\n\nfunction defaultHttpResponseTransform(data, headers) {\n if (isString(data)) {\n // Strip json vulnerability protection prefix and trim whitespace\n var tempData = data.replace(JSON_PROTECTION_PREFIX, '').trim();\n\n if (tempData) {\n var contentType = headers('Content-Type');\n if ((contentType && (contentType.indexOf(APPLICATION_JSON) === 0)) || isJsonLike(tempData)) {\n data = fromJson(tempData);\n }\n }\n }\n\n return data;\n}\n\nfunction isJsonLike(str) {\n var jsonStart = str.match(JSON_START);\n return jsonStart && JSON_ENDS[jsonStart[0]].test(str);\n}\n\n/**\n * Parse headers into key value object\n *\n * @param {string} headers Raw headers as a string\n * @returns {Object} Parsed headers as key value object\n */\nfunction parseHeaders(headers) {\n var parsed = createMap(), i;\n\n function fillInParsed(key, val) {\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n\n if (isString(headers)) {\n forEach(headers.split('\\n'), function(line) {\n i = line.indexOf(':');\n fillInParsed(lowercase(trim(line.substr(0, i))), trim(line.substr(i + 1)));\n });\n } else if (isObject(headers)) {\n forEach(headers, function(headerVal, headerKey) {\n fillInParsed(lowercase(headerKey), trim(headerVal));\n });\n }\n\n return parsed;\n}\n\n\n/**\n * Returns a function that provides access to parsed headers.\n *\n * Headers are lazy parsed when first requested.\n * @see parseHeaders\n *\n * @param {(string|Object)} headers Headers to provide access to.\n * @returns {function(string=)} Returns a getter function which if called with:\n *\n * - if called with single an argument returns a single header value or null\n * - if called with no arguments returns an object containing all headers.\n */\nfunction headersGetter(headers) {\n var headersObj;\n\n return function(name) {\n if (!headersObj) headersObj = parseHeaders(headers);\n\n if (name) {\n var value = headersObj[lowercase(name)];\n if (value === void 0) {\n value = null;\n }\n return value;\n }\n\n return headersObj;\n };\n}\n\n\n/**\n * Chain all given functions\n *\n * This function is used for both request and response transforming\n *\n * @param {*} data Data to transform.\n * @param {function(string=)} headers HTTP headers getter fn.\n * @param {number} status HTTP status code of the response.\n * @param {(Function|Array.<Function>)} fns Function or an array of functions.\n * @returns {*} Transformed data.\n */\nfunction transformData(data, headers, status, fns) {\n if (isFunction(fns)) {\n return fns(data, headers, status);\n }\n\n forEach(fns, function(fn) {\n data = fn(data, headers, status);\n });\n\n return data;\n}\n\n\nfunction isSuccess(status) {\n return 200 <= status && status < 300;\n}\n\n\n/**\n * @ngdoc provider\n * @name $httpProvider\n * @description\n * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.\n * */\nfunction $HttpProvider() {\n /**\n * @ngdoc property\n * @name $httpProvider#defaults\n * @description\n *\n * Object containing default values for all {@link ng.$http $http} requests.\n *\n * - **`defaults.cache`** - {boolean|Object} - A boolean value or object created with\n * {@link ng.$cacheFactory `$cacheFactory`} to enable or disable caching of HTTP responses\n * by default. See {@link $http#caching $http Caching} for more information.\n *\n * - **`defaults.xsrfCookieName`** - {string} - Name of cookie containing the XSRF token.\n * Defaults value is `'XSRF-TOKEN'`.\n *\n * - **`defaults.xsrfHeaderName`** - {string} - Name of HTTP header to populate with the\n * XSRF token. Defaults value is `'X-XSRF-TOKEN'`.\n *\n * - **`defaults.headers`** - {Object} - Default headers for all $http requests.\n * Refer to {@link ng.$http#setting-http-headers $http} for documentation on\n * setting default headers.\n * - **`defaults.headers.common`**\n * - **`defaults.headers.post`**\n * - **`defaults.headers.put`**\n * - **`defaults.headers.patch`**\n *\n *\n * - **`defaults.paramSerializer`** - `{string|function(Object<string,string>):string}` - A function\n * used to the prepare string representation of request parameters (specified as an object).\n * If specified as string, it is interpreted as a function registered with the {@link auto.$injector $injector}.\n * Defaults to {@link ng.$httpParamSerializer $httpParamSerializer}.\n *\n **/\n var defaults = this.defaults = {\n // transform incoming response data\n transformResponse: [defaultHttpResponseTransform],\n\n // transform outgoing request data\n transformRequest: [function(d) {\n return isObject(d) && !isFile(d) && !isBlob(d) && !isFormData(d) ? toJson(d) : d;\n }],\n\n // default headers\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n },\n post: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n put: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n patch: shallowCopy(CONTENT_TYPE_APPLICATION_JSON)\n },\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n paramSerializer: '$httpParamSerializer'\n };\n\n var useApplyAsync = false;\n /**\n * @ngdoc method\n * @name $httpProvider#useApplyAsync\n * @description\n *\n * Configure $http service to combine processing of multiple http responses received at around\n * the same time via {@link ng.$rootScope.Scope#$applyAsync $rootScope.$applyAsync}. This can result in\n * significant performance improvement for bigger applications that make many HTTP requests\n * concurrently (common during application bootstrap).\n *\n * Defaults to false. If no value is specified, returns the current configured value.\n *\n * @param {boolean=} value If true, when requests are loaded, they will schedule a deferred\n * \"apply\" on the next tick, giving time for subsequent requests in a roughly ~10ms window\n * to load and share the same digest cycle.\n *\n * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.\n * otherwise, returns the current configured value.\n **/\n this.useApplyAsync = function(value) {\n if (isDefined(value)) {\n useApplyAsync = !!value;\n return this;\n }\n return useApplyAsync;\n };\n\n var useLegacyPromise = true;\n /**\n * @ngdoc method\n * @name $httpProvider#useLegacyPromiseExtensions\n * @description\n *\n * Configure `$http` service to return promises without the shorthand methods `success` and `error`.\n * This should be used to make sure that applications work without these methods.\n *\n * Defaults to true. If no value is specified, returns the current configured value.\n *\n * @param {boolean=} value If true, `$http` will return a promise with the deprecated legacy `success` and `error` methods.\n *\n * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.\n * otherwise, returns the current configured value.\n **/\n this.useLegacyPromiseExtensions = function(value) {\n if (isDefined(value)) {\n useLegacyPromise = !!value;\n return this;\n }\n return useLegacyPromise;\n };\n\n /**\n * @ngdoc property\n * @name $httpProvider#interceptors\n * @description\n *\n * Array containing service factories for all synchronous or asynchronous {@link ng.$http $http}\n * pre-processing of request or postprocessing of responses.\n *\n * These service factories are ordered by request, i.e. they are applied in the same order as the\n * array, on request, but reverse order, on response.\n *\n * {@link ng.$http#interceptors Interceptors detailed info}\n **/\n var interceptorFactories = this.interceptors = [];\n\n this.$get = ['$httpBackend', '$$cookieReader', '$cacheFactory', '$rootScope', '$q', '$injector',\n function($httpBackend, $$cookieReader, $cacheFactory, $rootScope, $q, $injector) {\n\n var defaultCache = $cacheFactory('$http');\n\n /**\n * Make sure that default param serializer is exposed as a function\n */\n defaults.paramSerializer = isString(defaults.paramSerializer) ?\n $injector.get(defaults.paramSerializer) : defaults.paramSerializer;\n\n /**\n * Interceptors stored in reverse order. Inner interceptors before outer interceptors.\n * The reversal is needed so that we can build up the interception chain around the\n * server request.\n */\n var reversedInterceptors = [];\n\n forEach(interceptorFactories, function(interceptorFactory) {\n reversedInterceptors.unshift(isString(interceptorFactory)\n ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory));\n });\n\n /**\n * @ngdoc service\n * @kind function\n * @name $http\n * @requires ng.$httpBackend\n * @requires $cacheFactory\n * @requires $rootScope\n * @requires $q\n * @requires $injector\n *\n * @description\n * The `$http` service is a core Angular service that facilitates communication with the remote\n * HTTP servers via the browser's [XMLHttpRequest](https://developer.mozilla.org/en/xmlhttprequest)\n * object or via [JSONP](http://en.wikipedia.org/wiki/JSONP).\n *\n * For unit testing applications that use `$http` service, see\n * {@link ngMock.$httpBackend $httpBackend mock}.\n *\n * For a higher level of abstraction, please check out the {@link ngResource.$resource\n * $resource} service.\n *\n * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by\n * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage\n * it is important to familiarize yourself with these APIs and the guarantees they provide.\n *\n *\n * ## General usage\n * The `$http` service is a function which takes a single argument — a {@link $http#usage configuration object} —\n * that is used to generate an HTTP request and returns a {@link ng.$q promise}.\n *\n * ```js\n * // Simple GET request example:\n * $http({\n * method: 'GET',\n * url: '/someUrl'\n * }).then(function successCallback(response) {\n * // this callback will be called asynchronously\n * // when the response is available\n * }, function errorCallback(response) {\n * // called asynchronously if an error occurs\n * // or server returns response with an error status.\n * });\n * ```\n *\n * The response object has these properties:\n *\n * - **data** `{string|Object}` The response body transformed with the transform\n * functions.\n * - **status** `{number}` HTTP status code of the response.\n * - **headers** `{function([headerName])}` Header getter function.\n * - **config** `{Object}` The configuration object that was used to generate the request.\n * - **statusText** `{string}` HTTP status text of the response.\n *\n * A response status code between 200 and 299 is considered a success status and\n * will result in the success callback being called. Note that if the response is a redirect,\n * XMLHttpRequest will transparently follow it, meaning that the error callback will not be\n * called for such responses.\n *\n *\n * ## Shortcut methods\n *\n * Shortcut methods are also available. All shortcut methods require passing in the URL, and\n * request data must be passed in for POST/PUT requests. An optional config can be passed as the\n * last argument.\n *\n * ```js\n * $http.get('/someUrl', config).then(successCallback, errorCallback);\n * $http.post('/someUrl', data, config).then(successCallback, errorCallback);\n * ```\n *\n * Complete list of shortcut methods:\n *\n * - {@link ng.$http#get $http.get}\n * - {@link ng.$http#head $http.head}\n * - {@link ng.$http#post $http.post}\n * - {@link ng.$http#put $http.put}\n * - {@link ng.$http#delete $http.delete}\n * - {@link ng.$http#jsonp $http.jsonp}\n * - {@link ng.$http#patch $http.patch}\n *\n *\n * ## Writing Unit Tests that use $http\n * When unit testing (using {@link ngMock ngMock}), it is necessary to call\n * {@link ngMock.$httpBackend#flush $httpBackend.flush()} to flush each pending\n * request using trained responses.\n *\n * ```\n * $httpBackend.expectGET(...);\n * $http.get(...);\n * $httpBackend.flush();\n * ```\n *\n * ## Deprecation Notice\n * <div class=\"alert alert-danger\">\n * The `$http` legacy promise methods `success` and `error` have been deprecated.\n * Use the standard `then` method instead.\n * If {@link $httpProvider#useLegacyPromiseExtensions `$httpProvider.useLegacyPromiseExtensions`} is set to\n * `false` then these methods will throw {@link $http:legacy `$http/legacy`} error.\n * </div>\n *\n * ## Setting HTTP Headers\n *\n * The $http service will automatically add certain HTTP headers to all requests. These defaults\n * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration\n * object, which currently contains this default configuration:\n *\n * - `$httpProvider.defaults.headers.common` (headers that are common for all requests):\n * - `Accept: application/json, text/plain, * / *`\n * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests)\n * - `Content-Type: application/json`\n * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests)\n * - `Content-Type: application/json`\n *\n * To add or overwrite these defaults, simply add or remove a property from these configuration\n * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object\n * with the lowercased HTTP method name as the key, e.g.\n * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }`.\n *\n * The defaults can also be set at runtime via the `$http.defaults` object in the same\n * fashion. For example:\n *\n * ```\n * module.run(function($http) {\n * $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w'\n * });\n * ```\n *\n * In addition, you can supply a `headers` property in the config object passed when\n * calling `$http(config)`, which overrides the defaults without changing them globally.\n *\n * To explicitly remove a header automatically added via $httpProvider.defaults.headers on a per request basis,\n * Use the `headers` property, setting the desired header to `undefined`. For example:\n *\n * ```js\n * var req = {\n * method: 'POST',\n * url: 'http://example.com',\n * headers: {\n * 'Content-Type': undefined\n * },\n * data: { test: 'test' }\n * }\n *\n * $http(req).then(function(){...}, function(){...});\n * ```\n *\n * ## Transforming Requests and Responses\n *\n * Both requests and responses can be transformed using transformation functions: `transformRequest`\n * and `transformResponse`. These properties can be a single function that returns\n * the transformed value (`function(data, headersGetter, status)`) or an array of such transformation functions,\n * which allows you to `push` or `unshift` a new transformation function into the transformation chain.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Angular does not make a copy of the `data` parameter before it is passed into the `transformRequest` pipeline.\n * That means changes to the properties of `data` are not local to the transform function (since Javascript passes objects by reference).\n * For example, when calling `$http.get(url, $scope.myObject)`, modifications to the object's properties in a transformRequest\n * function will be reflected on the scope and in any templates where the object is data-bound.\n * To prevent this, transform functions should have no side-effects.\n * If you need to modify properties, it is recommended to make a copy of the data, or create new object to return.\n * </div>\n *\n * ### Default Transformations\n *\n * The `$httpProvider` provider and `$http` service expose `defaults.transformRequest` and\n * `defaults.transformResponse` properties. If a request does not provide its own transformations\n * then these will be applied.\n *\n * You can augment or replace the default transformations by modifying these properties by adding to or\n * replacing the array.\n *\n * Angular provides the following default transformations:\n *\n * Request transformations (`$httpProvider.defaults.transformRequest` and `$http.defaults.transformRequest`):\n *\n * - If the `data` property of the request configuration object contains an object, serialize it\n * into JSON format.\n *\n * Response transformations (`$httpProvider.defaults.transformResponse` and `$http.defaults.transformResponse`):\n *\n * - If XSRF prefix is detected, strip it (see Security Considerations section below).\n * - If JSON response is detected, deserialize it using a JSON parser.\n *\n *\n * ### Overriding the Default Transformations Per Request\n *\n * If you wish override the request/response transformations only for a single request then provide\n * `transformRequest` and/or `transformResponse` properties on the configuration object passed\n * into `$http`.\n *\n * Note that if you provide these properties on the config object the default transformations will be\n * overwritten. If you wish to augment the default transformations then you must include them in your\n * local transformation array.\n *\n * The following code demonstrates adding a new response transformation to be run after the default response\n * transformations have been run.\n *\n * ```js\n * function appendTransform(defaults, transform) {\n *\n * // We can't guarantee that the default transformation is an array\n * defaults = angular.isArray(defaults) ? defaults : [defaults];\n *\n * // Append the new transformation to the defaults\n * return defaults.concat(transform);\n * }\n *\n * $http({\n * url: '...',\n * method: 'GET',\n * transformResponse: appendTransform($http.defaults.transformResponse, function(value) {\n * return doTransform(value);\n * })\n * });\n * ```\n *\n *\n * ## Caching\n *\n * {@link ng.$http `$http`} responses are not cached by default. To enable caching, you must\n * set the config.cache value or the default cache value to TRUE or to a cache object (created\n * with {@link ng.$cacheFactory `$cacheFactory`}). If defined, the value of config.cache takes\n * precedence over the default cache value.\n *\n * In order to:\n * * cache all responses - set the default cache value to TRUE or to a cache object\n * * cache a specific response - set config.cache value to TRUE or to a cache object\n *\n * If caching is enabled, but neither the default cache nor config.cache are set to a cache object,\n * then the default `$cacheFactory($http)` object is used.\n *\n * The default cache value can be set by updating the\n * {@link ng.$http#defaults `$http.defaults.cache`} property or the\n * {@link $httpProvider#defaults `$httpProvider.defaults.cache`} property.\n *\n * When caching is enabled, {@link ng.$http `$http`} stores the response from the server using\n * the relevant cache object. The next time the same request is made, the response is returned\n * from the cache without sending a request to the server.\n *\n * Take note that:\n *\n * * Only GET and JSONP requests are cached.\n * * The cache key is the request URL including search parameters; headers are not considered.\n * * Cached responses are returned asynchronously, in the same way as responses from the server.\n * * If multiple identical requests are made using the same cache, which is not yet populated,\n * one request will be made to the server and remaining requests will return the same response.\n * * A cache-control header on the response does not affect if or how responses are cached.\n *\n *\n * ## Interceptors\n *\n * Before you start creating interceptors, be sure to understand the\n * {@link ng.$q $q and deferred/promise APIs}.\n *\n * For purposes of global error handling, authentication, or any kind of synchronous or\n * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be\n * able to intercept requests before they are handed to the server and\n * responses before they are handed over to the application code that\n * initiated these requests. The interceptors leverage the {@link ng.$q\n * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing.\n *\n * The interceptors are service factories that are registered with the `$httpProvider` by\n * adding them to the `$httpProvider.interceptors` array. The factory is called and\n * injected with dependencies (if specified) and returns the interceptor.\n *\n * There are two kinds of interceptors (and two kinds of rejection interceptors):\n *\n * * `request`: interceptors get called with a http {@link $http#usage config} object. The function is free to\n * modify the `config` object or create a new one. The function needs to return the `config`\n * object directly, or a promise containing the `config` or a new `config` object.\n * * `requestError`: interceptor gets called when a previous interceptor threw an error or\n * resolved with a rejection.\n * * `response`: interceptors get called with http `response` object. The function is free to\n * modify the `response` object or create a new one. The function needs to return the `response`\n * object directly, or as a promise containing the `response` or a new `response` object.\n * * `responseError`: interceptor gets called when a previous interceptor threw an error or\n * resolved with a rejection.\n *\n *\n * ```js\n * // register the interceptor as a service\n * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {\n * return {\n * // optional method\n * 'request': function(config) {\n * // do something on success\n * return config;\n * },\n *\n * // optional method\n * 'requestError': function(rejection) {\n * // do something on error\n * if (canRecover(rejection)) {\n * return responseOrNewPromise\n * }\n * return $q.reject(rejection);\n * },\n *\n *\n *\n * // optional method\n * 'response': function(response) {\n * // do something on success\n * return response;\n * },\n *\n * // optional method\n * 'responseError': function(rejection) {\n * // do something on error\n * if (canRecover(rejection)) {\n * return responseOrNewPromise\n * }\n * return $q.reject(rejection);\n * }\n * };\n * });\n *\n * $httpProvider.interceptors.push('myHttpInterceptor');\n *\n *\n * // alternatively, register the interceptor via an anonymous factory\n * $httpProvider.interceptors.push(function($q, dependency1, dependency2) {\n * return {\n * 'request': function(config) {\n * // same as above\n * },\n *\n * 'response': function(response) {\n * // same as above\n * }\n * };\n * });\n * ```\n *\n * ## Security Considerations\n *\n * When designing web applications, consider security threats from:\n *\n * - [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n * - [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)\n *\n * Both server and the client must cooperate in order to eliminate these threats. Angular comes\n * pre-configured with strategies that address these issues, but for this to work backend server\n * cooperation is required.\n *\n * ### JSON Vulnerability Protection\n *\n * A [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n * allows third party website to turn your JSON resource URL into\n * [JSONP](http://en.wikipedia.org/wiki/JSONP) request under some conditions. To\n * counter this your server can prefix all JSON requests with following string `\")]}',\\n\"`.\n * Angular will automatically strip the prefix before processing it as JSON.\n *\n * For example if your server needs to return:\n * ```js\n * ['one','two']\n * ```\n *\n * which is vulnerable to attack, your server can return:\n * ```js\n * )]}',\n * ['one','two']\n * ```\n *\n * Angular will strip the prefix, before processing the JSON.\n *\n *\n * ### Cross Site Request Forgery (XSRF) Protection\n *\n * [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) is an attack technique by\n * which the attacker can trick an authenticated user into unknowingly executing actions on your\n * website. Angular provides a mechanism to counter XSRF. When performing XHR requests, the\n * $http service reads a token from a cookie (by default, `XSRF-TOKEN`) and sets it as an HTTP\n * header (`X-XSRF-TOKEN`). Since only JavaScript that runs on your domain could read the\n * cookie, your server can be assured that the XHR came from JavaScript running on your domain.\n * The header will not be set for cross-domain requests.\n *\n * To take advantage of this, your server needs to set a token in a JavaScript readable session\n * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the\n * server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure\n * that only JavaScript running on your domain could have sent the request. The token must be\n * unique for each user and must be verifiable by the server (to prevent the JavaScript from\n * making up its own tokens). We recommend that the token is a digest of your site's\n * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography&#41;)\n * for added security.\n *\n * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName\n * properties of either $httpProvider.defaults at config-time, $http.defaults at run-time,\n * or the per-request config object.\n *\n * In order to prevent collisions in environments where multiple Angular apps share the\n * same domain or subdomain, we recommend that each application uses unique cookie name.\n *\n * @param {object} config Object describing the request to be made and how it should be\n * processed. The object has following properties:\n *\n * - **method** `{string}` HTTP method (e.g. 'GET', 'POST', etc)\n * - **url** `{string}` Absolute or relative URL of the resource that is being requested.\n * - **params** `{Object.<string|Object>}` Map of strings or objects which will be serialized\n * with the `paramSerializer` and appended as GET parameters.\n * - **data** `{string|Object}` Data to be sent as the request message data.\n * - **headers** `{Object}` Map of strings or functions which return strings representing\n * HTTP headers to send to the server. If the return value of a function is null, the\n * header will not be sent. Functions accept a config object as an argument.\n * - **xsrfHeaderName** `{string}` Name of HTTP header to populate with the XSRF token.\n * - **xsrfCookieName** `{string}` Name of cookie containing the XSRF token.\n * - **transformRequest** \n * `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` \n * transform function or an array of such functions. The transform function takes the http\n * request body and headers and returns its transformed (typically serialized) version.\n * See {@link ng.$http#overriding-the-default-transformations-per-request\n * Overriding the Default Transformations}\n * - **transformResponse** \n * `{function(data, headersGetter, status)|Array.<function(data, headersGetter, status)>}` \n * transform function or an array of such functions. The transform function takes the http\n * response body, headers and status and returns its transformed (typically deserialized) version.\n * See {@link ng.$http#overriding-the-default-transformations-per-request\n * Overriding the Default Transformations}\n * - **paramSerializer** - `{string|function(Object<string,string>):string}` - A function used to\n * prepare the string representation of request parameters (specified as an object).\n * If specified as string, it is interpreted as function registered with the\n * {@link $injector $injector}, which means you can create your own serializer\n * by registering it as a {@link auto.$provide#service service}.\n * The default serializer is the {@link $httpParamSerializer $httpParamSerializer};\n * alternatively, you can use the {@link $httpParamSerializerJQLike $httpParamSerializerJQLike}\n * - **cache** `{boolean|Object}` A boolean value or object created with\n * {@link ng.$cacheFactory `$cacheFactory`} to enable or disable caching of the HTTP response.\n * See {@link $http#caching $http Caching} for more information.\n * - **timeout** `{number|Promise}` timeout in milliseconds, or {@link ng.$q promise}\n * that should abort the request when resolved.\n * - **withCredentials** - `{boolean}` - whether to set the `withCredentials` flag on the\n * XHR object. See [requests with credentials](https://developer.mozilla.org/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials)\n * for more information.\n * - **responseType** - `{string}` - see\n * [XMLHttpRequest.responseType](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype).\n *\n * @returns {HttpPromise} Returns a {@link ng.$q `Promise}` that will be resolved to a response object\n * when the request succeeds or fails.\n *\n *\n * @property {Array.<Object>} pendingRequests Array of config objects for currently pending\n * requests. This is primarily meant to be used for debugging purposes.\n *\n *\n * @example\n<example module=\"httpExample\">\n<file name=\"index.html\">\n <div ng-controller=\"FetchController\">\n <select ng-model=\"method\" aria-label=\"Request method\">\n <option>GET</option>\n <option>JSONP</option>\n </select>\n <input type=\"text\" ng-model=\"url\" size=\"80\" aria-label=\"URL\" />\n <button id=\"fetchbtn\" ng-click=\"fetch()\">fetch</button><br>\n <button id=\"samplegetbtn\" ng-click=\"updateModel('GET', 'http-hello.html')\">Sample GET</button>\n <button id=\"samplejsonpbtn\"\n ng-click=\"updateModel('JSONP',\n 'https://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero')\">\n Sample JSONP\n </button>\n <button id=\"invalidjsonpbtn\"\n ng-click=\"updateModel('JSONP', 'https://angularjs.org/doesntexist&callback=JSON_CALLBACK')\">\n Invalid JSONP\n </button>\n <pre>http status code: {{status}}</pre>\n <pre>http response data: {{data}}</pre>\n </div>\n</file>\n<file name=\"script.js\">\n angular.module('httpExample', [])\n .controller('FetchController', ['$scope', '$http', '$templateCache',\n function($scope, $http, $templateCache) {\n $scope.method = 'GET';\n $scope.url = 'http-hello.html';\n\n $scope.fetch = function() {\n $scope.code = null;\n $scope.response = null;\n\n $http({method: $scope.method, url: $scope.url, cache: $templateCache}).\n then(function(response) {\n $scope.status = response.status;\n $scope.data = response.data;\n }, function(response) {\n $scope.data = response.data || \"Request failed\";\n $scope.status = response.status;\n });\n };\n\n $scope.updateModel = function(method, url) {\n $scope.method = method;\n $scope.url = url;\n };\n }]);\n</file>\n<file name=\"http-hello.html\">\n Hello, $http!\n</file>\n<file name=\"protractor.js\" type=\"protractor\">\n var status = element(by.binding('status'));\n var data = element(by.binding('data'));\n var fetchBtn = element(by.id('fetchbtn'));\n var sampleGetBtn = element(by.id('samplegetbtn'));\n var sampleJsonpBtn = element(by.id('samplejsonpbtn'));\n var invalidJsonpBtn = element(by.id('invalidjsonpbtn'));\n\n it('should make an xhr GET request', function() {\n sampleGetBtn.click();\n fetchBtn.click();\n expect(status.getText()).toMatch('200');\n expect(data.getText()).toMatch(/Hello, \\$http!/);\n });\n\n// Commented out due to flakes. See https://github.com/angular/angular.js/issues/9185\n// it('should make a JSONP request to angularjs.org', function() {\n// sampleJsonpBtn.click();\n// fetchBtn.click();\n// expect(status.getText()).toMatch('200');\n// expect(data.getText()).toMatch(/Super Hero!/);\n// });\n\n it('should make JSONP request to invalid URL and invoke the error handler',\n function() {\n invalidJsonpBtn.click();\n fetchBtn.click();\n expect(status.getText()).toMatch('0');\n expect(data.getText()).toMatch('Request failed');\n });\n</file>\n</example>\n */\n function $http(requestConfig) {\n\n if (!angular.isObject(requestConfig)) {\n throw minErr('$http')('badreq', 'Http request configuration must be an object. Received: {0}', requestConfig);\n }\n\n if (!isString(requestConfig.url)) {\n throw minErr('$http')('badreq', 'Http request configuration url must be a string. Received: {0}', requestConfig.url);\n }\n\n var config = extend({\n method: 'get',\n transformRequest: defaults.transformRequest,\n transformResponse: defaults.transformResponse,\n paramSerializer: defaults.paramSerializer\n }, requestConfig);\n\n config.headers = mergeHeaders(requestConfig);\n config.method = uppercase(config.method);\n config.paramSerializer = isString(config.paramSerializer) ?\n $injector.get(config.paramSerializer) : config.paramSerializer;\n\n var serverRequest = function(config) {\n var headers = config.headers;\n var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);\n\n // strip content-type if data is undefined\n if (isUndefined(reqData)) {\n forEach(headers, function(value, header) {\n if (lowercase(header) === 'content-type') {\n delete headers[header];\n }\n });\n }\n\n if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {\n config.withCredentials = defaults.withCredentials;\n }\n\n // send request\n return sendReq(config, reqData).then(transformResponse, transformResponse);\n };\n\n var chain = [serverRequest, undefined];\n var promise = $q.when(config);\n\n // apply interceptors\n forEach(reversedInterceptors, function(interceptor) {\n if (interceptor.request || interceptor.requestError) {\n chain.unshift(interceptor.request, interceptor.requestError);\n }\n if (interceptor.response || interceptor.responseError) {\n chain.push(interceptor.response, interceptor.responseError);\n }\n });\n\n while (chain.length) {\n var thenFn = chain.shift();\n var rejectFn = chain.shift();\n\n promise = promise.then(thenFn, rejectFn);\n }\n\n if (useLegacyPromise) {\n promise.success = function(fn) {\n assertArgFn(fn, 'fn');\n\n promise.then(function(response) {\n fn(response.data, response.status, response.headers, config);\n });\n return promise;\n };\n\n promise.error = function(fn) {\n assertArgFn(fn, 'fn');\n\n promise.then(null, function(response) {\n fn(response.data, response.status, response.headers, config);\n });\n return promise;\n };\n } else {\n promise.success = $httpMinErrLegacyFn('success');\n promise.error = $httpMinErrLegacyFn('error');\n }\n\n return promise;\n\n function transformResponse(response) {\n // make a copy since the response must be cacheable\n var resp = extend({}, response);\n resp.data = transformData(response.data, response.headers, response.status,\n config.transformResponse);\n return (isSuccess(response.status))\n ? resp\n : $q.reject(resp);\n }\n\n function executeHeaderFns(headers, config) {\n var headerContent, processedHeaders = {};\n\n forEach(headers, function(headerFn, header) {\n if (isFunction(headerFn)) {\n headerContent = headerFn(config);\n if (headerContent != null) {\n processedHeaders[header] = headerContent;\n }\n } else {\n processedHeaders[header] = headerFn;\n }\n });\n\n return processedHeaders;\n }\n\n function mergeHeaders(config) {\n var defHeaders = defaults.headers,\n reqHeaders = extend({}, config.headers),\n defHeaderName, lowercaseDefHeaderName, reqHeaderName;\n\n defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]);\n\n // using for-in instead of forEach to avoid unecessary iteration after header has been found\n defaultHeadersIteration:\n for (defHeaderName in defHeaders) {\n lowercaseDefHeaderName = lowercase(defHeaderName);\n\n for (reqHeaderName in reqHeaders) {\n if (lowercase(reqHeaderName) === lowercaseDefHeaderName) {\n continue defaultHeadersIteration;\n }\n }\n\n reqHeaders[defHeaderName] = defHeaders[defHeaderName];\n }\n\n // execute if header value is a function for merged headers\n return executeHeaderFns(reqHeaders, shallowCopy(config));\n }\n }\n\n $http.pendingRequests = [];\n\n /**\n * @ngdoc method\n * @name $http#get\n *\n * @description\n * Shortcut method to perform `GET` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#delete\n *\n * @description\n * Shortcut method to perform `DELETE` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#head\n *\n * @description\n * Shortcut method to perform `HEAD` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#jsonp\n *\n * @description\n * Shortcut method to perform `JSONP` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request.\n * The name of the callback should be the string `JSON_CALLBACK`.\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n createShortMethods('get', 'delete', 'head', 'jsonp');\n\n /**\n * @ngdoc method\n * @name $http#post\n *\n * @description\n * Shortcut method to perform `POST` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#put\n *\n * @description\n * Shortcut method to perform `PUT` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#patch\n *\n * @description\n * Shortcut method to perform `PATCH` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n createShortMethodsWithData('post', 'put', 'patch');\n\n /**\n * @ngdoc property\n * @name $http#defaults\n *\n * @description\n * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of\n * default headers, withCredentials as well as request and response transformations.\n *\n * See \"Setting HTTP Headers\" and \"Transforming Requests and Responses\" sections above.\n */\n $http.defaults = defaults;\n\n\n return $http;\n\n\n function createShortMethods(names) {\n forEach(arguments, function(name) {\n $http[name] = function(url, config) {\n return $http(extend({}, config || {}, {\n method: name,\n url: url\n }));\n };\n });\n }\n\n\n function createShortMethodsWithData(name) {\n forEach(arguments, function(name) {\n $http[name] = function(url, data, config) {\n return $http(extend({}, config || {}, {\n method: name,\n url: url,\n data: data\n }));\n };\n });\n }\n\n\n /**\n * Makes the request.\n *\n * !!! ACCESSES CLOSURE VARS:\n * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests\n */\n function sendReq(config, reqData) {\n var deferred = $q.defer(),\n promise = deferred.promise,\n cache,\n cachedResp,\n reqHeaders = config.headers,\n url = buildUrl(config.url, config.paramSerializer(config.params));\n\n $http.pendingRequests.push(config);\n promise.then(removePendingReq, removePendingReq);\n\n\n if ((config.cache || defaults.cache) && config.cache !== false &&\n (config.method === 'GET' || config.method === 'JSONP')) {\n cache = isObject(config.cache) ? config.cache\n : isObject(defaults.cache) ? defaults.cache\n : defaultCache;\n }\n\n if (cache) {\n cachedResp = cache.get(url);\n if (isDefined(cachedResp)) {\n if (isPromiseLike(cachedResp)) {\n // cached request has already been sent, but there is no response yet\n cachedResp.then(resolvePromiseWithResult, resolvePromiseWithResult);\n } else {\n // serving from cache\n if (isArray(cachedResp)) {\n resolvePromise(cachedResp[1], cachedResp[0], shallowCopy(cachedResp[2]), cachedResp[3]);\n } else {\n resolvePromise(cachedResp, 200, {}, 'OK');\n }\n }\n } else {\n // put the promise for the non-transformed response into cache as a placeholder\n cache.put(url, promise);\n }\n }\n\n\n // if we won't have the response in cache, set the xsrf headers and\n // send the request to the backend\n if (isUndefined(cachedResp)) {\n var xsrfValue = urlIsSameOrigin(config.url)\n ? $$cookieReader()[config.xsrfCookieName || defaults.xsrfCookieName]\n : undefined;\n if (xsrfValue) {\n reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;\n }\n\n $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout,\n config.withCredentials, config.responseType);\n }\n\n return promise;\n\n\n /**\n * Callback registered to $httpBackend():\n * - caches the response if desired\n * - resolves the raw $http promise\n * - calls $apply\n */\n function done(status, response, headersString, statusText) {\n if (cache) {\n if (isSuccess(status)) {\n cache.put(url, [status, response, parseHeaders(headersString), statusText]);\n } else {\n // remove promise from the cache\n cache.remove(url);\n }\n }\n\n function resolveHttpPromise() {\n resolvePromise(response, status, headersString, statusText);\n }\n\n if (useApplyAsync) {\n $rootScope.$applyAsync(resolveHttpPromise);\n } else {\n resolveHttpPromise();\n if (!$rootScope.$$phase) $rootScope.$apply();\n }\n }\n\n\n /**\n * Resolves the raw $http promise.\n */\n function resolvePromise(response, status, headers, statusText) {\n //status: HTTP response status code, 0, -1 (aborted by timeout / promise)\n status = status >= -1 ? status : 0;\n\n (isSuccess(status) ? deferred.resolve : deferred.reject)({\n data: response,\n status: status,\n headers: headersGetter(headers),\n config: config,\n statusText: statusText\n });\n }\n\n function resolvePromiseWithResult(result) {\n resolvePromise(result.data, result.status, shallowCopy(result.headers()), result.statusText);\n }\n\n function removePendingReq() {\n var idx = $http.pendingRequests.indexOf(config);\n if (idx !== -1) $http.pendingRequests.splice(idx, 1);\n }\n }\n\n\n function buildUrl(url, serializedParams) {\n if (serializedParams.length > 0) {\n url += ((url.indexOf('?') == -1) ? '?' : '&') + serializedParams;\n }\n return url;\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $xhrFactory\n *\n * @description\n * Factory function used to create XMLHttpRequest objects.\n *\n * Replace or decorate this service to create your own custom XMLHttpRequest objects.\n *\n * ```\n * angular.module('myApp', [])\n * .factory('$xhrFactory', function() {\n * return function createXhr(method, url) {\n * return new window.XMLHttpRequest({mozSystem: true});\n * };\n * });\n * ```\n *\n * @param {string} method HTTP method of the request (GET, POST, PUT, ..)\n * @param {string} url URL of the request.\n */\nfunction $xhrFactoryProvider() {\n this.$get = function() {\n return function createXhr() {\n return new window.XMLHttpRequest();\n };\n };\n}\n\n/**\n * @ngdoc service\n * @name $httpBackend\n * @requires $window\n * @requires $document\n * @requires $xhrFactory\n *\n * @description\n * HTTP backend used by the {@link ng.$http service} that delegates to\n * XMLHttpRequest object or JSONP and deals with browser incompatibilities.\n *\n * You should never need to use this service directly, instead use the higher-level abstractions:\n * {@link ng.$http $http} or {@link ngResource.$resource $resource}.\n *\n * During testing this implementation is swapped with {@link ngMock.$httpBackend mock\n * $httpBackend} which can be trained with responses.\n */\nfunction $HttpBackendProvider() {\n this.$get = ['$browser', '$window', '$document', '$xhrFactory', function($browser, $window, $document, $xhrFactory) {\n return createHttpBackend($browser, $xhrFactory, $browser.defer, $window.angular.callbacks, $document[0]);\n }];\n}\n\nfunction createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) {\n // TODO(vojta): fix the signature\n return function(method, url, post, callback, headers, timeout, withCredentials, responseType) {\n $browser.$$incOutstandingRequestCount();\n url = url || $browser.url();\n\n if (lowercase(method) == 'jsonp') {\n var callbackId = '_' + (callbacks.counter++).toString(36);\n callbacks[callbackId] = function(data) {\n callbacks[callbackId].data = data;\n callbacks[callbackId].called = true;\n };\n\n var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),\n callbackId, function(status, text) {\n completeRequest(callback, status, callbacks[callbackId].data, \"\", text);\n callbacks[callbackId] = noop;\n });\n } else {\n\n var xhr = createXhr(method, url);\n\n xhr.open(method, url, true);\n forEach(headers, function(value, key) {\n if (isDefined(value)) {\n xhr.setRequestHeader(key, value);\n }\n });\n\n xhr.onload = function requestLoaded() {\n var statusText = xhr.statusText || '';\n\n // responseText is the old-school way of retrieving response (supported by IE9)\n // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)\n var response = ('response' in xhr) ? xhr.response : xhr.responseText;\n\n // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)\n var status = xhr.status === 1223 ? 204 : xhr.status;\n\n // fix status code when it is 0 (0 status is undocumented).\n // Occurs when accessing file resources or on Android 4.1 stock browser\n // while retrieving files from application cache.\n if (status === 0) {\n status = response ? 200 : urlResolve(url).protocol == 'file' ? 404 : 0;\n }\n\n completeRequest(callback,\n status,\n response,\n xhr.getAllResponseHeaders(),\n statusText);\n };\n\n var requestError = function() {\n // The response is always empty\n // See https://xhr.spec.whatwg.org/#request-error-steps and https://fetch.spec.whatwg.org/#concept-network-error\n completeRequest(callback, -1, null, null, '');\n };\n\n xhr.onerror = requestError;\n xhr.onabort = requestError;\n\n if (withCredentials) {\n xhr.withCredentials = true;\n }\n\n if (responseType) {\n try {\n xhr.responseType = responseType;\n } catch (e) {\n // WebKit added support for the json responseType value on 09/03/2013\n // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are\n // known to throw when setting the value \"json\" as the response type. Other older\n // browsers implementing the responseType\n //\n // The json response type can be ignored if not supported, because JSON payloads are\n // parsed on the client-side regardless.\n if (responseType !== 'json') {\n throw e;\n }\n }\n }\n\n xhr.send(isUndefined(post) ? null : post);\n }\n\n if (timeout > 0) {\n var timeoutId = $browserDefer(timeoutRequest, timeout);\n } else if (isPromiseLike(timeout)) {\n timeout.then(timeoutRequest);\n }\n\n\n function timeoutRequest() {\n jsonpDone && jsonpDone();\n xhr && xhr.abort();\n }\n\n function completeRequest(callback, status, response, headersString, statusText) {\n // cancel timeout and subsequent timeout promise resolution\n if (isDefined(timeoutId)) {\n $browserDefer.cancel(timeoutId);\n }\n jsonpDone = xhr = null;\n\n callback(status, response, headersString, statusText);\n $browser.$$completeOutstandingRequest(noop);\n }\n };\n\n function jsonpReq(url, callbackId, done) {\n // we can't use jQuery/jqLite here because jQuery does crazy stuff with script elements, e.g.:\n // - fetches local scripts via XHR and evals them\n // - adds and immediately removes script elements from the document\n var script = rawDocument.createElement('script'), callback = null;\n script.type = \"text/javascript\";\n script.src = url;\n script.async = true;\n\n callback = function(event) {\n removeEventListenerFn(script, \"load\", callback);\n removeEventListenerFn(script, \"error\", callback);\n rawDocument.body.removeChild(script);\n script = null;\n var status = -1;\n var text = \"unknown\";\n\n if (event) {\n if (event.type === \"load\" && !callbacks[callbackId].called) {\n event = { type: \"error\" };\n }\n text = event.type;\n status = event.type === \"error\" ? 404 : 200;\n }\n\n if (done) {\n done(status, text);\n }\n };\n\n addEventListenerFn(script, \"load\", callback);\n addEventListenerFn(script, \"error\", callback);\n rawDocument.body.appendChild(script);\n return callback;\n }\n}\n\nvar $interpolateMinErr = angular.$interpolateMinErr = minErr('$interpolate');\n$interpolateMinErr.throwNoconcat = function(text) {\n throw $interpolateMinErr('noconcat',\n \"Error while interpolating: {0}\\nStrict Contextual Escaping disallows \" +\n \"interpolations that concatenate multiple expressions when a trusted value is \" +\n \"required. See http://docs.angularjs.org/api/ng.$sce\", text);\n};\n\n$interpolateMinErr.interr = function(text, err) {\n return $interpolateMinErr('interr', \"Can't interpolate: {0}\\n{1}\", text, err.toString());\n};\n\n/**\n * @ngdoc provider\n * @name $interpolateProvider\n *\n * @description\n *\n * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.\n *\n * @example\n<example name=\"custom-interpolation-markup\" module=\"customInterpolationApp\">\n<file name=\"index.html\">\n<script>\n var customInterpolationApp = angular.module('customInterpolationApp', []);\n\n customInterpolationApp.config(function($interpolateProvider) {\n $interpolateProvider.startSymbol('//');\n $interpolateProvider.endSymbol('//');\n });\n\n\n customInterpolationApp.controller('DemoController', function() {\n this.label = \"This binding is brought you by // interpolation symbols.\";\n });\n</script>\n<div ng-controller=\"DemoController as demo\">\n //demo.label//\n</div>\n</file>\n<file name=\"protractor.js\" type=\"protractor\">\n it('should interpolate binding with custom symbols', function() {\n expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.');\n });\n</file>\n</example>\n */\nfunction $InterpolateProvider() {\n var startSymbol = '{{';\n var endSymbol = '}}';\n\n /**\n * @ngdoc method\n * @name $interpolateProvider#startSymbol\n * @description\n * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.\n *\n * @param {string=} value new value to set the starting symbol to.\n * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n */\n this.startSymbol = function(value) {\n if (value) {\n startSymbol = value;\n return this;\n } else {\n return startSymbol;\n }\n };\n\n /**\n * @ngdoc method\n * @name $interpolateProvider#endSymbol\n * @description\n * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n *\n * @param {string=} value new value to set the ending symbol to.\n * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n */\n this.endSymbol = function(value) {\n if (value) {\n endSymbol = value;\n return this;\n } else {\n return endSymbol;\n }\n };\n\n\n this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) {\n var startSymbolLength = startSymbol.length,\n endSymbolLength = endSymbol.length,\n escapedStartRegexp = new RegExp(startSymbol.replace(/./g, escape), 'g'),\n escapedEndRegexp = new RegExp(endSymbol.replace(/./g, escape), 'g');\n\n function escape(ch) {\n return '\\\\\\\\\\\\' + ch;\n }\n\n function unescapeText(text) {\n return text.replace(escapedStartRegexp, startSymbol).\n replace(escapedEndRegexp, endSymbol);\n }\n\n function stringify(value) {\n if (value == null) { // null || undefined\n return '';\n }\n switch (typeof value) {\n case 'string':\n break;\n case 'number':\n value = '' + value;\n break;\n default:\n value = toJson(value);\n }\n\n return value;\n }\n\n /**\n * @ngdoc service\n * @name $interpolate\n * @kind function\n *\n * @requires $parse\n * @requires $sce\n *\n * @description\n *\n * Compiles a string with markup into an interpolation function. This service is used by the\n * HTML {@link ng.$compile $compile} service for data binding. See\n * {@link ng.$interpolateProvider $interpolateProvider} for configuring the\n * interpolation markup.\n *\n *\n * ```js\n * var $interpolate = ...; // injected\n * var exp = $interpolate('Hello {{name | uppercase}}!');\n * expect(exp({name:'Angular'})).toEqual('Hello ANGULAR!');\n * ```\n *\n * `$interpolate` takes an optional fourth argument, `allOrNothing`. If `allOrNothing` is\n * `true`, the interpolation function will return `undefined` unless all embedded expressions\n * evaluate to a value other than `undefined`.\n *\n * ```js\n * var $interpolate = ...; // injected\n * var context = {greeting: 'Hello', name: undefined };\n *\n * // default \"forgiving\" mode\n * var exp = $interpolate('{{greeting}} {{name}}!');\n * expect(exp(context)).toEqual('Hello !');\n *\n * // \"allOrNothing\" mode\n * exp = $interpolate('{{greeting}} {{name}}!', false, null, true);\n * expect(exp(context)).toBeUndefined();\n * context.name = 'Angular';\n * expect(exp(context)).toEqual('Hello Angular!');\n * ```\n *\n * `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior.\n *\n * ####Escaped Interpolation\n * $interpolate provides a mechanism for escaping interpolation markers. Start and end markers\n * can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash).\n * It will be rendered as a regular start/end marker, and will not be interpreted as an expression\n * or binding.\n *\n * This enables web-servers to prevent script injection attacks and defacing attacks, to some\n * degree, while also enabling code examples to work without relying on the\n * {@link ng.directive:ngNonBindable ngNonBindable} directive.\n *\n * **For security purposes, it is strongly encouraged that web servers escape user-supplied data,\n * replacing angle brackets (&lt;, &gt;) with &amp;lt; and &amp;gt; respectively, and replacing all\n * interpolation start/end markers with their escaped counterparts.**\n *\n * Escaped interpolation markers are only replaced with the actual interpolation markers in rendered\n * output when the $interpolate service processes the text. So, for HTML elements interpolated\n * by {@link ng.$compile $compile}, or otherwise interpolated with the `mustHaveExpression` parameter\n * set to `true`, the interpolated text must contain an unescaped interpolation expression. As such,\n * this is typically useful only when user-data is used in rendering a template from the server, or\n * when otherwise untrusted data is used by a directive.\n *\n * <example>\n * <file name=\"index.html\">\n * <div ng-init=\"username='A user'\">\n * <p ng-init=\"apptitle='Escaping demo'\">{{apptitle}}: \\{\\{ username = \"defaced value\"; \\}\\}\n * </p>\n * <p><strong>{{username}}</strong> attempts to inject code which will deface the\n * application, but fails to accomplish their task, because the server has correctly\n * escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash)\n * characters.</p>\n * <p>Instead, the result of the attempted script injection is visible, and can be removed\n * from the database by an administrator.</p>\n * </div>\n * </file>\n * </example>\n *\n * @knownIssue\n * It is currently not possible for an interpolated expression to contain the interpolation end\n * symbol. For example, `{{ '}}' }}` will be incorrectly interpreted as `{{ ' }}` + `' }}`, i.e.\n * an interpolated expression consisting of a single-quote (`'`) and the `' }}` string.\n *\n * @param {string} text The text with markup to interpolate.\n * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have\n * embedded expression in order to return an interpolation function. Strings with no\n * embedded expression will return null for the interpolation function.\n * @param {string=} trustedContext when provided, the returned function passes the interpolated\n * result through {@link ng.$sce#getTrusted $sce.getTrusted(interpolatedResult,\n * trustedContext)} before returning it. Refer to the {@link ng.$sce $sce} service that\n * provides Strict Contextual Escaping for details.\n * @param {boolean=} allOrNothing if `true`, then the returned function returns undefined\n * unless all embedded expressions evaluate to a value other than `undefined`.\n * @returns {function(context)} an interpolation function which is used to compute the\n * interpolated string. The function has these parameters:\n *\n * - `context`: evaluation context for all expressions embedded in the interpolated text\n */\n function $interpolate(text, mustHaveExpression, trustedContext, allOrNothing) {\n allOrNothing = !!allOrNothing;\n var startIndex,\n endIndex,\n index = 0,\n expressions = [],\n parseFns = [],\n textLength = text.length,\n exp,\n concat = [],\n expressionPositions = [];\n\n while (index < textLength) {\n if (((startIndex = text.indexOf(startSymbol, index)) != -1) &&\n ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) != -1)) {\n if (index !== startIndex) {\n concat.push(unescapeText(text.substring(index, startIndex)));\n }\n exp = text.substring(startIndex + startSymbolLength, endIndex);\n expressions.push(exp);\n parseFns.push($parse(exp, parseStringifyInterceptor));\n index = endIndex + endSymbolLength;\n expressionPositions.push(concat.length);\n concat.push('');\n } else {\n // we did not find an interpolation, so we have to add the remainder to the separators array\n if (index !== textLength) {\n concat.push(unescapeText(text.substring(index)));\n }\n break;\n }\n }\n\n // Concatenating expressions makes it hard to reason about whether some combination of\n // concatenated values are unsafe to use and could easily lead to XSS. By requiring that a\n // single expression be used for iframe[src], object[src], etc., we ensure that the value\n // that's used is assigned or constructed by some JS code somewhere that is more testable or\n // make it obvious that you bound the value to some user controlled value. This helps reduce\n // the load when auditing for XSS issues.\n if (trustedContext && concat.length > 1) {\n $interpolateMinErr.throwNoconcat(text);\n }\n\n if (!mustHaveExpression || expressions.length) {\n var compute = function(values) {\n for (var i = 0, ii = expressions.length; i < ii; i++) {\n if (allOrNothing && isUndefined(values[i])) return;\n concat[expressionPositions[i]] = values[i];\n }\n return concat.join('');\n };\n\n var getValue = function(value) {\n return trustedContext ?\n $sce.getTrusted(trustedContext, value) :\n $sce.valueOf(value);\n };\n\n return extend(function interpolationFn(context) {\n var i = 0;\n var ii = expressions.length;\n var values = new Array(ii);\n\n try {\n for (; i < ii; i++) {\n values[i] = parseFns[i](context);\n }\n\n return compute(values);\n } catch (err) {\n $exceptionHandler($interpolateMinErr.interr(text, err));\n }\n\n }, {\n // all of these properties are undocumented for now\n exp: text, //just for compatibility with regular watchers created via $watch\n expressions: expressions,\n $$watchDelegate: function(scope, listener) {\n var lastValue;\n return scope.$watchGroup(parseFns, function interpolateFnWatcher(values, oldValues) {\n var currValue = compute(values);\n if (isFunction(listener)) {\n listener.call(this, currValue, values !== oldValues ? lastValue : currValue, scope);\n }\n lastValue = currValue;\n });\n }\n });\n }\n\n function parseStringifyInterceptor(value) {\n try {\n value = getValue(value);\n return allOrNothing && !isDefined(value) ? value : stringify(value);\n } catch (err) {\n $exceptionHandler($interpolateMinErr.interr(text, err));\n }\n }\n }\n\n\n /**\n * @ngdoc method\n * @name $interpolate#startSymbol\n * @description\n * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.\n *\n * Use {@link ng.$interpolateProvider#startSymbol `$interpolateProvider.startSymbol`} to change\n * the symbol.\n *\n * @returns {string} start symbol.\n */\n $interpolate.startSymbol = function() {\n return startSymbol;\n };\n\n\n /**\n * @ngdoc method\n * @name $interpolate#endSymbol\n * @description\n * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n *\n * Use {@link ng.$interpolateProvider#endSymbol `$interpolateProvider.endSymbol`} to change\n * the symbol.\n *\n * @returns {string} end symbol.\n */\n $interpolate.endSymbol = function() {\n return endSymbol;\n };\n\n return $interpolate;\n }];\n}\n\nfunction $IntervalProvider() {\n this.$get = ['$rootScope', '$window', '$q', '$$q',\n function($rootScope, $window, $q, $$q) {\n var intervals = {};\n\n\n /**\n * @ngdoc service\n * @name $interval\n *\n * @description\n * Angular's wrapper for `window.setInterval`. The `fn` function is executed every `delay`\n * milliseconds.\n *\n * The return value of registering an interval function is a promise. This promise will be\n * notified upon each tick of the interval, and will be resolved after `count` iterations, or\n * run indefinitely if `count` is not defined. The value of the notification will be the\n * number of iterations that have run.\n * To cancel an interval, call `$interval.cancel(promise)`.\n *\n * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to\n * move forward by `millis` milliseconds and trigger any functions scheduled to run in that\n * time.\n *\n * <div class=\"alert alert-warning\">\n * **Note**: Intervals created by this service must be explicitly destroyed when you are finished\n * with them. In particular they are not automatically destroyed when a controller's scope or a\n * directive's element are destroyed.\n * You should take this into consideration and make sure to always cancel the interval at the\n * appropriate moment. See the example below for more details on how and when to do this.\n * </div>\n *\n * @param {function()} fn A function that should be called repeatedly.\n * @param {number} delay Number of milliseconds between each function call.\n * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat\n * indefinitely.\n * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n * @param {...*=} Pass additional parameters to the executed function.\n * @returns {promise} A promise which will be notified on each iteration.\n *\n * @example\n * <example module=\"intervalExample\">\n * <file name=\"index.html\">\n * <script>\n * angular.module('intervalExample', [])\n * .controller('ExampleController', ['$scope', '$interval',\n * function($scope, $interval) {\n * $scope.format = 'M/d/yy h:mm:ss a';\n * $scope.blood_1 = 100;\n * $scope.blood_2 = 120;\n *\n * var stop;\n * $scope.fight = function() {\n * // Don't start a new fight if we are already fighting\n * if ( angular.isDefined(stop) ) return;\n *\n * stop = $interval(function() {\n * if ($scope.blood_1 > 0 && $scope.blood_2 > 0) {\n * $scope.blood_1 = $scope.blood_1 - 3;\n * $scope.blood_2 = $scope.blood_2 - 4;\n * } else {\n * $scope.stopFight();\n * }\n * }, 100);\n * };\n *\n * $scope.stopFight = function() {\n * if (angular.isDefined(stop)) {\n * $interval.cancel(stop);\n * stop = undefined;\n * }\n * };\n *\n * $scope.resetFight = function() {\n * $scope.blood_1 = 100;\n * $scope.blood_2 = 120;\n * };\n *\n * $scope.$on('$destroy', function() {\n * // Make sure that the interval is destroyed too\n * $scope.stopFight();\n * });\n * }])\n * // Register the 'myCurrentTime' directive factory method.\n * // We inject $interval and dateFilter service since the factory method is DI.\n * .directive('myCurrentTime', ['$interval', 'dateFilter',\n * function($interval, dateFilter) {\n * // return the directive link function. (compile function not needed)\n * return function(scope, element, attrs) {\n * var format, // date format\n * stopTime; // so that we can cancel the time updates\n *\n * // used to update the UI\n * function updateTime() {\n * element.text(dateFilter(new Date(), format));\n * }\n *\n * // watch the expression, and update the UI on change.\n * scope.$watch(attrs.myCurrentTime, function(value) {\n * format = value;\n * updateTime();\n * });\n *\n * stopTime = $interval(updateTime, 1000);\n *\n * // listen on DOM destroy (removal) event, and cancel the next UI update\n * // to prevent updating time after the DOM element was removed.\n * element.on('$destroy', function() {\n * $interval.cancel(stopTime);\n * });\n * }\n * }]);\n * </script>\n *\n * <div>\n * <div ng-controller=\"ExampleController\">\n * <label>Date format: <input ng-model=\"format\"></label> <hr/>\n * Current time is: <span my-current-time=\"format\"></span>\n * <hr/>\n * Blood 1 : <font color='red'>{{blood_1}}</font>\n * Blood 2 : <font color='red'>{{blood_2}}</font>\n * <button type=\"button\" data-ng-click=\"fight()\">Fight</button>\n * <button type=\"button\" data-ng-click=\"stopFight()\">StopFight</button>\n * <button type=\"button\" data-ng-click=\"resetFight()\">resetFight</button>\n * </div>\n * </div>\n *\n * </file>\n * </example>\n */\n function interval(fn, delay, count, invokeApply) {\n var hasParams = arguments.length > 4,\n args = hasParams ? sliceArgs(arguments, 4) : [],\n setInterval = $window.setInterval,\n clearInterval = $window.clearInterval,\n iteration = 0,\n skipApply = (isDefined(invokeApply) && !invokeApply),\n deferred = (skipApply ? $$q : $q).defer(),\n promise = deferred.promise;\n\n count = isDefined(count) ? count : 0;\n\n promise.then(null, null, (!hasParams) ? fn : function() {\n fn.apply(null, args);\n });\n\n promise.$$intervalId = setInterval(function tick() {\n deferred.notify(iteration++);\n\n if (count > 0 && iteration >= count) {\n deferred.resolve(iteration);\n clearInterval(promise.$$intervalId);\n delete intervals[promise.$$intervalId];\n }\n\n if (!skipApply) $rootScope.$apply();\n\n }, delay);\n\n intervals[promise.$$intervalId] = deferred;\n\n return promise;\n }\n\n\n /**\n * @ngdoc method\n * @name $interval#cancel\n *\n * @description\n * Cancels a task associated with the `promise`.\n *\n * @param {Promise=} promise returned by the `$interval` function.\n * @returns {boolean} Returns `true` if the task was successfully canceled.\n */\n interval.cancel = function(promise) {\n if (promise && promise.$$intervalId in intervals) {\n intervals[promise.$$intervalId].reject('canceled');\n $window.clearInterval(promise.$$intervalId);\n delete intervals[promise.$$intervalId];\n return true;\n }\n return false;\n };\n\n return interval;\n }];\n}\n\n/**\n * @ngdoc service\n * @name $locale\n *\n * @description\n * $locale service provides localization rules for various Angular components. As of right now the\n * only public api is:\n *\n * * `id` `{string}` locale id formatted as `languageId-countryId` (e.g. `en-us`)\n */\n\nvar PATH_MATCH = /^([^\\?#]*)(\\?([^#]*))?(#(.*))?$/,\n DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};\nvar $locationMinErr = minErr('$location');\n\n\n/**\n * Encode path using encodeUriSegment, ignoring forward slashes\n *\n * @param {string} path Path to encode\n * @returns {string}\n */\nfunction encodePath(path) {\n var segments = path.split('/'),\n i = segments.length;\n\n while (i--) {\n segments[i] = encodeUriSegment(segments[i]);\n }\n\n return segments.join('/');\n}\n\nfunction parseAbsoluteUrl(absoluteUrl, locationObj) {\n var parsedUrl = urlResolve(absoluteUrl);\n\n locationObj.$$protocol = parsedUrl.protocol;\n locationObj.$$host = parsedUrl.hostname;\n locationObj.$$port = toInt(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null;\n}\n\n\nfunction parseAppUrl(relativeUrl, locationObj) {\n var prefixed = (relativeUrl.charAt(0) !== '/');\n if (prefixed) {\n relativeUrl = '/' + relativeUrl;\n }\n var match = urlResolve(relativeUrl);\n locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' ?\n match.pathname.substring(1) : match.pathname);\n locationObj.$$search = parseKeyValue(match.search);\n locationObj.$$hash = decodeURIComponent(match.hash);\n\n // make sure path starts with '/';\n if (locationObj.$$path && locationObj.$$path.charAt(0) != '/') {\n locationObj.$$path = '/' + locationObj.$$path;\n }\n}\n\n\n/**\n *\n * @param {string} begin\n * @param {string} whole\n * @returns {string} returns text from whole after begin or undefined if it does not begin with\n * expected string.\n */\nfunction beginsWith(begin, whole) {\n if (whole.indexOf(begin) === 0) {\n return whole.substr(begin.length);\n }\n}\n\n\nfunction stripHash(url) {\n var index = url.indexOf('#');\n return index == -1 ? url : url.substr(0, index);\n}\n\nfunction trimEmptyHash(url) {\n return url.replace(/(#.+)|#$/, '$1');\n}\n\n\nfunction stripFile(url) {\n return url.substr(0, stripHash(url).lastIndexOf('/') + 1);\n}\n\n/* return the server only (scheme://host:port) */\nfunction serverBase(url) {\n return url.substring(0, url.indexOf('/', url.indexOf('//') + 2));\n}\n\n\n/**\n * LocationHtml5Url represents an url\n * This object is exposed as $location service when HTML5 mode is enabled and supported\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} appBaseNoFile application base URL stripped of any filename\n * @param {string} basePrefix url path prefix\n */\nfunction LocationHtml5Url(appBase, appBaseNoFile, basePrefix) {\n this.$$html5 = true;\n basePrefix = basePrefix || '';\n parseAbsoluteUrl(appBase, this);\n\n\n /**\n * Parse given html5 (regular) url string into properties\n * @param {string} url HTML5 url\n * @private\n */\n this.$$parse = function(url) {\n var pathUrl = beginsWith(appBaseNoFile, url);\n if (!isString(pathUrl)) {\n throw $locationMinErr('ipthprfx', 'Invalid url \"{0}\", missing path prefix \"{1}\".', url,\n appBaseNoFile);\n }\n\n parseAppUrl(pathUrl, this);\n\n if (!this.$$path) {\n this.$$path = '/';\n }\n\n this.$$compose();\n };\n\n /**\n * Compose url and update `absUrl` property\n * @private\n */\n this.$$compose = function() {\n var search = toKeyValue(this.$$search),\n hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n this.$$absUrl = appBaseNoFile + this.$$url.substr(1); // first char is always '/'\n };\n\n this.$$parseLinkUrl = function(url, relHref) {\n if (relHref && relHref[0] === '#') {\n // special case for links to hash fragments:\n // keep the old url and only replace the hash fragment\n this.hash(relHref.slice(1));\n return true;\n }\n var appUrl, prevAppUrl;\n var rewrittenUrl;\n\n if (isDefined(appUrl = beginsWith(appBase, url))) {\n prevAppUrl = appUrl;\n if (isDefined(appUrl = beginsWith(basePrefix, appUrl))) {\n rewrittenUrl = appBaseNoFile + (beginsWith('/', appUrl) || appUrl);\n } else {\n rewrittenUrl = appBase + prevAppUrl;\n }\n } else if (isDefined(appUrl = beginsWith(appBaseNoFile, url))) {\n rewrittenUrl = appBaseNoFile + appUrl;\n } else if (appBaseNoFile == url + '/') {\n rewrittenUrl = appBaseNoFile;\n }\n if (rewrittenUrl) {\n this.$$parse(rewrittenUrl);\n }\n return !!rewrittenUrl;\n };\n}\n\n\n/**\n * LocationHashbangUrl represents url\n * This object is exposed as $location service when developer doesn't opt into html5 mode.\n * It also serves as the base class for html5 mode fallback on legacy browsers.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} appBaseNoFile application base URL stripped of any filename\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangUrl(appBase, appBaseNoFile, hashPrefix) {\n\n parseAbsoluteUrl(appBase, this);\n\n\n /**\n * Parse given hashbang url into properties\n * @param {string} url Hashbang url\n * @private\n */\n this.$$parse = function(url) {\n var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url);\n var withoutHashUrl;\n\n if (!isUndefined(withoutBaseUrl) && withoutBaseUrl.charAt(0) === '#') {\n\n // The rest of the url starts with a hash so we have\n // got either a hashbang path or a plain hash fragment\n withoutHashUrl = beginsWith(hashPrefix, withoutBaseUrl);\n if (isUndefined(withoutHashUrl)) {\n // There was no hashbang prefix so we just have a hash fragment\n withoutHashUrl = withoutBaseUrl;\n }\n\n } else {\n // There was no hashbang path nor hash fragment:\n // If we are in HTML5 mode we use what is left as the path;\n // Otherwise we ignore what is left\n if (this.$$html5) {\n withoutHashUrl = withoutBaseUrl;\n } else {\n withoutHashUrl = '';\n if (isUndefined(withoutBaseUrl)) {\n appBase = url;\n this.replace();\n }\n }\n }\n\n parseAppUrl(withoutHashUrl, this);\n\n this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase);\n\n this.$$compose();\n\n /*\n * In Windows, on an anchor node on documents loaded from\n * the filesystem, the browser will return a pathname\n * prefixed with the drive name ('/C:/path') when a\n * pathname without a drive is set:\n * * a.setAttribute('href', '/foo')\n * * a.pathname === '/C:/foo' //true\n *\n * Inside of Angular, we're always using pathnames that\n * do not include drive names for routing.\n */\n function removeWindowsDriveName(path, url, base) {\n /*\n Matches paths for file protocol on windows,\n such as /C:/foo/bar, and captures only /foo/bar.\n */\n var windowsFilePathExp = /^\\/[A-Z]:(\\/.*)/;\n\n var firstPathSegmentMatch;\n\n //Get the relative path from the input URL.\n if (url.indexOf(base) === 0) {\n url = url.replace(base, '');\n }\n\n // The input URL intentionally contains a first path segment that ends with a colon.\n if (windowsFilePathExp.exec(url)) {\n return path;\n }\n\n firstPathSegmentMatch = windowsFilePathExp.exec(path);\n return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path;\n }\n };\n\n /**\n * Compose hashbang url and update `absUrl` property\n * @private\n */\n this.$$compose = function() {\n var search = toKeyValue(this.$$search),\n hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n this.$$absUrl = appBase + (this.$$url ? hashPrefix + this.$$url : '');\n };\n\n this.$$parseLinkUrl = function(url, relHref) {\n if (stripHash(appBase) == stripHash(url)) {\n this.$$parse(url);\n return true;\n }\n return false;\n };\n}\n\n\n/**\n * LocationHashbangUrl represents url\n * This object is exposed as $location service when html5 history api is enabled but the browser\n * does not support it.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} appBaseNoFile application base URL stripped of any filename\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangInHtml5Url(appBase, appBaseNoFile, hashPrefix) {\n this.$$html5 = true;\n LocationHashbangUrl.apply(this, arguments);\n\n this.$$parseLinkUrl = function(url, relHref) {\n if (relHref && relHref[0] === '#') {\n // special case for links to hash fragments:\n // keep the old url and only replace the hash fragment\n this.hash(relHref.slice(1));\n return true;\n }\n\n var rewrittenUrl;\n var appUrl;\n\n if (appBase == stripHash(url)) {\n rewrittenUrl = url;\n } else if ((appUrl = beginsWith(appBaseNoFile, url))) {\n rewrittenUrl = appBase + hashPrefix + appUrl;\n } else if (appBaseNoFile === url + '/') {\n rewrittenUrl = appBaseNoFile;\n }\n if (rewrittenUrl) {\n this.$$parse(rewrittenUrl);\n }\n return !!rewrittenUrl;\n };\n\n this.$$compose = function() {\n var search = toKeyValue(this.$$search),\n hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n // include hashPrefix in $$absUrl when $$url is empty so IE9 does not reload page because of removal of '#'\n this.$$absUrl = appBase + hashPrefix + this.$$url;\n };\n\n}\n\n\nvar locationPrototype = {\n\n /**\n * Are we in html5 mode?\n * @private\n */\n $$html5: false,\n\n /**\n * Has any change been replacing?\n * @private\n */\n $$replace: false,\n\n /**\n * @ngdoc method\n * @name $location#absUrl\n *\n * @description\n * This method is getter only.\n *\n * Return full url representation with all segments encoded according to rules specified in\n * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt).\n *\n *\n * ```js\n * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n * var absUrl = $location.absUrl();\n * // => \"http://example.com/#/some/path?foo=bar&baz=xoxo\"\n * ```\n *\n * @return {string} full url\n */\n absUrl: locationGetter('$$absUrl'),\n\n /**\n * @ngdoc method\n * @name $location#url\n *\n * @description\n * This method is getter / setter.\n *\n * Return url (e.g. `/path?a=b#hash`) when called without any parameter.\n *\n * Change path, search and hash, when called with parameter and return `$location`.\n *\n *\n * ```js\n * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n * var url = $location.url();\n * // => \"/some/path?foo=bar&baz=xoxo\"\n * ```\n *\n * @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`)\n * @return {string} url\n */\n url: function(url) {\n if (isUndefined(url)) {\n return this.$$url;\n }\n\n var match = PATH_MATCH.exec(url);\n if (match[1] || url === '') this.path(decodeURIComponent(match[1]));\n if (match[2] || match[1] || url === '') this.search(match[3] || '');\n this.hash(match[5] || '');\n\n return this;\n },\n\n /**\n * @ngdoc method\n * @name $location#protocol\n *\n * @description\n * This method is getter only.\n *\n * Return protocol of current url.\n *\n *\n * ```js\n * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n * var protocol = $location.protocol();\n * // => \"http\"\n * ```\n *\n * @return {string} protocol of current url\n */\n protocol: locationGetter('$$protocol'),\n\n /**\n * @ngdoc method\n * @name $location#host\n *\n * @description\n * This method is getter only.\n *\n * Return host of current url.\n *\n * Note: compared to the non-angular version `location.host` which returns `hostname:port`, this returns the `hostname` portion only.\n *\n *\n * ```js\n * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n * var host = $location.host();\n * // => \"example.com\"\n *\n * // given url http://user:password@example.com:8080/#/some/path?foo=bar&baz=xoxo\n * host = $location.host();\n * // => \"example.com\"\n * host = location.host;\n * // => \"example.com:8080\"\n * ```\n *\n * @return {string} host of current url.\n */\n host: locationGetter('$$host'),\n\n /**\n * @ngdoc method\n * @name $location#port\n *\n * @description\n * This method is getter only.\n *\n * Return port of current url.\n *\n *\n * ```js\n * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n * var port = $location.port();\n * // => 80\n * ```\n *\n * @return {Number} port\n */\n port: locationGetter('$$port'),\n\n /**\n * @ngdoc method\n * @name $location#path\n *\n * @description\n * This method is getter / setter.\n *\n * Return path of current url when called without any parameter.\n *\n * Change path when called with parameter and return `$location`.\n *\n * Note: Path should always begin with forward slash (/), this method will add the forward slash\n * if it is missing.\n *\n *\n * ```js\n * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n * var path = $location.path();\n * // => \"/some/path\"\n * ```\n *\n * @param {(string|number)=} path New path\n * @return {(string|object)} path if called with no parameters, or `$location` if called with a parameter\n */\n path: locationGetterSetter('$$path', function(path) {\n path = path !== null ? path.toString() : '';\n return path.charAt(0) == '/' ? path : '/' + path;\n }),\n\n /**\n * @ngdoc method\n * @name $location#search\n *\n * @description\n * This method is getter / setter.\n *\n * Return search part (as object) of current url when called without any parameter.\n *\n * Change search part when called with parameter and return `$location`.\n *\n *\n * ```js\n * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n * var searchObject = $location.search();\n * // => {foo: 'bar', baz: 'xoxo'}\n *\n * // set foo to 'yipee'\n * $location.search('foo', 'yipee');\n * // $location.search() => {foo: 'yipee', baz: 'xoxo'}\n * ```\n *\n * @param {string|Object.<string>|Object.<Array.<string>>} search New search params - string or\n * hash object.\n *\n * When called with a single argument the method acts as a setter, setting the `search` component\n * of `$location` to the specified value.\n *\n * If the argument is a hash object containing an array of values, these values will be encoded\n * as duplicate search parameters in the url.\n *\n * @param {(string|Number|Array<string>|boolean)=} paramValue If `search` is a string or number, then `paramValue`\n * will override only a single search property.\n *\n * If `paramValue` is an array, it will override the property of the `search` component of\n * `$location` specified via the first argument.\n *\n * If `paramValue` is `null`, the property specified via the first argument will be deleted.\n *\n * If `paramValue` is `true`, the property specified via the first argument will be added with no\n * value nor trailing equal sign.\n *\n * @return {Object} If called with no arguments returns the parsed `search` object. If called with\n * one or more arguments returns `$location` object itself.\n */\n search: function(search, paramValue) {\n switch (arguments.length) {\n case 0:\n return this.$$search;\n case 1:\n if (isString(search) || isNumber(search)) {\n search = search.toString();\n this.$$search = parseKeyValue(search);\n } else if (isObject(search)) {\n search = copy(search, {});\n // remove object undefined or null properties\n forEach(search, function(value, key) {\n if (value == null) delete search[key];\n });\n\n this.$$search = search;\n } else {\n throw $locationMinErr('isrcharg',\n 'The first argument of the `$location#search()` call must be a string or an object.');\n }\n break;\n default:\n if (isUndefined(paramValue) || paramValue === null) {\n delete this.$$search[search];\n } else {\n this.$$search[search] = paramValue;\n }\n }\n\n this.$$compose();\n return this;\n },\n\n /**\n * @ngdoc method\n * @name $location#hash\n *\n * @description\n * This method is getter / setter.\n *\n * Returns the hash fragment when called without any parameters.\n *\n * Changes the hash fragment when called with a parameter and returns `$location`.\n *\n *\n * ```js\n * // given url http://example.com/#/some/path?foo=bar&baz=xoxo#hashValue\n * var hash = $location.hash();\n * // => \"hashValue\"\n * ```\n *\n * @param {(string|number)=} hash New hash fragment\n * @return {string} hash\n */\n hash: locationGetterSetter('$$hash', function(hash) {\n return hash !== null ? hash.toString() : '';\n }),\n\n /**\n * @ngdoc method\n * @name $location#replace\n *\n * @description\n * If called, all changes to $location during the current `$digest` will replace the current history\n * record, instead of adding a new one.\n */\n replace: function() {\n this.$$replace = true;\n return this;\n }\n};\n\nforEach([LocationHashbangInHtml5Url, LocationHashbangUrl, LocationHtml5Url], function(Location) {\n Location.prototype = Object.create(locationPrototype);\n\n /**\n * @ngdoc method\n * @name $location#state\n *\n * @description\n * This method is getter / setter.\n *\n * Return the history state object when called without any parameter.\n *\n * Change the history state object when called with one parameter and return `$location`.\n * The state object is later passed to `pushState` or `replaceState`.\n *\n * NOTE: This method is supported only in HTML5 mode and only in browsers supporting\n * the HTML5 History API (i.e. methods `pushState` and `replaceState`). If you need to support\n * older browsers (like IE9 or Android < 4.0), don't use this method.\n *\n * @param {object=} state State object for pushState or replaceState\n * @return {object} state\n */\n Location.prototype.state = function(state) {\n if (!arguments.length) {\n return this.$$state;\n }\n\n if (Location !== LocationHtml5Url || !this.$$html5) {\n throw $locationMinErr('nostate', 'History API state support is available only ' +\n 'in HTML5 mode and only in browsers supporting HTML5 History API');\n }\n // The user might modify `stateObject` after invoking `$location.state(stateObject)`\n // but we're changing the $$state reference to $browser.state() during the $digest\n // so the modification window is narrow.\n this.$$state = isUndefined(state) ? null : state;\n\n return this;\n };\n});\n\n\nfunction locationGetter(property) {\n return function() {\n return this[property];\n };\n}\n\n\nfunction locationGetterSetter(property, preprocess) {\n return function(value) {\n if (isUndefined(value)) {\n return this[property];\n }\n\n this[property] = preprocess(value);\n this.$$compose();\n\n return this;\n };\n}\n\n\n/**\n * @ngdoc service\n * @name $location\n *\n * @requires $rootElement\n *\n * @description\n * The $location service parses the URL in the browser address bar (based on the\n * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL\n * available to your application. Changes to the URL in the address bar are reflected into\n * $location service and changes to $location are reflected into the browser address bar.\n *\n * **The $location service:**\n *\n * - Exposes the current URL in the browser address bar, so you can\n * - Watch and observe the URL.\n * - Change the URL.\n * - Synchronizes the URL with the browser when the user\n * - Changes the address bar.\n * - Clicks the back or forward button (or clicks a History link).\n * - Clicks on a link.\n * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).\n *\n * For more information see {@link guide/$location Developer Guide: Using $location}\n */\n\n/**\n * @ngdoc provider\n * @name $locationProvider\n * @description\n * Use the `$locationProvider` to configure how the application deep linking paths are stored.\n */\nfunction $LocationProvider() {\n var hashPrefix = '',\n html5Mode = {\n enabled: false,\n requireBase: true,\n rewriteLinks: true\n };\n\n /**\n * @ngdoc method\n * @name $locationProvider#hashPrefix\n * @description\n * @param {string=} prefix Prefix for hash part (containing path and search)\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n */\n this.hashPrefix = function(prefix) {\n if (isDefined(prefix)) {\n hashPrefix = prefix;\n return this;\n } else {\n return hashPrefix;\n }\n };\n\n /**\n * @ngdoc method\n * @name $locationProvider#html5Mode\n * @description\n * @param {(boolean|Object)=} mode If boolean, sets `html5Mode.enabled` to value.\n * If object, sets `enabled`, `requireBase` and `rewriteLinks` to respective values. Supported\n * properties:\n * - **enabled** `{boolean}` (default: false) If true, will rely on `history.pushState` to\n * change urls where supported. Will fall back to hash-prefixed paths in browsers that do not\n * support `pushState`.\n * - **requireBase** - `{boolean}` - (default: `true`) When html5Mode is enabled, specifies\n * whether or not a <base> tag is required to be present. If `enabled` and `requireBase` are\n * true, and a base tag is not present, an error will be thrown when `$location` is injected.\n * See the {@link guide/$location $location guide for more information}\n * - **rewriteLinks** - `{boolean}` - (default: `true`) When html5Mode is enabled,\n * enables/disables url rewriting for relative links.\n *\n * @returns {Object} html5Mode object if used as getter or itself (chaining) if used as setter\n */\n this.html5Mode = function(mode) {\n if (isBoolean(mode)) {\n html5Mode.enabled = mode;\n return this;\n } else if (isObject(mode)) {\n\n if (isBoolean(mode.enabled)) {\n html5Mode.enabled = mode.enabled;\n }\n\n if (isBoolean(mode.requireBase)) {\n html5Mode.requireBase = mode.requireBase;\n }\n\n if (isBoolean(mode.rewriteLinks)) {\n html5Mode.rewriteLinks = mode.rewriteLinks;\n }\n\n return this;\n } else {\n return html5Mode;\n }\n };\n\n /**\n * @ngdoc event\n * @name $location#$locationChangeStart\n * @eventType broadcast on root scope\n * @description\n * Broadcasted before a URL will change.\n *\n * This change can be prevented by calling\n * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more\n * details about event object. Upon successful change\n * {@link ng.$location#$locationChangeSuccess $locationChangeSuccess} is fired.\n *\n * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when\n * the browser supports the HTML5 History API.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {string} newUrl New URL\n * @param {string=} oldUrl URL that was before it was changed.\n * @param {string=} newState New history state object\n * @param {string=} oldState History state object that was before it was changed.\n */\n\n /**\n * @ngdoc event\n * @name $location#$locationChangeSuccess\n * @eventType broadcast on root scope\n * @description\n * Broadcasted after a URL was changed.\n *\n * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when\n * the browser supports the HTML5 History API.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {string} newUrl New URL\n * @param {string=} oldUrl URL that was before it was changed.\n * @param {string=} newState New history state object\n * @param {string=} oldState History state object that was before it was changed.\n */\n\n this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement', '$window',\n function($rootScope, $browser, $sniffer, $rootElement, $window) {\n var $location,\n LocationMode,\n baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to ''\n initialUrl = $browser.url(),\n appBase;\n\n if (html5Mode.enabled) {\n if (!baseHref && html5Mode.requireBase) {\n throw $locationMinErr('nobase',\n \"$location in HTML5 mode requires a <base> tag to be present!\");\n }\n appBase = serverBase(initialUrl) + (baseHref || '/');\n LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url;\n } else {\n appBase = stripHash(initialUrl);\n LocationMode = LocationHashbangUrl;\n }\n var appBaseNoFile = stripFile(appBase);\n\n $location = new LocationMode(appBase, appBaseNoFile, '#' + hashPrefix);\n $location.$$parseLinkUrl(initialUrl, initialUrl);\n\n $location.$$state = $browser.state();\n\n var IGNORE_URI_REGEXP = /^\\s*(javascript|mailto):/i;\n\n function setBrowserUrlWithFallback(url, replace, state) {\n var oldUrl = $location.url();\n var oldState = $location.$$state;\n try {\n $browser.url(url, replace, state);\n\n // Make sure $location.state() returns referentially identical (not just deeply equal)\n // state object; this makes possible quick checking if the state changed in the digest\n // loop. Checking deep equality would be too expensive.\n $location.$$state = $browser.state();\n } catch (e) {\n // Restore old values if pushState fails\n $location.url(oldUrl);\n $location.$$state = oldState;\n\n throw e;\n }\n }\n\n $rootElement.on('click', function(event) {\n // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)\n // currently we open nice url link and redirect then\n\n if (!html5Mode.rewriteLinks || event.ctrlKey || event.metaKey || event.shiftKey || event.which == 2 || event.button == 2) return;\n\n var elm = jqLite(event.target);\n\n // traverse the DOM up to find first A tag\n while (nodeName_(elm[0]) !== 'a') {\n // ignore rewriting if no A tag (reached root element, or no parent - removed from document)\n if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return;\n }\n\n var absHref = elm.prop('href');\n // get the actual href attribute - see\n // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx\n var relHref = elm.attr('href') || elm.attr('xlink:href');\n\n if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') {\n // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during\n // an animation.\n absHref = urlResolve(absHref.animVal).href;\n }\n\n // Ignore when url is started with javascript: or mailto:\n if (IGNORE_URI_REGEXP.test(absHref)) return;\n\n if (absHref && !elm.attr('target') && !event.isDefaultPrevented()) {\n if ($location.$$parseLinkUrl(absHref, relHref)) {\n // We do a preventDefault for all urls that are part of the angular application,\n // in html5mode and also without, so that we are able to abort navigation without\n // getting double entries in the location history.\n event.preventDefault();\n // update location manually\n if ($location.absUrl() != $browser.url()) {\n $rootScope.$apply();\n // hack to work around FF6 bug 684208 when scenario runner clicks on links\n $window.angular['ff-684208-preventDefault'] = true;\n }\n }\n }\n });\n\n\n // rewrite hashbang url <> html5 url\n if (trimEmptyHash($location.absUrl()) != trimEmptyHash(initialUrl)) {\n $browser.url($location.absUrl(), true);\n }\n\n var initializing = true;\n\n // update $location when $browser url changes\n $browser.onUrlChange(function(newUrl, newState) {\n\n if (isUndefined(beginsWith(appBaseNoFile, newUrl))) {\n // If we are navigating outside of the app then force a reload\n $window.location.href = newUrl;\n return;\n }\n\n $rootScope.$evalAsync(function() {\n var oldUrl = $location.absUrl();\n var oldState = $location.$$state;\n var defaultPrevented;\n newUrl = trimEmptyHash(newUrl);\n $location.$$parse(newUrl);\n $location.$$state = newState;\n\n defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,\n newState, oldState).defaultPrevented;\n\n // if the location was changed by a `$locationChangeStart` handler then stop\n // processing this location change\n if ($location.absUrl() !== newUrl) return;\n\n if (defaultPrevented) {\n $location.$$parse(oldUrl);\n $location.$$state = oldState;\n setBrowserUrlWithFallback(oldUrl, false, oldState);\n } else {\n initializing = false;\n afterLocationChange(oldUrl, oldState);\n }\n });\n if (!$rootScope.$$phase) $rootScope.$digest();\n });\n\n // update browser\n $rootScope.$watch(function $locationWatch() {\n var oldUrl = trimEmptyHash($browser.url());\n var newUrl = trimEmptyHash($location.absUrl());\n var oldState = $browser.state();\n var currentReplace = $location.$$replace;\n var urlOrStateChanged = oldUrl !== newUrl ||\n ($location.$$html5 && $sniffer.history && oldState !== $location.$$state);\n\n if (initializing || urlOrStateChanged) {\n initializing = false;\n\n $rootScope.$evalAsync(function() {\n var newUrl = $location.absUrl();\n var defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,\n $location.$$state, oldState).defaultPrevented;\n\n // if the location was changed by a `$locationChangeStart` handler then stop\n // processing this location change\n if ($location.absUrl() !== newUrl) return;\n\n if (defaultPrevented) {\n $location.$$parse(oldUrl);\n $location.$$state = oldState;\n } else {\n if (urlOrStateChanged) {\n setBrowserUrlWithFallback(newUrl, currentReplace,\n oldState === $location.$$state ? null : $location.$$state);\n }\n afterLocationChange(oldUrl, oldState);\n }\n });\n }\n\n $location.$$replace = false;\n\n // we don't need to return anything because $evalAsync will make the digest loop dirty when\n // there is a change\n });\n\n return $location;\n\n function afterLocationChange(oldUrl, oldState) {\n $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl,\n $location.$$state, oldState);\n }\n}];\n}\n\n/**\n * @ngdoc service\n * @name $log\n * @requires $window\n *\n * @description\n * Simple service for logging. Default implementation safely writes the message\n * into the browser's console (if present).\n *\n * The main purpose of this service is to simplify debugging and troubleshooting.\n *\n * The default is to log `debug` messages. You can use\n * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this.\n *\n * @example\n <example module=\"logExample\">\n <file name=\"script.js\">\n angular.module('logExample', [])\n .controller('LogController', ['$scope', '$log', function($scope, $log) {\n $scope.$log = $log;\n $scope.message = 'Hello World!';\n }]);\n </file>\n <file name=\"index.html\">\n <div ng-controller=\"LogController\">\n <p>Reload this page with open console, enter text and hit the log button...</p>\n <label>Message:\n <input type=\"text\" ng-model=\"message\" /></label>\n <button ng-click=\"$log.log(message)\">log</button>\n <button ng-click=\"$log.warn(message)\">warn</button>\n <button ng-click=\"$log.info(message)\">info</button>\n <button ng-click=\"$log.error(message)\">error</button>\n <button ng-click=\"$log.debug(message)\">debug</button>\n </div>\n </file>\n </example>\n */\n\n/**\n * @ngdoc provider\n * @name $logProvider\n * @description\n * Use the `$logProvider` to configure how the application logs messages\n */\nfunction $LogProvider() {\n var debug = true,\n self = this;\n\n /**\n * @ngdoc method\n * @name $logProvider#debugEnabled\n * @description\n * @param {boolean=} flag enable or disable debug level messages\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n */\n this.debugEnabled = function(flag) {\n if (isDefined(flag)) {\n debug = flag;\n return this;\n } else {\n return debug;\n }\n };\n\n this.$get = ['$window', function($window) {\n return {\n /**\n * @ngdoc method\n * @name $log#log\n *\n * @description\n * Write a log message\n */\n log: consoleLog('log'),\n\n /**\n * @ngdoc method\n * @name $log#info\n *\n * @description\n * Write an information message\n */\n info: consoleLog('info'),\n\n /**\n * @ngdoc method\n * @name $log#warn\n *\n * @description\n * Write a warning message\n */\n warn: consoleLog('warn'),\n\n /**\n * @ngdoc method\n * @name $log#error\n *\n * @description\n * Write an error message\n */\n error: consoleLog('error'),\n\n /**\n * @ngdoc method\n * @name $log#debug\n *\n * @description\n * Write a debug message\n */\n debug: (function() {\n var fn = consoleLog('debug');\n\n return function() {\n if (debug) {\n fn.apply(self, arguments);\n }\n };\n }())\n };\n\n function formatError(arg) {\n if (arg instanceof Error) {\n if (arg.stack) {\n arg = (arg.message && arg.stack.indexOf(arg.message) === -1)\n ? 'Error: ' + arg.message + '\\n' + arg.stack\n : arg.stack;\n } else if (arg.sourceURL) {\n arg = arg.message + '\\n' + arg.sourceURL + ':' + arg.line;\n }\n }\n return arg;\n }\n\n function consoleLog(type) {\n var console = $window.console || {},\n logFn = console[type] || console.log || noop,\n hasApply = false;\n\n // Note: reading logFn.apply throws an error in IE11 in IE8 document mode.\n // The reason behind this is that console.log has type \"object\" in IE8...\n try {\n hasApply = !!logFn.apply;\n } catch (e) {}\n\n if (hasApply) {\n return function() {\n var args = [];\n forEach(arguments, function(arg) {\n args.push(formatError(arg));\n });\n return logFn.apply(console, args);\n };\n }\n\n // we are IE which either doesn't have window.console => this is noop and we do nothing,\n // or we are IE where console.log doesn't have apply so we log at least first 2 args\n return function(arg1, arg2) {\n logFn(arg1, arg2 == null ? '' : arg2);\n };\n }\n }];\n}\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * Any commits to this file should be reviewed with security in mind. *\n * Changes to this file can potentially create security vulnerabilities. *\n * An approval from 2 Core members with history of modifying *\n * this file is required. *\n * *\n * Does the change somehow allow for arbitrary javascript to be executed? *\n * Or allows for someone to change the prototype of built-in objects? *\n * Or gives undesired access to variables likes document or window? *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\nvar $parseMinErr = minErr('$parse');\n\n// Sandboxing Angular Expressions\n// ------------------------------\n// Angular expressions are generally considered safe because these expressions only have direct\n// access to `$scope` and locals. However, one can obtain the ability to execute arbitrary JS code by\n// obtaining a reference to native JS functions such as the Function constructor.\n//\n// As an example, consider the following Angular expression:\n//\n// {}.toString.constructor('alert(\"evil JS code\")')\n//\n// This sandboxing technique is not perfect and doesn't aim to be. The goal is to prevent exploits\n// against the expression language, but not to prevent exploits that were enabled by exposing\n// sensitive JavaScript or browser APIs on Scope. Exposing such objects on a Scope is never a good\n// practice and therefore we are not even trying to protect against interaction with an object\n// explicitly exposed in this way.\n//\n// In general, it is not possible to access a Window object from an angular expression unless a\n// window or some DOM object that has a reference to window is published onto a Scope.\n// Similarly we prevent invocations of function known to be dangerous, as well as assignments to\n// native objects.\n//\n// See https://docs.angularjs.org/guide/security\n\n\nfunction ensureSafeMemberName(name, fullExpression) {\n if (name === \"__defineGetter__\" || name === \"__defineSetter__\"\n || name === \"__lookupGetter__\" || name === \"__lookupSetter__\"\n || name === \"__proto__\") {\n throw $parseMinErr('isecfld',\n 'Attempting to access a disallowed field in Angular expressions! '\n + 'Expression: {0}', fullExpression);\n }\n return name;\n}\n\nfunction getStringValue(name, fullExpression) {\n // From the JavaScript docs:\n // Property names must be strings. This means that non-string objects cannot be used\n // as keys in an object. Any non-string object, including a number, is typecasted\n // into a string via the toString method.\n //\n // So, to ensure that we are checking the same `name` that JavaScript would use,\n // we cast it to a string, if possible.\n // Doing `name + ''` can cause a repl error if the result to `toString` is not a string,\n // this is, this will handle objects that misbehave.\n name = name + '';\n if (!isString(name)) {\n throw $parseMinErr('iseccst',\n 'Cannot convert object to primitive value! '\n + 'Expression: {0}', fullExpression);\n }\n return name;\n}\n\nfunction ensureSafeObject(obj, fullExpression) {\n // nifty check if obj is Function that is fast and works across iframes and other contexts\n if (obj) {\n if (obj.constructor === obj) {\n throw $parseMinErr('isecfn',\n 'Referencing Function in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (// isWindow(obj)\n obj.window === obj) {\n throw $parseMinErr('isecwindow',\n 'Referencing the Window in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (// isElement(obj)\n obj.children && (obj.nodeName || (obj.prop && obj.attr && obj.find))) {\n throw $parseMinErr('isecdom',\n 'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (// block Object so that we can't get hold of dangerous Object.* methods\n obj === Object) {\n throw $parseMinErr('isecobj',\n 'Referencing Object in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n }\n }\n return obj;\n}\n\nvar CALL = Function.prototype.call;\nvar APPLY = Function.prototype.apply;\nvar BIND = Function.prototype.bind;\n\nfunction ensureSafeFunction(obj, fullExpression) {\n if (obj) {\n if (obj.constructor === obj) {\n throw $parseMinErr('isecfn',\n 'Referencing Function in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (obj === CALL || obj === APPLY || obj === BIND) {\n throw $parseMinErr('isecff',\n 'Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n }\n }\n}\n\nfunction ensureSafeAssignContext(obj, fullExpression) {\n if (obj) {\n if (obj === (0).constructor || obj === (false).constructor || obj === ''.constructor ||\n obj === {}.constructor || obj === [].constructor || obj === Function.constructor) {\n throw $parseMinErr('isecaf',\n 'Assigning to a constructor is disallowed! Expression: {0}', fullExpression);\n }\n }\n}\n\nvar OPERATORS = createMap();\nforEach('+ - * / % === !== == != < > <= >= && || ! = |'.split(' '), function(operator) { OPERATORS[operator] = true; });\nvar ESCAPE = {\"n\":\"\\n\", \"f\":\"\\f\", \"r\":\"\\r\", \"t\":\"\\t\", \"v\":\"\\v\", \"'\":\"'\", '\"':'\"'};\n\n\n/////////////////////////////////////////\n\n\n/**\n * @constructor\n */\nvar Lexer = function(options) {\n this.options = options;\n};\n\nLexer.prototype = {\n constructor: Lexer,\n\n lex: function(text) {\n this.text = text;\n this.index = 0;\n this.tokens = [];\n\n while (this.index < this.text.length) {\n var ch = this.text.charAt(this.index);\n if (ch === '\"' || ch === \"'\") {\n this.readString(ch);\n } else if (this.isNumber(ch) || ch === '.' && this.isNumber(this.peek())) {\n this.readNumber();\n } else if (this.isIdent(ch)) {\n this.readIdent();\n } else if (this.is(ch, '(){}[].,;:?')) {\n this.tokens.push({index: this.index, text: ch});\n this.index++;\n } else if (this.isWhitespace(ch)) {\n this.index++;\n } else {\n var ch2 = ch + this.peek();\n var ch3 = ch2 + this.peek(2);\n var op1 = OPERATORS[ch];\n var op2 = OPERATORS[ch2];\n var op3 = OPERATORS[ch3];\n if (op1 || op2 || op3) {\n var token = op3 ? ch3 : (op2 ? ch2 : ch);\n this.tokens.push({index: this.index, text: token, operator: true});\n this.index += token.length;\n } else {\n this.throwError('Unexpected next character ', this.index, this.index + 1);\n }\n }\n }\n return this.tokens;\n },\n\n is: function(ch, chars) {\n return chars.indexOf(ch) !== -1;\n },\n\n peek: function(i) {\n var num = i || 1;\n return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false;\n },\n\n isNumber: function(ch) {\n return ('0' <= ch && ch <= '9') && typeof ch === \"string\";\n },\n\n isWhitespace: function(ch) {\n // IE treats non-breaking space as \\u00A0\n return (ch === ' ' || ch === '\\r' || ch === '\\t' ||\n ch === '\\n' || ch === '\\v' || ch === '\\u00A0');\n },\n\n isIdent: function(ch) {\n return ('a' <= ch && ch <= 'z' ||\n 'A' <= ch && ch <= 'Z' ||\n '_' === ch || ch === '$');\n },\n\n isExpOperator: function(ch) {\n return (ch === '-' || ch === '+' || this.isNumber(ch));\n },\n\n throwError: function(error, start, end) {\n end = end || this.index;\n var colStr = (isDefined(start)\n ? 's ' + start + '-' + this.index + ' [' + this.text.substring(start, end) + ']'\n : ' ' + end);\n throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].',\n error, colStr, this.text);\n },\n\n readNumber: function() {\n var number = '';\n var start = this.index;\n while (this.index < this.text.length) {\n var ch = lowercase(this.text.charAt(this.index));\n if (ch == '.' || this.isNumber(ch)) {\n number += ch;\n } else {\n var peekCh = this.peek();\n if (ch == 'e' && this.isExpOperator(peekCh)) {\n number += ch;\n } else if (this.isExpOperator(ch) &&\n peekCh && this.isNumber(peekCh) &&\n number.charAt(number.length - 1) == 'e') {\n number += ch;\n } else if (this.isExpOperator(ch) &&\n (!peekCh || !this.isNumber(peekCh)) &&\n number.charAt(number.length - 1) == 'e') {\n this.throwError('Invalid exponent');\n } else {\n break;\n }\n }\n this.index++;\n }\n this.tokens.push({\n index: start,\n text: number,\n constant: true,\n value: Number(number)\n });\n },\n\n readIdent: function() {\n var start = this.index;\n while (this.index < this.text.length) {\n var ch = this.text.charAt(this.index);\n if (!(this.isIdent(ch) || this.isNumber(ch))) {\n break;\n }\n this.index++;\n }\n this.tokens.push({\n index: start,\n text: this.text.slice(start, this.index),\n identifier: true\n });\n },\n\n readString: function(quote) {\n var start = this.index;\n this.index++;\n var string = '';\n var rawString = quote;\n var escape = false;\n while (this.index < this.text.length) {\n var ch = this.text.charAt(this.index);\n rawString += ch;\n if (escape) {\n if (ch === 'u') {\n var hex = this.text.substring(this.index + 1, this.index + 5);\n if (!hex.match(/[\\da-f]{4}/i)) {\n this.throwError('Invalid unicode escape [\\\\u' + hex + ']');\n }\n this.index += 4;\n string += String.fromCharCode(parseInt(hex, 16));\n } else {\n var rep = ESCAPE[ch];\n string = string + (rep || ch);\n }\n escape = false;\n } else if (ch === '\\\\') {\n escape = true;\n } else if (ch === quote) {\n this.index++;\n this.tokens.push({\n index: start,\n text: rawString,\n constant: true,\n value: string\n });\n return;\n } else {\n string += ch;\n }\n this.index++;\n }\n this.throwError('Unterminated quote', start);\n }\n};\n\nvar AST = function(lexer, options) {\n this.lexer = lexer;\n this.options = options;\n};\n\nAST.Program = 'Program';\nAST.ExpressionStatement = 'ExpressionStatement';\nAST.AssignmentExpression = 'AssignmentExpression';\nAST.ConditionalExpression = 'ConditionalExpression';\nAST.LogicalExpression = 'LogicalExpression';\nAST.BinaryExpression = 'BinaryExpression';\nAST.UnaryExpression = 'UnaryExpression';\nAST.CallExpression = 'CallExpression';\nAST.MemberExpression = 'MemberExpression';\nAST.Identifier = 'Identifier';\nAST.Literal = 'Literal';\nAST.ArrayExpression = 'ArrayExpression';\nAST.Property = 'Property';\nAST.ObjectExpression = 'ObjectExpression';\nAST.ThisExpression = 'ThisExpression';\n\n// Internal use only\nAST.NGValueParameter = 'NGValueParameter';\n\nAST.prototype = {\n ast: function(text) {\n this.text = text;\n this.tokens = this.lexer.lex(text);\n\n var value = this.program();\n\n if (this.tokens.length !== 0) {\n this.throwError('is an unexpected token', this.tokens[0]);\n }\n\n return value;\n },\n\n program: function() {\n var body = [];\n while (true) {\n if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']'))\n body.push(this.expressionStatement());\n if (!this.expect(';')) {\n return { type: AST.Program, body: body};\n }\n }\n },\n\n expressionStatement: function() {\n return { type: AST.ExpressionStatement, expression: this.filterChain() };\n },\n\n filterChain: function() {\n var left = this.expression();\n var token;\n while ((token = this.expect('|'))) {\n left = this.filter(left);\n }\n return left;\n },\n\n expression: function() {\n return this.assignment();\n },\n\n assignment: function() {\n var result = this.ternary();\n if (this.expect('=')) {\n result = { type: AST.AssignmentExpression, left: result, right: this.assignment(), operator: '='};\n }\n return result;\n },\n\n ternary: function() {\n var test = this.logicalOR();\n var alternate;\n var consequent;\n if (this.expect('?')) {\n alternate = this.expression();\n if (this.consume(':')) {\n consequent = this.expression();\n return { type: AST.ConditionalExpression, test: test, alternate: alternate, consequent: consequent};\n }\n }\n return test;\n },\n\n logicalOR: function() {\n var left = this.logicalAND();\n while (this.expect('||')) {\n left = { type: AST.LogicalExpression, operator: '||', left: left, right: this.logicalAND() };\n }\n return left;\n },\n\n logicalAND: function() {\n var left = this.equality();\n while (this.expect('&&')) {\n left = { type: AST.LogicalExpression, operator: '&&', left: left, right: this.equality()};\n }\n return left;\n },\n\n equality: function() {\n var left = this.relational();\n var token;\n while ((token = this.expect('==','!=','===','!=='))) {\n left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.relational() };\n }\n return left;\n },\n\n relational: function() {\n var left = this.additive();\n var token;\n while ((token = this.expect('<', '>', '<=', '>='))) {\n left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.additive() };\n }\n return left;\n },\n\n additive: function() {\n var left = this.multiplicative();\n var token;\n while ((token = this.expect('+','-'))) {\n left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.multiplicative() };\n }\n return left;\n },\n\n multiplicative: function() {\n var left = this.unary();\n var token;\n while ((token = this.expect('*','/','%'))) {\n left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.unary() };\n }\n return left;\n },\n\n unary: function() {\n var token;\n if ((token = this.expect('+', '-', '!'))) {\n return { type: AST.UnaryExpression, operator: token.text, prefix: true, argument: this.unary() };\n } else {\n return this.primary();\n }\n },\n\n primary: function() {\n var primary;\n if (this.expect('(')) {\n primary = this.filterChain();\n this.consume(')');\n } else if (this.expect('[')) {\n primary = this.arrayDeclaration();\n } else if (this.expect('{')) {\n primary = this.object();\n } else if (this.constants.hasOwnProperty(this.peek().text)) {\n primary = copy(this.constants[this.consume().text]);\n } else if (this.peek().identifier) {\n primary = this.identifier();\n } else if (this.peek().constant) {\n primary = this.constant();\n } else {\n this.throwError('not a primary expression', this.peek());\n }\n\n var next;\n while ((next = this.expect('(', '[', '.'))) {\n if (next.text === '(') {\n primary = {type: AST.CallExpression, callee: primary, arguments: this.parseArguments() };\n this.consume(')');\n } else if (next.text === '[') {\n primary = { type: AST.MemberExpression, object: primary, property: this.expression(), computed: true };\n this.consume(']');\n } else if (next.text === '.') {\n primary = { type: AST.MemberExpression, object: primary, property: this.identifier(), computed: false };\n } else {\n this.throwError('IMPOSSIBLE');\n }\n }\n return primary;\n },\n\n filter: function(baseExpression) {\n var args = [baseExpression];\n var result = {type: AST.CallExpression, callee: this.identifier(), arguments: args, filter: true};\n\n while (this.expect(':')) {\n args.push(this.expression());\n }\n\n return result;\n },\n\n parseArguments: function() {\n var args = [];\n if (this.peekToken().text !== ')') {\n do {\n args.push(this.expression());\n } while (this.expect(','));\n }\n return args;\n },\n\n identifier: function() {\n var token = this.consume();\n if (!token.identifier) {\n this.throwError('is not a valid identifier', token);\n }\n return { type: AST.Identifier, name: token.text };\n },\n\n constant: function() {\n // TODO check that it is a constant\n return { type: AST.Literal, value: this.consume().value };\n },\n\n arrayDeclaration: function() {\n var elements = [];\n if (this.peekToken().text !== ']') {\n do {\n if (this.peek(']')) {\n // Support trailing commas per ES5.1.\n break;\n }\n elements.push(this.expression());\n } while (this.expect(','));\n }\n this.consume(']');\n\n return { type: AST.ArrayExpression, elements: elements };\n },\n\n object: function() {\n var properties = [], property;\n if (this.peekToken().text !== '}') {\n do {\n if (this.peek('}')) {\n // Support trailing commas per ES5.1.\n break;\n }\n property = {type: AST.Property, kind: 'init'};\n if (this.peek().constant) {\n property.key = this.constant();\n } else if (this.peek().identifier) {\n property.key = this.identifier();\n } else {\n this.throwError(\"invalid key\", this.peek());\n }\n this.consume(':');\n property.value = this.expression();\n properties.push(property);\n } while (this.expect(','));\n }\n this.consume('}');\n\n return {type: AST.ObjectExpression, properties: properties };\n },\n\n throwError: function(msg, token) {\n throw $parseMinErr('syntax',\n 'Syntax Error: Token \\'{0}\\' {1} at column {2} of the expression [{3}] starting at [{4}].',\n token.text, msg, (token.index + 1), this.text, this.text.substring(token.index));\n },\n\n consume: function(e1) {\n if (this.tokens.length === 0) {\n throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);\n }\n\n var token = this.expect(e1);\n if (!token) {\n this.throwError('is unexpected, expecting [' + e1 + ']', this.peek());\n }\n return token;\n },\n\n peekToken: function() {\n if (this.tokens.length === 0) {\n throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);\n }\n return this.tokens[0];\n },\n\n peek: function(e1, e2, e3, e4) {\n return this.peekAhead(0, e1, e2, e3, e4);\n },\n\n peekAhead: function(i, e1, e2, e3, e4) {\n if (this.tokens.length > i) {\n var token = this.tokens[i];\n var t = token.text;\n if (t === e1 || t === e2 || t === e3 || t === e4 ||\n (!e1 && !e2 && !e3 && !e4)) {\n return token;\n }\n }\n return false;\n },\n\n expect: function(e1, e2, e3, e4) {\n var token = this.peek(e1, e2, e3, e4);\n if (token) {\n this.tokens.shift();\n return token;\n }\n return false;\n },\n\n\n /* `undefined` is not a constant, it is an identifier,\n * but using it as an identifier is not supported\n */\n constants: {\n 'true': { type: AST.Literal, value: true },\n 'false': { type: AST.Literal, value: false },\n 'null': { type: AST.Literal, value: null },\n 'undefined': {type: AST.Literal, value: undefined },\n 'this': {type: AST.ThisExpression }\n }\n};\n\nfunction ifDefined(v, d) {\n return typeof v !== 'undefined' ? v : d;\n}\n\nfunction plusFn(l, r) {\n if (typeof l === 'undefined') return r;\n if (typeof r === 'undefined') return l;\n return l + r;\n}\n\nfunction isStateless($filter, filterName) {\n var fn = $filter(filterName);\n return !fn.$stateful;\n}\n\nfunction findConstantAndWatchExpressions(ast, $filter) {\n var allConstants;\n var argsToWatch;\n switch (ast.type) {\n case AST.Program:\n allConstants = true;\n forEach(ast.body, function(expr) {\n findConstantAndWatchExpressions(expr.expression, $filter);\n allConstants = allConstants && expr.expression.constant;\n });\n ast.constant = allConstants;\n break;\n case AST.Literal:\n ast.constant = true;\n ast.toWatch = [];\n break;\n case AST.UnaryExpression:\n findConstantAndWatchExpressions(ast.argument, $filter);\n ast.constant = ast.argument.constant;\n ast.toWatch = ast.argument.toWatch;\n break;\n case AST.BinaryExpression:\n findConstantAndWatchExpressions(ast.left, $filter);\n findConstantAndWatchExpressions(ast.right, $filter);\n ast.constant = ast.left.constant && ast.right.constant;\n ast.toWatch = ast.left.toWatch.concat(ast.right.toWatch);\n break;\n case AST.LogicalExpression:\n findConstantAndWatchExpressions(ast.left, $filter);\n findConstantAndWatchExpressions(ast.right, $filter);\n ast.constant = ast.left.constant && ast.right.constant;\n ast.toWatch = ast.constant ? [] : [ast];\n break;\n case AST.ConditionalExpression:\n findConstantAndWatchExpressions(ast.test, $filter);\n findConstantAndWatchExpressions(ast.alternate, $filter);\n findConstantAndWatchExpressions(ast.consequent, $filter);\n ast.constant = ast.test.constant && ast.alternate.constant && ast.consequent.constant;\n ast.toWatch = ast.constant ? [] : [ast];\n break;\n case AST.Identifier:\n ast.constant = false;\n ast.toWatch = [ast];\n break;\n case AST.MemberExpression:\n findConstantAndWatchExpressions(ast.object, $filter);\n if (ast.computed) {\n findConstantAndWatchExpressions(ast.property, $filter);\n }\n ast.constant = ast.object.constant && (!ast.computed || ast.property.constant);\n ast.toWatch = [ast];\n break;\n case AST.CallExpression:\n allConstants = ast.filter ? isStateless($filter, ast.callee.name) : false;\n argsToWatch = [];\n forEach(ast.arguments, function(expr) {\n findConstantAndWatchExpressions(expr, $filter);\n allConstants = allConstants && expr.constant;\n if (!expr.constant) {\n argsToWatch.push.apply(argsToWatch, expr.toWatch);\n }\n });\n ast.constant = allConstants;\n ast.toWatch = ast.filter && isStateless($filter, ast.callee.name) ? argsToWatch : [ast];\n break;\n case AST.AssignmentExpression:\n findConstantAndWatchExpressions(ast.left, $filter);\n findConstantAndWatchExpressions(ast.right, $filter);\n ast.constant = ast.left.constant && ast.right.constant;\n ast.toWatch = [ast];\n break;\n case AST.ArrayExpression:\n allConstants = true;\n argsToWatch = [];\n forEach(ast.elements, function(expr) {\n findConstantAndWatchExpressions(expr, $filter);\n allConstants = allConstants && expr.constant;\n if (!expr.constant) {\n argsToWatch.push.apply(argsToWatch, expr.toWatch);\n }\n });\n ast.constant = allConstants;\n ast.toWatch = argsToWatch;\n break;\n case AST.ObjectExpression:\n allConstants = true;\n argsToWatch = [];\n forEach(ast.properties, function(property) {\n findConstantAndWatchExpressions(property.value, $filter);\n allConstants = allConstants && property.value.constant;\n if (!property.value.constant) {\n argsToWatch.push.apply(argsToWatch, property.value.toWatch);\n }\n });\n ast.constant = allConstants;\n ast.toWatch = argsToWatch;\n break;\n case AST.ThisExpression:\n ast.constant = false;\n ast.toWatch = [];\n break;\n }\n}\n\nfunction getInputs(body) {\n if (body.length != 1) return;\n var lastExpression = body[0].expression;\n var candidate = lastExpression.toWatch;\n if (candidate.length !== 1) return candidate;\n return candidate[0] !== lastExpression ? candidate : undefined;\n}\n\nfunction isAssignable(ast) {\n return ast.type === AST.Identifier || ast.type === AST.MemberExpression;\n}\n\nfunction assignableAST(ast) {\n if (ast.body.length === 1 && isAssignable(ast.body[0].expression)) {\n return {type: AST.AssignmentExpression, left: ast.body[0].expression, right: {type: AST.NGValueParameter}, operator: '='};\n }\n}\n\nfunction isLiteral(ast) {\n return ast.body.length === 0 ||\n ast.body.length === 1 && (\n ast.body[0].expression.type === AST.Literal ||\n ast.body[0].expression.type === AST.ArrayExpression ||\n ast.body[0].expression.type === AST.ObjectExpression);\n}\n\nfunction isConstant(ast) {\n return ast.constant;\n}\n\nfunction ASTCompiler(astBuilder, $filter) {\n this.astBuilder = astBuilder;\n this.$filter = $filter;\n}\n\nASTCompiler.prototype = {\n compile: function(expression, expensiveChecks) {\n var self = this;\n var ast = this.astBuilder.ast(expression);\n this.state = {\n nextId: 0,\n filters: {},\n expensiveChecks: expensiveChecks,\n fn: {vars: [], body: [], own: {}},\n assign: {vars: [], body: [], own: {}},\n inputs: []\n };\n findConstantAndWatchExpressions(ast, self.$filter);\n var extra = '';\n var assignable;\n this.stage = 'assign';\n if ((assignable = assignableAST(ast))) {\n this.state.computing = 'assign';\n var result = this.nextId();\n this.recurse(assignable, result);\n this.return_(result);\n extra = 'fn.assign=' + this.generateFunction('assign', 's,v,l');\n }\n var toWatch = getInputs(ast.body);\n self.stage = 'inputs';\n forEach(toWatch, function(watch, key) {\n var fnKey = 'fn' + key;\n self.state[fnKey] = {vars: [], body: [], own: {}};\n self.state.computing = fnKey;\n var intoId = self.nextId();\n self.recurse(watch, intoId);\n self.return_(intoId);\n self.state.inputs.push(fnKey);\n watch.watchId = key;\n });\n this.state.computing = 'fn';\n this.stage = 'main';\n this.recurse(ast);\n var fnString =\n // The build and minification steps remove the string \"use strict\" from the code, but this is done using a regex.\n // This is a workaround for this until we do a better job at only removing the prefix only when we should.\n '\"' + this.USE + ' ' + this.STRICT + '\";\\n' +\n this.filterPrefix() +\n 'var fn=' + this.generateFunction('fn', 's,l,a,i') +\n extra +\n this.watchFns() +\n 'return fn;';\n\n /* jshint -W054 */\n var fn = (new Function('$filter',\n 'ensureSafeMemberName',\n 'ensureSafeObject',\n 'ensureSafeFunction',\n 'getStringValue',\n 'ensureSafeAssignContext',\n 'ifDefined',\n 'plus',\n 'text',\n fnString))(\n this.$filter,\n ensureSafeMemberName,\n ensureSafeObject,\n ensureSafeFunction,\n getStringValue,\n ensureSafeAssignContext,\n ifDefined,\n plusFn,\n expression);\n /* jshint +W054 */\n this.state = this.stage = undefined;\n fn.literal = isLiteral(ast);\n fn.constant = isConstant(ast);\n return fn;\n },\n\n USE: 'use',\n\n STRICT: 'strict',\n\n watchFns: function() {\n var result = [];\n var fns = this.state.inputs;\n var self = this;\n forEach(fns, function(name) {\n result.push('var ' + name + '=' + self.generateFunction(name, 's'));\n });\n if (fns.length) {\n result.push('fn.inputs=[' + fns.join(',') + '];');\n }\n return result.join('');\n },\n\n generateFunction: function(name, params) {\n return 'function(' + params + '){' +\n this.varsPrefix(name) +\n this.body(name) +\n '};';\n },\n\n filterPrefix: function() {\n var parts = [];\n var self = this;\n forEach(this.state.filters, function(id, filter) {\n parts.push(id + '=$filter(' + self.escape(filter) + ')');\n });\n if (parts.length) return 'var ' + parts.join(',') + ';';\n return '';\n },\n\n varsPrefix: function(section) {\n return this.state[section].vars.length ? 'var ' + this.state[section].vars.join(',') + ';' : '';\n },\n\n body: function(section) {\n return this.state[section].body.join('');\n },\n\n recurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) {\n var left, right, self = this, args, expression;\n recursionFn = recursionFn || noop;\n if (!skipWatchIdCheck && isDefined(ast.watchId)) {\n intoId = intoId || this.nextId();\n this.if_('i',\n this.lazyAssign(intoId, this.computedMember('i', ast.watchId)),\n this.lazyRecurse(ast, intoId, nameId, recursionFn, create, true)\n );\n return;\n }\n switch (ast.type) {\n case AST.Program:\n forEach(ast.body, function(expression, pos) {\n self.recurse(expression.expression, undefined, undefined, function(expr) { right = expr; });\n if (pos !== ast.body.length - 1) {\n self.current().body.push(right, ';');\n } else {\n self.return_(right);\n }\n });\n break;\n case AST.Literal:\n expression = this.escape(ast.value);\n this.assign(intoId, expression);\n recursionFn(expression);\n break;\n case AST.UnaryExpression:\n this.recurse(ast.argument, undefined, undefined, function(expr) { right = expr; });\n expression = ast.operator + '(' + this.ifDefined(right, 0) + ')';\n this.assign(intoId, expression);\n recursionFn(expression);\n break;\n case AST.BinaryExpression:\n this.recurse(ast.left, undefined, undefined, function(expr) { left = expr; });\n this.recurse(ast.right, undefined, undefined, function(expr) { right = expr; });\n if (ast.operator === '+') {\n expression = this.plus(left, right);\n } else if (ast.operator === '-') {\n expression = this.ifDefined(left, 0) + ast.operator + this.ifDefined(right, 0);\n } else {\n expression = '(' + left + ')' + ast.operator + '(' + right + ')';\n }\n this.assign(intoId, expression);\n recursionFn(expression);\n break;\n case AST.LogicalExpression:\n intoId = intoId || this.nextId();\n self.recurse(ast.left, intoId);\n self.if_(ast.operator === '&&' ? intoId : self.not(intoId), self.lazyRecurse(ast.right, intoId));\n recursionFn(intoId);\n break;\n case AST.ConditionalExpression:\n intoId = intoId || this.nextId();\n self.recurse(ast.test, intoId);\n self.if_(intoId, self.lazyRecurse(ast.alternate, intoId), self.lazyRecurse(ast.consequent, intoId));\n recursionFn(intoId);\n break;\n case AST.Identifier:\n intoId = intoId || this.nextId();\n if (nameId) {\n nameId.context = self.stage === 'inputs' ? 's' : this.assign(this.nextId(), this.getHasOwnProperty('l', ast.name) + '?l:s');\n nameId.computed = false;\n nameId.name = ast.name;\n }\n ensureSafeMemberName(ast.name);\n self.if_(self.stage === 'inputs' || self.not(self.getHasOwnProperty('l', ast.name)),\n function() {\n self.if_(self.stage === 'inputs' || 's', function() {\n if (create && create !== 1) {\n self.if_(\n self.not(self.nonComputedMember('s', ast.name)),\n self.lazyAssign(self.nonComputedMember('s', ast.name), '{}'));\n }\n self.assign(intoId, self.nonComputedMember('s', ast.name));\n });\n }, intoId && self.lazyAssign(intoId, self.nonComputedMember('l', ast.name))\n );\n if (self.state.expensiveChecks || isPossiblyDangerousMemberName(ast.name)) {\n self.addEnsureSafeObject(intoId);\n }\n recursionFn(intoId);\n break;\n case AST.MemberExpression:\n left = nameId && (nameId.context = this.nextId()) || this.nextId();\n intoId = intoId || this.nextId();\n self.recurse(ast.object, left, undefined, function() {\n self.if_(self.notNull(left), function() {\n if (create && create !== 1) {\n self.addEnsureSafeAssignContext(left);\n }\n if (ast.computed) {\n right = self.nextId();\n self.recurse(ast.property, right);\n self.getStringValue(right);\n self.addEnsureSafeMemberName(right);\n if (create && create !== 1) {\n self.if_(self.not(self.computedMember(left, right)), self.lazyAssign(self.computedMember(left, right), '{}'));\n }\n expression = self.ensureSafeObject(self.computedMember(left, right));\n self.assign(intoId, expression);\n if (nameId) {\n nameId.computed = true;\n nameId.name = right;\n }\n } else {\n ensureSafeMemberName(ast.property.name);\n if (create && create !== 1) {\n self.if_(self.not(self.nonComputedMember(left, ast.property.name)), self.lazyAssign(self.nonComputedMember(left, ast.property.name), '{}'));\n }\n expression = self.nonComputedMember(left, ast.property.name);\n if (self.state.expensiveChecks || isPossiblyDangerousMemberName(ast.property.name)) {\n expression = self.ensureSafeObject(expression);\n }\n self.assign(intoId, expression);\n if (nameId) {\n nameId.computed = false;\n nameId.name = ast.property.name;\n }\n }\n }, function() {\n self.assign(intoId, 'undefined');\n });\n recursionFn(intoId);\n }, !!create);\n break;\n case AST.CallExpression:\n intoId = intoId || this.nextId();\n if (ast.filter) {\n right = self.filter(ast.callee.name);\n args = [];\n forEach(ast.arguments, function(expr) {\n var argument = self.nextId();\n self.recurse(expr, argument);\n args.push(argument);\n });\n expression = right + '(' + args.join(',') + ')';\n self.assign(intoId, expression);\n recursionFn(intoId);\n } else {\n right = self.nextId();\n left = {};\n args = [];\n self.recurse(ast.callee, right, left, function() {\n self.if_(self.notNull(right), function() {\n self.addEnsureSafeFunction(right);\n forEach(ast.arguments, function(expr) {\n self.recurse(expr, self.nextId(), undefined, function(argument) {\n args.push(self.ensureSafeObject(argument));\n });\n });\n if (left.name) {\n if (!self.state.expensiveChecks) {\n self.addEnsureSafeObject(left.context);\n }\n expression = self.member(left.context, left.name, left.computed) + '(' + args.join(',') + ')';\n } else {\n expression = right + '(' + args.join(',') + ')';\n }\n expression = self.ensureSafeObject(expression);\n self.assign(intoId, expression);\n }, function() {\n self.assign(intoId, 'undefined');\n });\n recursionFn(intoId);\n });\n }\n break;\n case AST.AssignmentExpression:\n right = this.nextId();\n left = {};\n if (!isAssignable(ast.left)) {\n throw $parseMinErr('lval', 'Trying to assign a value to a non l-value');\n }\n this.recurse(ast.left, undefined, left, function() {\n self.if_(self.notNull(left.context), function() {\n self.recurse(ast.right, right);\n self.addEnsureSafeObject(self.member(left.context, left.name, left.computed));\n self.addEnsureSafeAssignContext(left.context);\n expression = self.member(left.context, left.name, left.computed) + ast.operator + right;\n self.assign(intoId, expression);\n recursionFn(intoId || expression);\n });\n }, 1);\n break;\n case AST.ArrayExpression:\n args = [];\n forEach(ast.elements, function(expr) {\n self.recurse(expr, self.nextId(), undefined, function(argument) {\n args.push(argument);\n });\n });\n expression = '[' + args.join(',') + ']';\n this.assign(intoId, expression);\n recursionFn(expression);\n break;\n case AST.ObjectExpression:\n args = [];\n forEach(ast.properties, function(property) {\n self.recurse(property.value, self.nextId(), undefined, function(expr) {\n args.push(self.escape(\n property.key.type === AST.Identifier ? property.key.name :\n ('' + property.key.value)) +\n ':' + expr);\n });\n });\n expression = '{' + args.join(',') + '}';\n this.assign(intoId, expression);\n recursionFn(expression);\n break;\n case AST.ThisExpression:\n this.assign(intoId, 's');\n recursionFn('s');\n break;\n case AST.NGValueParameter:\n this.assign(intoId, 'v');\n recursionFn('v');\n break;\n }\n },\n\n getHasOwnProperty: function(element, property) {\n var key = element + '.' + property;\n var own = this.current().own;\n if (!own.hasOwnProperty(key)) {\n own[key] = this.nextId(false, element + '&&(' + this.escape(property) + ' in ' + element + ')');\n }\n return own[key];\n },\n\n assign: function(id, value) {\n if (!id) return;\n this.current().body.push(id, '=', value, ';');\n return id;\n },\n\n filter: function(filterName) {\n if (!this.state.filters.hasOwnProperty(filterName)) {\n this.state.filters[filterName] = this.nextId(true);\n }\n return this.state.filters[filterName];\n },\n\n ifDefined: function(id, defaultValue) {\n return 'ifDefined(' + id + ',' + this.escape(defaultValue) + ')';\n },\n\n plus: function(left, right) {\n return 'plus(' + left + ',' + right + ')';\n },\n\n return_: function(id) {\n this.current().body.push('return ', id, ';');\n },\n\n if_: function(test, alternate, consequent) {\n if (test === true) {\n alternate();\n } else {\n var body = this.current().body;\n body.push('if(', test, '){');\n alternate();\n body.push('}');\n if (consequent) {\n body.push('else{');\n consequent();\n body.push('}');\n }\n }\n },\n\n not: function(expression) {\n return '!(' + expression + ')';\n },\n\n notNull: function(expression) {\n return expression + '!=null';\n },\n\n nonComputedMember: function(left, right) {\n return left + '.' + right;\n },\n\n computedMember: function(left, right) {\n return left + '[' + right + ']';\n },\n\n member: function(left, right, computed) {\n if (computed) return this.computedMember(left, right);\n return this.nonComputedMember(left, right);\n },\n\n addEnsureSafeObject: function(item) {\n this.current().body.push(this.ensureSafeObject(item), ';');\n },\n\n addEnsureSafeMemberName: function(item) {\n this.current().body.push(this.ensureSafeMemberName(item), ';');\n },\n\n addEnsureSafeFunction: function(item) {\n this.current().body.push(this.ensureSafeFunction(item), ';');\n },\n\n addEnsureSafeAssignContext: function(item) {\n this.current().body.push(this.ensureSafeAssignContext(item), ';');\n },\n\n ensureSafeObject: function(item) {\n return 'ensureSafeObject(' + item + ',text)';\n },\n\n ensureSafeMemberName: function(item) {\n return 'ensureSafeMemberName(' + item + ',text)';\n },\n\n ensureSafeFunction: function(item) {\n return 'ensureSafeFunction(' + item + ',text)';\n },\n\n getStringValue: function(item) {\n this.assign(item, 'getStringValue(' + item + ',text)');\n },\n\n ensureSafeAssignContext: function(item) {\n return 'ensureSafeAssignContext(' + item + ',text)';\n },\n\n lazyRecurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) {\n var self = this;\n return function() {\n self.recurse(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck);\n };\n },\n\n lazyAssign: function(id, value) {\n var self = this;\n return function() {\n self.assign(id, value);\n };\n },\n\n stringEscapeRegex: /[^ a-zA-Z0-9]/g,\n\n stringEscapeFn: function(c) {\n return '\\\\u' + ('0000' + c.charCodeAt(0).toString(16)).slice(-4);\n },\n\n escape: function(value) {\n if (isString(value)) return \"'\" + value.replace(this.stringEscapeRegex, this.stringEscapeFn) + \"'\";\n if (isNumber(value)) return value.toString();\n if (value === true) return 'true';\n if (value === false) return 'false';\n if (value === null) return 'null';\n if (typeof value === 'undefined') return 'undefined';\n\n throw $parseMinErr('esc', 'IMPOSSIBLE');\n },\n\n nextId: function(skip, init) {\n var id = 'v' + (this.state.nextId++);\n if (!skip) {\n this.current().vars.push(id + (init ? '=' + init : ''));\n }\n return id;\n },\n\n current: function() {\n return this.state[this.state.computing];\n }\n};\n\n\nfunction ASTInterpreter(astBuilder, $filter) {\n this.astBuilder = astBuilder;\n this.$filter = $filter;\n}\n\nASTInterpreter.prototype = {\n compile: function(expression, expensiveChecks) {\n var self = this;\n var ast = this.astBuilder.ast(expression);\n this.expression = expression;\n this.expensiveChecks = expensiveChecks;\n findConstantAndWatchExpressions(ast, self.$filter);\n var assignable;\n var assign;\n if ((assignable = assignableAST(ast))) {\n assign = this.recurse(assignable);\n }\n var toWatch = getInputs(ast.body);\n var inputs;\n if (toWatch) {\n inputs = [];\n forEach(toWatch, function(watch, key) {\n var input = self.recurse(watch);\n watch.input = input;\n inputs.push(input);\n watch.watchId = key;\n });\n }\n var expressions = [];\n forEach(ast.body, function(expression) {\n expressions.push(self.recurse(expression.expression));\n });\n var fn = ast.body.length === 0 ? function() {} :\n ast.body.length === 1 ? expressions[0] :\n function(scope, locals) {\n var lastValue;\n forEach(expressions, function(exp) {\n lastValue = exp(scope, locals);\n });\n return lastValue;\n };\n if (assign) {\n fn.assign = function(scope, value, locals) {\n return assign(scope, locals, value);\n };\n }\n if (inputs) {\n fn.inputs = inputs;\n }\n fn.literal = isLiteral(ast);\n fn.constant = isConstant(ast);\n return fn;\n },\n\n recurse: function(ast, context, create) {\n var left, right, self = this, args, expression;\n if (ast.input) {\n return this.inputs(ast.input, ast.watchId);\n }\n switch (ast.type) {\n case AST.Literal:\n return this.value(ast.value, context);\n case AST.UnaryExpression:\n right = this.recurse(ast.argument);\n return this['unary' + ast.operator](right, context);\n case AST.BinaryExpression:\n left = this.recurse(ast.left);\n right = this.recurse(ast.right);\n return this['binary' + ast.operator](left, right, context);\n case AST.LogicalExpression:\n left = this.recurse(ast.left);\n right = this.recurse(ast.right);\n return this['binary' + ast.operator](left, right, context);\n case AST.ConditionalExpression:\n return this['ternary?:'](\n this.recurse(ast.test),\n this.recurse(ast.alternate),\n this.recurse(ast.consequent),\n context\n );\n case AST.Identifier:\n ensureSafeMemberName(ast.name, self.expression);\n return self.identifier(ast.name,\n self.expensiveChecks || isPossiblyDangerousMemberName(ast.name),\n context, create, self.expression);\n case AST.MemberExpression:\n left = this.recurse(ast.object, false, !!create);\n if (!ast.computed) {\n ensureSafeMemberName(ast.property.name, self.expression);\n right = ast.property.name;\n }\n if (ast.computed) right = this.recurse(ast.property);\n return ast.computed ?\n this.computedMember(left, right, context, create, self.expression) :\n this.nonComputedMember(left, right, self.expensiveChecks, context, create, self.expression);\n case AST.CallExpression:\n args = [];\n forEach(ast.arguments, function(expr) {\n args.push(self.recurse(expr));\n });\n if (ast.filter) right = this.$filter(ast.callee.name);\n if (!ast.filter) right = this.recurse(ast.callee, true);\n return ast.filter ?\n function(scope, locals, assign, inputs) {\n var values = [];\n for (var i = 0; i < args.length; ++i) {\n values.push(args[i](scope, locals, assign, inputs));\n }\n var value = right.apply(undefined, values, inputs);\n return context ? {context: undefined, name: undefined, value: value} : value;\n } :\n function(scope, locals, assign, inputs) {\n var rhs = right(scope, locals, assign, inputs);\n var value;\n if (rhs.value != null) {\n ensureSafeObject(rhs.context, self.expression);\n ensureSafeFunction(rhs.value, self.expression);\n var values = [];\n for (var i = 0; i < args.length; ++i) {\n values.push(ensureSafeObject(args[i](scope, locals, assign, inputs), self.expression));\n }\n value = ensureSafeObject(rhs.value.apply(rhs.context, values), self.expression);\n }\n return context ? {value: value} : value;\n };\n case AST.AssignmentExpression:\n left = this.recurse(ast.left, true, 1);\n right = this.recurse(ast.right);\n return function(scope, locals, assign, inputs) {\n var lhs = left(scope, locals, assign, inputs);\n var rhs = right(scope, locals, assign, inputs);\n ensureSafeObject(lhs.value, self.expression);\n ensureSafeAssignContext(lhs.context);\n lhs.context[lhs.name] = rhs;\n return context ? {value: rhs} : rhs;\n };\n case AST.ArrayExpression:\n args = [];\n forEach(ast.elements, function(expr) {\n args.push(self.recurse(expr));\n });\n return function(scope, locals, assign, inputs) {\n var value = [];\n for (var i = 0; i < args.length; ++i) {\n value.push(args[i](scope, locals, assign, inputs));\n }\n return context ? {value: value} : value;\n };\n case AST.ObjectExpression:\n args = [];\n forEach(ast.properties, function(property) {\n args.push({key: property.key.type === AST.Identifier ?\n property.key.name :\n ('' + property.key.value),\n value: self.recurse(property.value)\n });\n });\n return function(scope, locals, assign, inputs) {\n var value = {};\n for (var i = 0; i < args.length; ++i) {\n value[args[i].key] = args[i].value(scope, locals, assign, inputs);\n }\n return context ? {value: value} : value;\n };\n case AST.ThisExpression:\n return function(scope) {\n return context ? {value: scope} : scope;\n };\n case AST.NGValueParameter:\n return function(scope, locals, assign, inputs) {\n return context ? {value: assign} : assign;\n };\n }\n },\n\n 'unary+': function(argument, context) {\n return function(scope, locals, assign, inputs) {\n var arg = argument(scope, locals, assign, inputs);\n if (isDefined(arg)) {\n arg = +arg;\n } else {\n arg = 0;\n }\n return context ? {value: arg} : arg;\n };\n },\n 'unary-': function(argument, context) {\n return function(scope, locals, assign, inputs) {\n var arg = argument(scope, locals, assign, inputs);\n if (isDefined(arg)) {\n arg = -arg;\n } else {\n arg = 0;\n }\n return context ? {value: arg} : arg;\n };\n },\n 'unary!': function(argument, context) {\n return function(scope, locals, assign, inputs) {\n var arg = !argument(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary+': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var lhs = left(scope, locals, assign, inputs);\n var rhs = right(scope, locals, assign, inputs);\n var arg = plusFn(lhs, rhs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary-': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var lhs = left(scope, locals, assign, inputs);\n var rhs = right(scope, locals, assign, inputs);\n var arg = (isDefined(lhs) ? lhs : 0) - (isDefined(rhs) ? rhs : 0);\n return context ? {value: arg} : arg;\n };\n },\n 'binary*': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) * right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary/': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) / right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary%': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) % right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary===': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) === right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary!==': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) !== right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary==': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) == right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary!=': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) != right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary<': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) < right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary>': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) > right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary<=': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) <= right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary>=': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) >= right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary&&': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) && right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary||': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) || right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'ternary?:': function(test, alternate, consequent, context) {\n return function(scope, locals, assign, inputs) {\n var arg = test(scope, locals, assign, inputs) ? alternate(scope, locals, assign, inputs) : consequent(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n value: function(value, context) {\n return function() { return context ? {context: undefined, name: undefined, value: value} : value; };\n },\n identifier: function(name, expensiveChecks, context, create, expression) {\n return function(scope, locals, assign, inputs) {\n var base = locals && (name in locals) ? locals : scope;\n if (create && create !== 1 && base && !(base[name])) {\n base[name] = {};\n }\n var value = base ? base[name] : undefined;\n if (expensiveChecks) {\n ensureSafeObject(value, expression);\n }\n if (context) {\n return {context: base, name: name, value: value};\n } else {\n return value;\n }\n };\n },\n computedMember: function(left, right, context, create, expression) {\n return function(scope, locals, assign, inputs) {\n var lhs = left(scope, locals, assign, inputs);\n var rhs;\n var value;\n if (lhs != null) {\n rhs = right(scope, locals, assign, inputs);\n rhs = getStringValue(rhs);\n ensureSafeMemberName(rhs, expression);\n if (create && create !== 1) {\n ensureSafeAssignContext(lhs);\n if (lhs && !(lhs[rhs])) {\n lhs[rhs] = {};\n }\n }\n value = lhs[rhs];\n ensureSafeObject(value, expression);\n }\n if (context) {\n return {context: lhs, name: rhs, value: value};\n } else {\n return value;\n }\n };\n },\n nonComputedMember: function(left, right, expensiveChecks, context, create, expression) {\n return function(scope, locals, assign, inputs) {\n var lhs = left(scope, locals, assign, inputs);\n if (create && create !== 1) {\n ensureSafeAssignContext(lhs);\n if (lhs && !(lhs[right])) {\n lhs[right] = {};\n }\n }\n var value = lhs != null ? lhs[right] : undefined;\n if (expensiveChecks || isPossiblyDangerousMemberName(right)) {\n ensureSafeObject(value, expression);\n }\n if (context) {\n return {context: lhs, name: right, value: value};\n } else {\n return value;\n }\n };\n },\n inputs: function(input, watchId) {\n return function(scope, value, locals, inputs) {\n if (inputs) return inputs[watchId];\n return input(scope, value, locals);\n };\n }\n};\n\n/**\n * @constructor\n */\nvar Parser = function(lexer, $filter, options) {\n this.lexer = lexer;\n this.$filter = $filter;\n this.options = options;\n this.ast = new AST(this.lexer);\n this.astCompiler = options.csp ? new ASTInterpreter(this.ast, $filter) :\n new ASTCompiler(this.ast, $filter);\n};\n\nParser.prototype = {\n constructor: Parser,\n\n parse: function(text) {\n return this.astCompiler.compile(text, this.options.expensiveChecks);\n }\n};\n\nfunction isPossiblyDangerousMemberName(name) {\n return name == 'constructor';\n}\n\nvar objectValueOf = Object.prototype.valueOf;\n\nfunction getValueOf(value) {\n return isFunction(value.valueOf) ? value.valueOf() : objectValueOf.call(value);\n}\n\n///////////////////////////////////\n\n/**\n * @ngdoc service\n * @name $parse\n * @kind function\n *\n * @description\n *\n * Converts Angular {@link guide/expression expression} into a function.\n *\n * ```js\n * var getter = $parse('user.name');\n * var setter = getter.assign;\n * var context = {user:{name:'angular'}};\n * var locals = {user:{name:'local'}};\n *\n * expect(getter(context)).toEqual('angular');\n * setter(context, 'newValue');\n * expect(context.user.name).toEqual('newValue');\n * expect(getter(context, locals)).toEqual('local');\n * ```\n *\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` `{object}` an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` `{object=}` local variables context object, useful for overriding values in\n * `context`.\n *\n * The returned function also has the following properties:\n * * `literal` `{boolean}` whether the expression's top-level node is a JavaScript\n * literal.\n * * `constant` `{boolean}` whether the expression is made entirely of JavaScript\n * constant literals.\n * * `assign` `{?function(context, value)}` if the expression is assignable, this will be\n * set to a function to change its value on the given context.\n *\n */\n\n\n/**\n * @ngdoc provider\n * @name $parseProvider\n *\n * @description\n * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse}\n * service.\n */\nfunction $ParseProvider() {\n var cacheDefault = createMap();\n var cacheExpensive = createMap();\n\n this.$get = ['$filter', function($filter) {\n var noUnsafeEval = csp().noUnsafeEval;\n var $parseOptions = {\n csp: noUnsafeEval,\n expensiveChecks: false\n },\n $parseOptionsExpensive = {\n csp: noUnsafeEval,\n expensiveChecks: true\n };\n var runningChecksEnabled = false;\n\n $parse.$$runningExpensiveChecks = function() {\n return runningChecksEnabled;\n };\n\n return $parse;\n\n function $parse(exp, interceptorFn, expensiveChecks) {\n var parsedExpression, oneTime, cacheKey;\n\n expensiveChecks = expensiveChecks || runningChecksEnabled;\n\n switch (typeof exp) {\n case 'string':\n exp = exp.trim();\n cacheKey = exp;\n\n var cache = (expensiveChecks ? cacheExpensive : cacheDefault);\n parsedExpression = cache[cacheKey];\n\n if (!parsedExpression) {\n if (exp.charAt(0) === ':' && exp.charAt(1) === ':') {\n oneTime = true;\n exp = exp.substring(2);\n }\n var parseOptions = expensiveChecks ? $parseOptionsExpensive : $parseOptions;\n var lexer = new Lexer(parseOptions);\n var parser = new Parser(lexer, $filter, parseOptions);\n parsedExpression = parser.parse(exp);\n if (parsedExpression.constant) {\n parsedExpression.$$watchDelegate = constantWatchDelegate;\n } else if (oneTime) {\n parsedExpression.$$watchDelegate = parsedExpression.literal ?\n oneTimeLiteralWatchDelegate : oneTimeWatchDelegate;\n } else if (parsedExpression.inputs) {\n parsedExpression.$$watchDelegate = inputsWatchDelegate;\n }\n if (expensiveChecks) {\n parsedExpression = expensiveChecksInterceptor(parsedExpression);\n }\n cache[cacheKey] = parsedExpression;\n }\n return addInterceptor(parsedExpression, interceptorFn);\n\n case 'function':\n return addInterceptor(exp, interceptorFn);\n\n default:\n return addInterceptor(noop, interceptorFn);\n }\n }\n\n function expensiveChecksInterceptor(fn) {\n if (!fn) return fn;\n expensiveCheckFn.$$watchDelegate = fn.$$watchDelegate;\n expensiveCheckFn.assign = expensiveChecksInterceptor(fn.assign);\n expensiveCheckFn.constant = fn.constant;\n expensiveCheckFn.literal = fn.literal;\n for (var i = 0; fn.inputs && i < fn.inputs.length; ++i) {\n fn.inputs[i] = expensiveChecksInterceptor(fn.inputs[i]);\n }\n expensiveCheckFn.inputs = fn.inputs;\n\n return expensiveCheckFn;\n\n function expensiveCheckFn(scope, locals, assign, inputs) {\n var expensiveCheckOldValue = runningChecksEnabled;\n runningChecksEnabled = true;\n try {\n return fn(scope, locals, assign, inputs);\n } finally {\n runningChecksEnabled = expensiveCheckOldValue;\n }\n }\n }\n\n function expressionInputDirtyCheck(newValue, oldValueOfValue) {\n\n if (newValue == null || oldValueOfValue == null) { // null/undefined\n return newValue === oldValueOfValue;\n }\n\n if (typeof newValue === 'object') {\n\n // attempt to convert the value to a primitive type\n // TODO(docs): add a note to docs that by implementing valueOf even objects and arrays can\n // be cheaply dirty-checked\n newValue = getValueOf(newValue);\n\n if (typeof newValue === 'object') {\n // objects/arrays are not supported - deep-watching them would be too expensive\n return false;\n }\n\n // fall-through to the primitive equality check\n }\n\n //Primitive or NaN\n return newValue === oldValueOfValue || (newValue !== newValue && oldValueOfValue !== oldValueOfValue);\n }\n\n function inputsWatchDelegate(scope, listener, objectEquality, parsedExpression, prettyPrintExpression) {\n var inputExpressions = parsedExpression.inputs;\n var lastResult;\n\n if (inputExpressions.length === 1) {\n var oldInputValueOf = expressionInputDirtyCheck; // init to something unique so that equals check fails\n inputExpressions = inputExpressions[0];\n return scope.$watch(function expressionInputWatch(scope) {\n var newInputValue = inputExpressions(scope);\n if (!expressionInputDirtyCheck(newInputValue, oldInputValueOf)) {\n lastResult = parsedExpression(scope, undefined, undefined, [newInputValue]);\n oldInputValueOf = newInputValue && getValueOf(newInputValue);\n }\n return lastResult;\n }, listener, objectEquality, prettyPrintExpression);\n }\n\n var oldInputValueOfValues = [];\n var oldInputValues = [];\n for (var i = 0, ii = inputExpressions.length; i < ii; i++) {\n oldInputValueOfValues[i] = expressionInputDirtyCheck; // init to something unique so that equals check fails\n oldInputValues[i] = null;\n }\n\n return scope.$watch(function expressionInputsWatch(scope) {\n var changed = false;\n\n for (var i = 0, ii = inputExpressions.length; i < ii; i++) {\n var newInputValue = inputExpressions[i](scope);\n if (changed || (changed = !expressionInputDirtyCheck(newInputValue, oldInputValueOfValues[i]))) {\n oldInputValues[i] = newInputValue;\n oldInputValueOfValues[i] = newInputValue && getValueOf(newInputValue);\n }\n }\n\n if (changed) {\n lastResult = parsedExpression(scope, undefined, undefined, oldInputValues);\n }\n\n return lastResult;\n }, listener, objectEquality, prettyPrintExpression);\n }\n\n function oneTimeWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var unwatch, lastValue;\n return unwatch = scope.$watch(function oneTimeWatch(scope) {\n return parsedExpression(scope);\n }, function oneTimeListener(value, old, scope) {\n lastValue = value;\n if (isFunction(listener)) {\n listener.apply(this, arguments);\n }\n if (isDefined(value)) {\n scope.$$postDigest(function() {\n if (isDefined(lastValue)) {\n unwatch();\n }\n });\n }\n }, objectEquality);\n }\n\n function oneTimeLiteralWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var unwatch, lastValue;\n return unwatch = scope.$watch(function oneTimeWatch(scope) {\n return parsedExpression(scope);\n }, function oneTimeListener(value, old, scope) {\n lastValue = value;\n if (isFunction(listener)) {\n listener.call(this, value, old, scope);\n }\n if (isAllDefined(value)) {\n scope.$$postDigest(function() {\n if (isAllDefined(lastValue)) unwatch();\n });\n }\n }, objectEquality);\n\n function isAllDefined(value) {\n var allDefined = true;\n forEach(value, function(val) {\n if (!isDefined(val)) allDefined = false;\n });\n return allDefined;\n }\n }\n\n function constantWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var unwatch;\n return unwatch = scope.$watch(function constantWatch(scope) {\n return parsedExpression(scope);\n }, function constantListener(value, old, scope) {\n if (isFunction(listener)) {\n listener.apply(this, arguments);\n }\n unwatch();\n }, objectEquality);\n }\n\n function addInterceptor(parsedExpression, interceptorFn) {\n if (!interceptorFn) return parsedExpression;\n var watchDelegate = parsedExpression.$$watchDelegate;\n var useInputs = false;\n\n var regularWatch =\n watchDelegate !== oneTimeLiteralWatchDelegate &&\n watchDelegate !== oneTimeWatchDelegate;\n\n var fn = regularWatch ? function regularInterceptedExpression(scope, locals, assign, inputs) {\n var value = useInputs && inputs ? inputs[0] : parsedExpression(scope, locals, assign, inputs);\n return interceptorFn(value, scope, locals);\n } : function oneTimeInterceptedExpression(scope, locals, assign, inputs) {\n var value = parsedExpression(scope, locals, assign, inputs);\n var result = interceptorFn(value, scope, locals);\n // we only return the interceptor's result if the\n // initial value is defined (for bind-once)\n return isDefined(value) ? result : value;\n };\n\n // Propagate $$watchDelegates other then inputsWatchDelegate\n if (parsedExpression.$$watchDelegate &&\n parsedExpression.$$watchDelegate !== inputsWatchDelegate) {\n fn.$$watchDelegate = parsedExpression.$$watchDelegate;\n } else if (!interceptorFn.$stateful) {\n // If there is an interceptor, but no watchDelegate then treat the interceptor like\n // we treat filters - it is assumed to be a pure function unless flagged with $stateful\n fn.$$watchDelegate = inputsWatchDelegate;\n useInputs = !parsedExpression.inputs;\n fn.inputs = parsedExpression.inputs ? parsedExpression.inputs : [parsedExpression];\n }\n\n return fn;\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $q\n * @requires $rootScope\n *\n * @description\n * A service that helps you run functions asynchronously, and use their return values (or exceptions)\n * when they are done processing.\n *\n * This is an implementation of promises/deferred objects inspired by\n * [Kris Kowal's Q](https://github.com/kriskowal/q).\n *\n * $q can be used in two fashions --- one which is more similar to Kris Kowal's Q or jQuery's Deferred\n * implementations, and the other which resembles ES6 (ES2015) promises to some degree.\n *\n * # $q constructor\n *\n * The streamlined ES6 style promise is essentially just using $q as a constructor which takes a `resolver`\n * function as the first argument. This is similar to the native Promise implementation from ES6,\n * see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n *\n * While the constructor-style use is supported, not all of the supporting methods from ES6 promises are\n * available yet.\n *\n * It can be used like so:\n *\n * ```js\n * // for the purpose of this example let's assume that variables `$q` and `okToGreet`\n * // are available in the current lexical scope (they could have been injected or passed in).\n *\n * function asyncGreet(name) {\n * // perform some asynchronous operation, resolve or reject the promise when appropriate.\n * return $q(function(resolve, reject) {\n * setTimeout(function() {\n * if (okToGreet(name)) {\n * resolve('Hello, ' + name + '!');\n * } else {\n * reject('Greeting ' + name + ' is not allowed.');\n * }\n * }, 1000);\n * });\n * }\n *\n * var promise = asyncGreet('Robin Hood');\n * promise.then(function(greeting) {\n * alert('Success: ' + greeting);\n * }, function(reason) {\n * alert('Failed: ' + reason);\n * });\n * ```\n *\n * Note: progress/notify callbacks are not currently supported via the ES6-style interface.\n *\n * Note: unlike ES6 behaviour, an exception thrown in the constructor function will NOT implicitly reject the promise.\n *\n * However, the more traditional CommonJS-style usage is still available, and documented below.\n *\n * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an\n * interface for interacting with an object that represents the result of an action that is\n * performed asynchronously, and may or may not be finished at any given point in time.\n *\n * From the perspective of dealing with error handling, deferred and promise APIs are to\n * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming.\n *\n * ```js\n * // for the purpose of this example let's assume that variables `$q` and `okToGreet`\n * // are available in the current lexical scope (they could have been injected or passed in).\n *\n * function asyncGreet(name) {\n * var deferred = $q.defer();\n *\n * setTimeout(function() {\n * deferred.notify('About to greet ' + name + '.');\n *\n * if (okToGreet(name)) {\n * deferred.resolve('Hello, ' + name + '!');\n * } else {\n * deferred.reject('Greeting ' + name + ' is not allowed.');\n * }\n * }, 1000);\n *\n * return deferred.promise;\n * }\n *\n * var promise = asyncGreet('Robin Hood');\n * promise.then(function(greeting) {\n * alert('Success: ' + greeting);\n * }, function(reason) {\n * alert('Failed: ' + reason);\n * }, function(update) {\n * alert('Got notification: ' + update);\n * });\n * ```\n *\n * At first it might not be obvious why this extra complexity is worth the trouble. The payoff\n * comes in the way of guarantees that promise and deferred APIs make, see\n * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md.\n *\n * Additionally the promise api allows for composition that is very hard to do with the\n * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach.\n * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the\n * section on serial or parallel joining of promises.\n *\n * # The Deferred API\n *\n * A new instance of deferred is constructed by calling `$q.defer()`.\n *\n * The purpose of the deferred object is to expose the associated Promise instance as well as APIs\n * that can be used for signaling the successful or unsuccessful completion, as well as the status\n * of the task.\n *\n * **Methods**\n *\n * - `resolve(value)` resolves the derived promise with the `value`. If the value is a rejection\n * constructed via `$q.reject`, the promise will be rejected instead.\n * - `reject(reason)` rejects the derived promise with the `reason`. This is equivalent to\n * resolving it with a rejection constructed via `$q.reject`.\n * - `notify(value)` - provides updates on the status of the promise's execution. This may be called\n * multiple times before the promise is either resolved or rejected.\n *\n * **Properties**\n *\n * - promise `{Promise}` promise object associated with this deferred.\n *\n *\n * # The Promise API\n *\n * A new promise instance is created when a deferred instance is created and can be retrieved by\n * calling `deferred.promise`.\n *\n * The purpose of the promise object is to allow for interested parties to get access to the result\n * of the deferred task when it completes.\n *\n * **Methods**\n *\n * - `then(successCallback, errorCallback, notifyCallback)` regardless of when the promise was or\n * will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously\n * as soon as the result is available. The callbacks are called with a single argument: the result\n * or rejection reason. Additionally, the notify callback may be called zero or more times to\n * provide a progress indication, before the promise is resolved or rejected.\n *\n * This method *returns a new promise* which is resolved or rejected via the return value of the\n * `successCallback`, `errorCallback` (unless that value is a promise, in which case it is resolved\n * with the value which is resolved in that promise using\n * [promise chaining](http://www.html5rocks.com/en/tutorials/es6/promises/#toc-promises-queues)).\n * It also notifies via the return value of the `notifyCallback` method. The promise cannot be\n * resolved or rejected from the notifyCallback method.\n *\n * - `catch(errorCallback)` shorthand for `promise.then(null, errorCallback)`\n *\n * - `finally(callback, notifyCallback)` allows you to observe either the fulfillment or rejection of a promise,\n * but to do so without modifying the final value. This is useful to release resources or do some\n * clean-up that needs to be done whether the promise was rejected or resolved. See the [full\n * specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for\n * more information.\n *\n * # Chaining promises\n *\n * Because calling the `then` method of a promise returns a new derived promise, it is easily\n * possible to create a chain of promises:\n *\n * ```js\n * promiseB = promiseA.then(function(result) {\n * return result + 1;\n * });\n *\n * // promiseB will be resolved immediately after promiseA is resolved and its value\n * // will be the result of promiseA incremented by 1\n * ```\n *\n * It is possible to create chains of any length and since a promise can be resolved with another\n * promise (which will defer its resolution further), it is possible to pause/defer resolution of\n * the promises at any point in the chain. This makes it possible to implement powerful APIs like\n * $http's response interceptors.\n *\n *\n * # Differences between Kris Kowal's Q and $q\n *\n * There are two main differences:\n *\n * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation\n * mechanism in angular, which means faster propagation of resolution or rejection into your\n * models and avoiding unnecessary browser repaints, which would result in flickering UI.\n * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains\n * all the important functionality needed for common async tasks.\n *\n * # Testing\n *\n * ```js\n * it('should simulate promise', inject(function($q, $rootScope) {\n * var deferred = $q.defer();\n * var promise = deferred.promise;\n * var resolvedValue;\n *\n * promise.then(function(value) { resolvedValue = value; });\n * expect(resolvedValue).toBeUndefined();\n *\n * // Simulate resolving of promise\n * deferred.resolve(123);\n * // Note that the 'then' function does not get called synchronously.\n * // This is because we want the promise API to always be async, whether or not\n * // it got called synchronously or asynchronously.\n * expect(resolvedValue).toBeUndefined();\n *\n * // Propagate promise resolution to 'then' functions using $apply().\n * $rootScope.$apply();\n * expect(resolvedValue).toEqual(123);\n * }));\n * ```\n *\n * @param {function(function, function)} resolver Function which is responsible for resolving or\n * rejecting the newly created promise. The first parameter is a function which resolves the\n * promise, the second parameter is a function which rejects the promise.\n *\n * @returns {Promise} The newly created promise.\n */\nfunction $QProvider() {\n\n this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {\n return qFactory(function(callback) {\n $rootScope.$evalAsync(callback);\n }, $exceptionHandler);\n }];\n}\n\nfunction $$QProvider() {\n this.$get = ['$browser', '$exceptionHandler', function($browser, $exceptionHandler) {\n return qFactory(function(callback) {\n $browser.defer(callback);\n }, $exceptionHandler);\n }];\n}\n\n/**\n * Constructs a promise manager.\n *\n * @param {function(function)} nextTick Function for executing functions in the next turn.\n * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for\n * debugging purposes.\n * @returns {object} Promise manager.\n */\nfunction qFactory(nextTick, exceptionHandler) {\n var $qMinErr = minErr('$q', TypeError);\n function callOnce(self, resolveFn, rejectFn) {\n var called = false;\n function wrap(fn) {\n return function(value) {\n if (called) return;\n called = true;\n fn.call(self, value);\n };\n }\n\n return [wrap(resolveFn), wrap(rejectFn)];\n }\n\n /**\n * @ngdoc method\n * @name ng.$q#defer\n * @kind function\n *\n * @description\n * Creates a `Deferred` object which represents a task which will finish in the future.\n *\n * @returns {Deferred} Returns a new instance of deferred.\n */\n var defer = function() {\n return new Deferred();\n };\n\n function Promise() {\n this.$$state = { status: 0 };\n }\n\n extend(Promise.prototype, {\n then: function(onFulfilled, onRejected, progressBack) {\n if (isUndefined(onFulfilled) && isUndefined(onRejected) && isUndefined(progressBack)) {\n return this;\n }\n var result = new Deferred();\n\n this.$$state.pending = this.$$state.pending || [];\n this.$$state.pending.push([result, onFulfilled, onRejected, progressBack]);\n if (this.$$state.status > 0) scheduleProcessQueue(this.$$state);\n\n return result.promise;\n },\n\n \"catch\": function(callback) {\n return this.then(null, callback);\n },\n\n \"finally\": function(callback, progressBack) {\n return this.then(function(value) {\n return handleCallback(value, true, callback);\n }, function(error) {\n return handleCallback(error, false, callback);\n }, progressBack);\n }\n });\n\n //Faster, more basic than angular.bind http://jsperf.com/angular-bind-vs-custom-vs-native\n function simpleBind(context, fn) {\n return function(value) {\n fn.call(context, value);\n };\n }\n\n function processQueue(state) {\n var fn, deferred, pending;\n\n pending = state.pending;\n state.processScheduled = false;\n state.pending = undefined;\n for (var i = 0, ii = pending.length; i < ii; ++i) {\n deferred = pending[i][0];\n fn = pending[i][state.status];\n try {\n if (isFunction(fn)) {\n deferred.resolve(fn(state.value));\n } else if (state.status === 1) {\n deferred.resolve(state.value);\n } else {\n deferred.reject(state.value);\n }\n } catch (e) {\n deferred.reject(e);\n exceptionHandler(e);\n }\n }\n }\n\n function scheduleProcessQueue(state) {\n if (state.processScheduled || !state.pending) return;\n state.processScheduled = true;\n nextTick(function() { processQueue(state); });\n }\n\n function Deferred() {\n this.promise = new Promise();\n //Necessary to support unbound execution :/\n this.resolve = simpleBind(this, this.resolve);\n this.reject = simpleBind(this, this.reject);\n this.notify = simpleBind(this, this.notify);\n }\n\n extend(Deferred.prototype, {\n resolve: function(val) {\n if (this.promise.$$state.status) return;\n if (val === this.promise) {\n this.$$reject($qMinErr(\n 'qcycle',\n \"Expected promise to be resolved with value other than itself '{0}'\",\n val));\n } else {\n this.$$resolve(val);\n }\n\n },\n\n $$resolve: function(val) {\n var then, fns;\n\n fns = callOnce(this, this.$$resolve, this.$$reject);\n try {\n if ((isObject(val) || isFunction(val))) then = val && val.then;\n if (isFunction(then)) {\n this.promise.$$state.status = -1;\n then.call(val, fns[0], fns[1], this.notify);\n } else {\n this.promise.$$state.value = val;\n this.promise.$$state.status = 1;\n scheduleProcessQueue(this.promise.$$state);\n }\n } catch (e) {\n fns[1](e);\n exceptionHandler(e);\n }\n },\n\n reject: function(reason) {\n if (this.promise.$$state.status) return;\n this.$$reject(reason);\n },\n\n $$reject: function(reason) {\n this.promise.$$state.value = reason;\n this.promise.$$state.status = 2;\n scheduleProcessQueue(this.promise.$$state);\n },\n\n notify: function(progress) {\n var callbacks = this.promise.$$state.pending;\n\n if ((this.promise.$$state.status <= 0) && callbacks && callbacks.length) {\n nextTick(function() {\n var callback, result;\n for (var i = 0, ii = callbacks.length; i < ii; i++) {\n result = callbacks[i][0];\n callback = callbacks[i][3];\n try {\n result.notify(isFunction(callback) ? callback(progress) : progress);\n } catch (e) {\n exceptionHandler(e);\n }\n }\n });\n }\n }\n });\n\n /**\n * @ngdoc method\n * @name $q#reject\n * @kind function\n *\n * @description\n * Creates a promise that is resolved as rejected with the specified `reason`. This api should be\n * used to forward rejection in a chain of promises. If you are dealing with the last promise in\n * a promise chain, you don't need to worry about it.\n *\n * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of\n * `reject` as the `throw` keyword in JavaScript. This also means that if you \"catch\" an error via\n * a promise error callback and you want to forward the error to the promise derived from the\n * current promise, you have to \"rethrow\" the error by returning a rejection constructed via\n * `reject`.\n *\n * ```js\n * promiseB = promiseA.then(function(result) {\n * // success: do something and resolve promiseB\n * // with the old or a new result\n * return result;\n * }, function(reason) {\n * // error: handle the error if possible and\n * // resolve promiseB with newPromiseOrValue,\n * // otherwise forward the rejection to promiseB\n * if (canHandle(reason)) {\n * // handle the error and recover\n * return newPromiseOrValue;\n * }\n * return $q.reject(reason);\n * });\n * ```\n *\n * @param {*} reason Constant, message, exception or an object representing the rejection reason.\n * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`.\n */\n var reject = function(reason) {\n var result = new Deferred();\n result.reject(reason);\n return result.promise;\n };\n\n var makePromise = function makePromise(value, resolved) {\n var result = new Deferred();\n if (resolved) {\n result.resolve(value);\n } else {\n result.reject(value);\n }\n return result.promise;\n };\n\n var handleCallback = function handleCallback(value, isResolved, callback) {\n var callbackOutput = null;\n try {\n if (isFunction(callback)) callbackOutput = callback();\n } catch (e) {\n return makePromise(e, false);\n }\n if (isPromiseLike(callbackOutput)) {\n return callbackOutput.then(function() {\n return makePromise(value, isResolved);\n }, function(error) {\n return makePromise(error, false);\n });\n } else {\n return makePromise(value, isResolved);\n }\n };\n\n /**\n * @ngdoc method\n * @name $q#when\n * @kind function\n *\n * @description\n * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.\n * This is useful when you are dealing with an object that might or might not be a promise, or if\n * the promise comes from a source that can't be trusted.\n *\n * @param {*} value Value or a promise\n * @param {Function=} successCallback\n * @param {Function=} errorCallback\n * @param {Function=} progressCallback\n * @returns {Promise} Returns a promise of the passed value or promise\n */\n\n\n var when = function(value, callback, errback, progressBack) {\n var result = new Deferred();\n result.resolve(value);\n return result.promise.then(callback, errback, progressBack);\n };\n\n /**\n * @ngdoc method\n * @name $q#resolve\n * @kind function\n *\n * @description\n * Alias of {@link ng.$q#when when} to maintain naming consistency with ES6.\n *\n * @param {*} value Value or a promise\n * @param {Function=} successCallback\n * @param {Function=} errorCallback\n * @param {Function=} progressCallback\n * @returns {Promise} Returns a promise of the passed value or promise\n */\n var resolve = when;\n\n /**\n * @ngdoc method\n * @name $q#all\n * @kind function\n *\n * @description\n * Combines multiple promises into a single promise that is resolved when all of the input\n * promises are resolved.\n *\n * @param {Array.<Promise>|Object.<Promise>} promises An array or hash of promises.\n * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values,\n * each value corresponding to the promise at the same index/key in the `promises` array/hash.\n * If any of the promises is resolved with a rejection, this resulting promise will be rejected\n * with the same rejection value.\n */\n\n function all(promises) {\n var deferred = new Deferred(),\n counter = 0,\n results = isArray(promises) ? [] : {};\n\n forEach(promises, function(promise, key) {\n counter++;\n when(promise).then(function(value) {\n if (results.hasOwnProperty(key)) return;\n results[key] = value;\n if (!(--counter)) deferred.resolve(results);\n }, function(reason) {\n if (results.hasOwnProperty(key)) return;\n deferred.reject(reason);\n });\n });\n\n if (counter === 0) {\n deferred.resolve(results);\n }\n\n return deferred.promise;\n }\n\n var $Q = function Q(resolver) {\n if (!isFunction(resolver)) {\n throw $qMinErr('norslvr', \"Expected resolverFn, got '{0}'\", resolver);\n }\n\n if (!(this instanceof Q)) {\n // More useful when $Q is the Promise itself.\n return new Q(resolver);\n }\n\n var deferred = new Deferred();\n\n function resolveFn(value) {\n deferred.resolve(value);\n }\n\n function rejectFn(reason) {\n deferred.reject(reason);\n }\n\n resolver(resolveFn, rejectFn);\n\n return deferred.promise;\n };\n\n $Q.defer = defer;\n $Q.reject = reject;\n $Q.when = when;\n $Q.resolve = resolve;\n $Q.all = all;\n\n return $Q;\n}\n\nfunction $$RAFProvider() { //rAF\n this.$get = ['$window', '$timeout', function($window, $timeout) {\n var requestAnimationFrame = $window.requestAnimationFrame ||\n $window.webkitRequestAnimationFrame;\n\n var cancelAnimationFrame = $window.cancelAnimationFrame ||\n $window.webkitCancelAnimationFrame ||\n $window.webkitCancelRequestAnimationFrame;\n\n var rafSupported = !!requestAnimationFrame;\n var raf = rafSupported\n ? function(fn) {\n var id = requestAnimationFrame(fn);\n return function() {\n cancelAnimationFrame(id);\n };\n }\n : function(fn) {\n var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666\n return function() {\n $timeout.cancel(timer);\n };\n };\n\n raf.supported = rafSupported;\n\n return raf;\n }];\n}\n\n/**\n * DESIGN NOTES\n *\n * The design decisions behind the scope are heavily favored for speed and memory consumption.\n *\n * The typical use of scope is to watch the expressions, which most of the time return the same\n * value as last time so we optimize the operation.\n *\n * Closures construction is expensive in terms of speed as well as memory:\n * - No closures, instead use prototypical inheritance for API\n * - Internal state needs to be stored on scope directly, which means that private state is\n * exposed as $$____ properties\n *\n * Loop operations are optimized by using while(count--) { ... }\n * - This means that in order to keep the same order of execution as addition we have to add\n * items to the array at the beginning (unshift) instead of at the end (push)\n *\n * Child scopes are created and removed often\n * - Using an array would be slow since inserts in the middle are expensive; so we use linked lists\n *\n * There are fewer watches than observers. This is why you don't want the observer to be implemented\n * in the same way as watch. Watch requires return of the initialization function which is expensive\n * to construct.\n */\n\n\n/**\n * @ngdoc provider\n * @name $rootScopeProvider\n * @description\n *\n * Provider for the $rootScope service.\n */\n\n/**\n * @ngdoc method\n * @name $rootScopeProvider#digestTtl\n * @description\n *\n * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and\n * assuming that the model is unstable.\n *\n * The current default is 10 iterations.\n *\n * In complex applications it's possible that the dependencies between `$watch`s will result in\n * several digest iterations. However if an application needs more than the default 10 digest\n * iterations for its model to stabilize then you should investigate what is causing the model to\n * continuously change during the digest.\n *\n * Increasing the TTL could have performance implications, so you should not change it without\n * proper justification.\n *\n * @param {number} limit The number of digest iterations.\n */\n\n\n/**\n * @ngdoc service\n * @name $rootScope\n * @description\n *\n * Every application has a single root {@link ng.$rootScope.Scope scope}.\n * All other scopes are descendant scopes of the root scope. Scopes provide separation\n * between the model and the view, via a mechanism for watching the model for changes.\n * They also provide event emission/broadcast and subscription facility. See the\n * {@link guide/scope developer guide on scopes}.\n */\nfunction $RootScopeProvider() {\n var TTL = 10;\n var $rootScopeMinErr = minErr('$rootScope');\n var lastDirtyWatch = null;\n var applyAsyncId = null;\n\n this.digestTtl = function(value) {\n if (arguments.length) {\n TTL = value;\n }\n return TTL;\n };\n\n function createChildScopeClass(parent) {\n function ChildScope() {\n this.$$watchers = this.$$nextSibling =\n this.$$childHead = this.$$childTail = null;\n this.$$listeners = {};\n this.$$listenerCount = {};\n this.$$watchersCount = 0;\n this.$id = nextUid();\n this.$$ChildScope = null;\n }\n ChildScope.prototype = parent;\n return ChildScope;\n }\n\n this.$get = ['$injector', '$exceptionHandler', '$parse', '$browser',\n function($injector, $exceptionHandler, $parse, $browser) {\n\n function destroyChildScope($event) {\n $event.currentScope.$$destroyed = true;\n }\n\n function cleanUpScope($scope) {\n\n if (msie === 9) {\n // There is a memory leak in IE9 if all child scopes are not disconnected\n // completely when a scope is destroyed. So this code will recurse up through\n // all this scopes children\n //\n // See issue https://github.com/angular/angular.js/issues/10706\n $scope.$$childHead && cleanUpScope($scope.$$childHead);\n $scope.$$nextSibling && cleanUpScope($scope.$$nextSibling);\n }\n\n // The code below works around IE9 and V8's memory leaks\n //\n // See:\n // - https://code.google.com/p/v8/issues/detail?id=2073#c26\n // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909\n // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451\n\n $scope.$parent = $scope.$$nextSibling = $scope.$$prevSibling = $scope.$$childHead =\n $scope.$$childTail = $scope.$root = $scope.$$watchers = null;\n }\n\n /**\n * @ngdoc type\n * @name $rootScope.Scope\n *\n * @description\n * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the\n * {@link auto.$injector $injector}. Child scopes are created using the\n * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when\n * compiled HTML template is executed.) See also the {@link guide/scope Scopes guide} for\n * an in-depth introduction and usage examples.\n *\n *\n * # Inheritance\n * A scope can inherit from a parent scope, as in this example:\n * ```js\n var parent = $rootScope;\n var child = parent.$new();\n\n parent.salutation = \"Hello\";\n expect(child.salutation).toEqual('Hello');\n\n child.salutation = \"Welcome\";\n expect(child.salutation).toEqual('Welcome');\n expect(parent.salutation).toEqual('Hello');\n * ```\n *\n * When interacting with `Scope` in tests, additional helper methods are available on the\n * instances of `Scope` type. See {@link ngMock.$rootScope.Scope ngMock Scope} for additional\n * details.\n *\n *\n * @param {Object.<string, function()>=} providers Map of service factory which need to be\n * provided for the current scope. Defaults to {@link ng}.\n * @param {Object.<string, *>=} instanceCache Provides pre-instantiated services which should\n * append/override services provided by `providers`. This is handy\n * when unit-testing and having the need to override a default\n * service.\n * @returns {Object} Newly created scope.\n *\n */\n function Scope() {\n this.$id = nextUid();\n this.$$phase = this.$parent = this.$$watchers =\n this.$$nextSibling = this.$$prevSibling =\n this.$$childHead = this.$$childTail = null;\n this.$root = this;\n this.$$destroyed = false;\n this.$$listeners = {};\n this.$$listenerCount = {};\n this.$$watchersCount = 0;\n this.$$isolateBindings = null;\n }\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$id\n *\n * @description\n * Unique scope ID (monotonically increasing) useful for debugging.\n */\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$parent\n *\n * @description\n * Reference to the parent scope.\n */\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$root\n *\n * @description\n * Reference to the root scope.\n */\n\n Scope.prototype = {\n constructor: Scope,\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$new\n * @kind function\n *\n * @description\n * Creates a new child {@link ng.$rootScope.Scope scope}.\n *\n * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} event.\n * The scope can be removed from the scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.\n *\n * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is\n * desired for the scope and its child scopes to be permanently detached from the parent and\n * thus stop participating in model change detection and listener notification by invoking.\n *\n * @param {boolean} isolate If true, then the scope does not prototypically inherit from the\n * parent scope. The scope is isolated, as it can not see parent scope properties.\n * When creating widgets, it is useful for the widget to not accidentally read parent\n * state.\n *\n * @param {Scope} [parent=this] The {@link ng.$rootScope.Scope `Scope`} that will be the `$parent`\n * of the newly created scope. Defaults to `this` scope if not provided.\n * This is used when creating a transclude scope to correctly place it\n * in the scope hierarchy while maintaining the correct prototypical\n * inheritance.\n *\n * @returns {Object} The newly created child scope.\n *\n */\n $new: function(isolate, parent) {\n var child;\n\n parent = parent || this;\n\n if (isolate) {\n child = new Scope();\n child.$root = this.$root;\n } else {\n // Only create a child scope class if somebody asks for one,\n // but cache it to allow the VM to optimize lookups.\n if (!this.$$ChildScope) {\n this.$$ChildScope = createChildScopeClass(this);\n }\n child = new this.$$ChildScope();\n }\n child.$parent = parent;\n child.$$prevSibling = parent.$$childTail;\n if (parent.$$childHead) {\n parent.$$childTail.$$nextSibling = child;\n parent.$$childTail = child;\n } else {\n parent.$$childHead = parent.$$childTail = child;\n }\n\n // When the new scope is not isolated or we inherit from `this`, and\n // the parent scope is destroyed, the property `$$destroyed` is inherited\n // prototypically. In all other cases, this property needs to be set\n // when the parent scope is destroyed.\n // The listener needs to be added after the parent is set\n if (isolate || parent != this) child.$on('$destroy', destroyChildScope);\n\n return child;\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watch\n * @kind function\n *\n * @description\n * Registers a `listener` callback to be executed whenever the `watchExpression` changes.\n *\n * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest\n * $digest()} and should return the value that will be watched. (`watchExpression` should not change\n * its value when executed multiple times with the same input because it may be executed multiple\n * times by {@link ng.$rootScope.Scope#$digest $digest()}. That is, `watchExpression` should be\n * [idempotent](http://en.wikipedia.org/wiki/Idempotence).\n * - The `listener` is called only when the value from the current `watchExpression` and the\n * previous call to `watchExpression` are not equal (with the exception of the initial run,\n * see below). Inequality is determined according to reference inequality,\n * [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)\n * via the `!==` Javascript operator, unless `objectEquality == true`\n * (see next point)\n * - When `objectEquality == true`, inequality of the `watchExpression` is determined\n * according to the {@link angular.equals} function. To save the value of the object for\n * later comparison, the {@link angular.copy} function is used. This therefore means that\n * watching complex objects will have adverse memory and performance implications.\n * - The watch `listener` may change the model, which may trigger other `listener`s to fire.\n * This is achieved by rerunning the watchers until no changes are detected. The rerun\n * iteration limit is 10 to prevent an infinite loop deadlock.\n *\n *\n * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,\n * you can register a `watchExpression` function with no `listener`. (Be prepared for\n * multiple calls to your `watchExpression` because it will execute multiple times in a\n * single {@link ng.$rootScope.Scope#$digest $digest} cycle if a change is detected.)\n *\n * After a watcher is registered with the scope, the `listener` fn is called asynchronously\n * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the\n * watcher. In rare cases, this is undesirable because the listener is called when the result\n * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you\n * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the\n * listener was called due to initialization.\n *\n *\n *\n * # Example\n * ```js\n // let's assume that scope was dependency injected as the $rootScope\n var scope = $rootScope;\n scope.name = 'misko';\n scope.counter = 0;\n\n expect(scope.counter).toEqual(0);\n scope.$watch('name', function(newValue, oldValue) {\n scope.counter = scope.counter + 1;\n });\n expect(scope.counter).toEqual(0);\n\n scope.$digest();\n // the listener is always called during the first $digest loop after it was registered\n expect(scope.counter).toEqual(1);\n\n scope.$digest();\n // but now it will not be called unless the value changes\n expect(scope.counter).toEqual(1);\n\n scope.name = 'adam';\n scope.$digest();\n expect(scope.counter).toEqual(2);\n\n\n\n // Using a function as a watchExpression\n var food;\n scope.foodCounter = 0;\n expect(scope.foodCounter).toEqual(0);\n scope.$watch(\n // This function returns the value being watched. It is called for each turn of the $digest loop\n function() { return food; },\n // This is the change listener, called when the value returned from the above function changes\n function(newValue, oldValue) {\n if ( newValue !== oldValue ) {\n // Only increment the counter if the value changed\n scope.foodCounter = scope.foodCounter + 1;\n }\n }\n );\n // No digest has been run so the counter will be zero\n expect(scope.foodCounter).toEqual(0);\n\n // Run the digest but since food has not changed count will still be zero\n scope.$digest();\n expect(scope.foodCounter).toEqual(0);\n\n // Update food and run digest. Now the counter will increment\n food = 'cheeseburger';\n scope.$digest();\n expect(scope.foodCounter).toEqual(1);\n\n * ```\n *\n *\n *\n * @param {(function()|string)} watchExpression Expression that is evaluated on each\n * {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers\n * a call to the `listener`.\n *\n * - `string`: Evaluated as {@link guide/expression expression}\n * - `function(scope)`: called with current `scope` as a parameter.\n * @param {function(newVal, oldVal, scope)} listener Callback called whenever the value\n * of `watchExpression` changes.\n *\n * - `newVal` contains the current value of the `watchExpression`\n * - `oldVal` contains the previous value of the `watchExpression`\n * - `scope` refers to the current scope\n * @param {boolean=} objectEquality Compare for object equality using {@link angular.equals} instead of\n * comparing for reference equality.\n * @returns {function()} Returns a deregistration function for this listener.\n */\n $watch: function(watchExp, listener, objectEquality, prettyPrintExpression) {\n var get = $parse(watchExp);\n\n if (get.$$watchDelegate) {\n return get.$$watchDelegate(this, listener, objectEquality, get, watchExp);\n }\n var scope = this,\n array = scope.$$watchers,\n watcher = {\n fn: listener,\n last: initWatchVal,\n get: get,\n exp: prettyPrintExpression || watchExp,\n eq: !!objectEquality\n };\n\n lastDirtyWatch = null;\n\n if (!isFunction(listener)) {\n watcher.fn = noop;\n }\n\n if (!array) {\n array = scope.$$watchers = [];\n }\n // we use unshift since we use a while loop in $digest for speed.\n // the while loop reads in reverse order.\n array.unshift(watcher);\n incrementWatchersCount(this, 1);\n\n return function deregisterWatch() {\n if (arrayRemove(array, watcher) >= 0) {\n incrementWatchersCount(scope, -1);\n }\n lastDirtyWatch = null;\n };\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watchGroup\n * @kind function\n *\n * @description\n * A variant of {@link ng.$rootScope.Scope#$watch $watch()} where it watches an array of `watchExpressions`.\n * If any one expression in the collection changes the `listener` is executed.\n *\n * - The items in the `watchExpressions` array are observed via standard $watch operation and are examined on every\n * call to $digest() to see if any items changes.\n * - The `listener` is called whenever any expression in the `watchExpressions` array changes.\n *\n * @param {Array.<string|Function(scope)>} watchExpressions Array of expressions that will be individually\n * watched using {@link ng.$rootScope.Scope#$watch $watch()}\n *\n * @param {function(newValues, oldValues, scope)} listener Callback called whenever the return value of any\n * expression in `watchExpressions` changes\n * The `newValues` array contains the current values of the `watchExpressions`, with the indexes matching\n * those of `watchExpression`\n * and the `oldValues` array contains the previous values of the `watchExpressions`, with the indexes matching\n * those of `watchExpression`\n * The `scope` refers to the current scope.\n * @returns {function()} Returns a de-registration function for all listeners.\n */\n $watchGroup: function(watchExpressions, listener) {\n var oldValues = new Array(watchExpressions.length);\n var newValues = new Array(watchExpressions.length);\n var deregisterFns = [];\n var self = this;\n var changeReactionScheduled = false;\n var firstRun = true;\n\n if (!watchExpressions.length) {\n // No expressions means we call the listener ASAP\n var shouldCall = true;\n self.$evalAsync(function() {\n if (shouldCall) listener(newValues, newValues, self);\n });\n return function deregisterWatchGroup() {\n shouldCall = false;\n };\n }\n\n if (watchExpressions.length === 1) {\n // Special case size of one\n return this.$watch(watchExpressions[0], function watchGroupAction(value, oldValue, scope) {\n newValues[0] = value;\n oldValues[0] = oldValue;\n listener(newValues, (value === oldValue) ? newValues : oldValues, scope);\n });\n }\n\n forEach(watchExpressions, function(expr, i) {\n var unwatchFn = self.$watch(expr, function watchGroupSubAction(value, oldValue) {\n newValues[i] = value;\n oldValues[i] = oldValue;\n if (!changeReactionScheduled) {\n changeReactionScheduled = true;\n self.$evalAsync(watchGroupAction);\n }\n });\n deregisterFns.push(unwatchFn);\n });\n\n function watchGroupAction() {\n changeReactionScheduled = false;\n\n if (firstRun) {\n firstRun = false;\n listener(newValues, newValues, self);\n } else {\n listener(newValues, oldValues, self);\n }\n }\n\n return function deregisterWatchGroup() {\n while (deregisterFns.length) {\n deregisterFns.shift()();\n }\n };\n },\n\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watchCollection\n * @kind function\n *\n * @description\n * Shallow watches the properties of an object and fires whenever any of the properties change\n * (for arrays, this implies watching the array items; for object maps, this implies watching\n * the properties). If a change is detected, the `listener` callback is fired.\n *\n * - The `obj` collection is observed via standard $watch operation and is examined on every\n * call to $digest() to see if any items have been added, removed, or moved.\n * - The `listener` is called whenever anything within the `obj` has changed. Examples include\n * adding, removing, and moving items belonging to an object or array.\n *\n *\n * # Example\n * ```js\n $scope.names = ['igor', 'matias', 'misko', 'james'];\n $scope.dataCount = 4;\n\n $scope.$watchCollection('names', function(newNames, oldNames) {\n $scope.dataCount = newNames.length;\n });\n\n expect($scope.dataCount).toEqual(4);\n $scope.$digest();\n\n //still at 4 ... no changes\n expect($scope.dataCount).toEqual(4);\n\n $scope.names.pop();\n $scope.$digest();\n\n //now there's been a change\n expect($scope.dataCount).toEqual(3);\n * ```\n *\n *\n * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The\n * expression value should evaluate to an object or an array which is observed on each\n * {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the\n * collection will trigger a call to the `listener`.\n *\n * @param {function(newCollection, oldCollection, scope)} listener a callback function called\n * when a change is detected.\n * - The `newCollection` object is the newly modified data obtained from the `obj` expression\n * - The `oldCollection` object is a copy of the former collection data.\n * Due to performance considerations, the`oldCollection` value is computed only if the\n * `listener` function declares two or more arguments.\n * - The `scope` argument refers to the current scope.\n *\n * @returns {function()} Returns a de-registration function for this listener. When the\n * de-registration function is executed, the internal watch operation is terminated.\n */\n $watchCollection: function(obj, listener) {\n $watchCollectionInterceptor.$stateful = true;\n\n var self = this;\n // the current value, updated on each dirty-check run\n var newValue;\n // a shallow copy of the newValue from the last dirty-check run,\n // updated to match newValue during dirty-check run\n var oldValue;\n // a shallow copy of the newValue from when the last change happened\n var veryOldValue;\n // only track veryOldValue if the listener is asking for it\n var trackVeryOldValue = (listener.length > 1);\n var changeDetected = 0;\n var changeDetector = $parse(obj, $watchCollectionInterceptor);\n var internalArray = [];\n var internalObject = {};\n var initRun = true;\n var oldLength = 0;\n\n function $watchCollectionInterceptor(_value) {\n newValue = _value;\n var newLength, key, bothNaN, newItem, oldItem;\n\n // If the new value is undefined, then return undefined as the watch may be a one-time watch\n if (isUndefined(newValue)) return;\n\n if (!isObject(newValue)) { // if primitive\n if (oldValue !== newValue) {\n oldValue = newValue;\n changeDetected++;\n }\n } else if (isArrayLike(newValue)) {\n if (oldValue !== internalArray) {\n // we are transitioning from something which was not an array into array.\n oldValue = internalArray;\n oldLength = oldValue.length = 0;\n changeDetected++;\n }\n\n newLength = newValue.length;\n\n if (oldLength !== newLength) {\n // if lengths do not match we need to trigger change notification\n changeDetected++;\n oldValue.length = oldLength = newLength;\n }\n // copy the items to oldValue and look for changes.\n for (var i = 0; i < newLength; i++) {\n oldItem = oldValue[i];\n newItem = newValue[i];\n\n bothNaN = (oldItem !== oldItem) && (newItem !== newItem);\n if (!bothNaN && (oldItem !== newItem)) {\n changeDetected++;\n oldValue[i] = newItem;\n }\n }\n } else {\n if (oldValue !== internalObject) {\n // we are transitioning from something which was not an object into object.\n oldValue = internalObject = {};\n oldLength = 0;\n changeDetected++;\n }\n // copy the items to oldValue and look for changes.\n newLength = 0;\n for (key in newValue) {\n if (hasOwnProperty.call(newValue, key)) {\n newLength++;\n newItem = newValue[key];\n oldItem = oldValue[key];\n\n if (key in oldValue) {\n bothNaN = (oldItem !== oldItem) && (newItem !== newItem);\n if (!bothNaN && (oldItem !== newItem)) {\n changeDetected++;\n oldValue[key] = newItem;\n }\n } else {\n oldLength++;\n oldValue[key] = newItem;\n changeDetected++;\n }\n }\n }\n if (oldLength > newLength) {\n // we used to have more keys, need to find them and destroy them.\n changeDetected++;\n for (key in oldValue) {\n if (!hasOwnProperty.call(newValue, key)) {\n oldLength--;\n delete oldValue[key];\n }\n }\n }\n }\n return changeDetected;\n }\n\n function $watchCollectionAction() {\n if (initRun) {\n initRun = false;\n listener(newValue, newValue, self);\n } else {\n listener(newValue, veryOldValue, self);\n }\n\n // make a copy for the next time a collection is changed\n if (trackVeryOldValue) {\n if (!isObject(newValue)) {\n //primitive\n veryOldValue = newValue;\n } else if (isArrayLike(newValue)) {\n veryOldValue = new Array(newValue.length);\n for (var i = 0; i < newValue.length; i++) {\n veryOldValue[i] = newValue[i];\n }\n } else { // if object\n veryOldValue = {};\n for (var key in newValue) {\n if (hasOwnProperty.call(newValue, key)) {\n veryOldValue[key] = newValue[key];\n }\n }\n }\n }\n }\n\n return this.$watch(changeDetector, $watchCollectionAction);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$digest\n * @kind function\n *\n * @description\n * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and\n * its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change\n * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers}\n * until no more listeners are firing. This means that it is possible to get into an infinite\n * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of\n * iterations exceeds 10.\n *\n * Usually, you don't call `$digest()` directly in\n * {@link ng.directive:ngController controllers} or in\n * {@link ng.$compileProvider#directive directives}.\n * Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within\n * a {@link ng.$compileProvider#directive directive}), which will force a `$digest()`.\n *\n * If you want to be notified whenever `$digest()` is called,\n * you can register a `watchExpression` function with\n * {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`.\n *\n * In unit tests, you may need to call `$digest()` to simulate the scope life cycle.\n *\n * # Example\n * ```js\n var scope = ...;\n scope.name = 'misko';\n scope.counter = 0;\n\n expect(scope.counter).toEqual(0);\n scope.$watch('name', function(newValue, oldValue) {\n scope.counter = scope.counter + 1;\n });\n expect(scope.counter).toEqual(0);\n\n scope.$digest();\n // the listener is always called during the first $digest loop after it was registered\n expect(scope.counter).toEqual(1);\n\n scope.$digest();\n // but now it will not be called unless the value changes\n expect(scope.counter).toEqual(1);\n\n scope.name = 'adam';\n scope.$digest();\n expect(scope.counter).toEqual(2);\n * ```\n *\n */\n $digest: function() {\n var watch, value, last, fn, get,\n watchers,\n length,\n dirty, ttl = TTL,\n next, current, target = this,\n watchLog = [],\n logIdx, logMsg, asyncTask;\n\n beginPhase('$digest');\n // Check for changes to browser url that happened in sync before the call to $digest\n $browser.$$checkUrlChange();\n\n if (this === $rootScope && applyAsyncId !== null) {\n // If this is the root scope, and $applyAsync has scheduled a deferred $apply(), then\n // cancel the scheduled $apply and flush the queue of expressions to be evaluated.\n $browser.defer.cancel(applyAsyncId);\n flushApplyAsync();\n }\n\n lastDirtyWatch = null;\n\n do { // \"while dirty\" loop\n dirty = false;\n current = target;\n\n while (asyncQueue.length) {\n try {\n asyncTask = asyncQueue.shift();\n asyncTask.scope.$eval(asyncTask.expression, asyncTask.locals);\n } catch (e) {\n $exceptionHandler(e);\n }\n lastDirtyWatch = null;\n }\n\n traverseScopesLoop:\n do { // \"traverse the scopes\" loop\n if ((watchers = current.$$watchers)) {\n // process our watches\n length = watchers.length;\n while (length--) {\n try {\n watch = watchers[length];\n // Most common watches are on primitives, in which case we can short\n // circuit it with === operator, only when === fails do we use .equals\n if (watch) {\n get = watch.get;\n if ((value = get(current)) !== (last = watch.last) &&\n !(watch.eq\n ? equals(value, last)\n : (typeof value === 'number' && typeof last === 'number'\n && isNaN(value) && isNaN(last)))) {\n dirty = true;\n lastDirtyWatch = watch;\n watch.last = watch.eq ? copy(value, null) : value;\n fn = watch.fn;\n fn(value, ((last === initWatchVal) ? value : last), current);\n if (ttl < 5) {\n logIdx = 4 - ttl;\n if (!watchLog[logIdx]) watchLog[logIdx] = [];\n watchLog[logIdx].push({\n msg: isFunction(watch.exp) ? 'fn: ' + (watch.exp.name || watch.exp.toString()) : watch.exp,\n newVal: value,\n oldVal: last\n });\n }\n } else if (watch === lastDirtyWatch) {\n // If the most recently dirty watcher is now clean, short circuit since the remaining watchers\n // have already been tested.\n dirty = false;\n break traverseScopesLoop;\n }\n }\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n }\n\n // Insanity Warning: scope depth-first traversal\n // yes, this code is a bit crazy, but it works and we have tests to prove it!\n // this piece should be kept in sync with the traversal in $broadcast\n if (!(next = ((current.$$watchersCount && current.$$childHead) ||\n (current !== target && current.$$nextSibling)))) {\n while (current !== target && !(next = current.$$nextSibling)) {\n current = current.$parent;\n }\n }\n } while ((current = next));\n\n // `break traverseScopesLoop;` takes us to here\n\n if ((dirty || asyncQueue.length) && !(ttl--)) {\n clearPhase();\n throw $rootScopeMinErr('infdig',\n '{0} $digest() iterations reached. Aborting!\\n' +\n 'Watchers fired in the last 5 iterations: {1}',\n TTL, watchLog);\n }\n\n } while (dirty || asyncQueue.length);\n\n clearPhase();\n\n while (postDigestQueue.length) {\n try {\n postDigestQueue.shift()();\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n },\n\n\n /**\n * @ngdoc event\n * @name $rootScope.Scope#$destroy\n * @eventType broadcast on scope being destroyed\n *\n * @description\n * Broadcasted when a scope and its children are being destroyed.\n *\n * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n * clean up DOM bindings before an element is removed from the DOM.\n */\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$destroy\n * @kind function\n *\n * @description\n * Removes the current scope (and all of its children) from the parent scope. Removal implies\n * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer\n * propagate to the current scope and its children. Removal also implies that the current\n * scope is eligible for garbage collection.\n *\n * The `$destroy()` is usually used by directives such as\n * {@link ng.directive:ngRepeat ngRepeat} for managing the\n * unrolling of the loop.\n *\n * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.\n * Application code can register a `$destroy` event handler that will give it a chance to\n * perform any necessary cleanup.\n *\n * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n * clean up DOM bindings before an element is removed from the DOM.\n */\n $destroy: function() {\n // We can't destroy a scope that has been already destroyed.\n if (this.$$destroyed) return;\n var parent = this.$parent;\n\n this.$broadcast('$destroy');\n this.$$destroyed = true;\n\n if (this === $rootScope) {\n //Remove handlers attached to window when $rootScope is removed\n $browser.$$applicationDestroyed();\n }\n\n incrementWatchersCount(this, -this.$$watchersCount);\n for (var eventName in this.$$listenerCount) {\n decrementListenerCount(this, this.$$listenerCount[eventName], eventName);\n }\n\n // sever all the references to parent scopes (after this cleanup, the current scope should\n // not be retained by any of our references and should be eligible for garbage collection)\n if (parent && parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;\n if (parent && parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;\n if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;\n if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;\n\n // Disable listeners, watchers and apply/digest methods\n this.$destroy = this.$digest = this.$apply = this.$evalAsync = this.$applyAsync = noop;\n this.$on = this.$watch = this.$watchGroup = function() { return noop; };\n this.$$listeners = {};\n\n // Disconnect the next sibling to prevent `cleanUpScope` destroying those too\n this.$$nextSibling = null;\n cleanUpScope(this);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$eval\n * @kind function\n *\n * @description\n * Executes the `expression` on the current scope and returns the result. Any exceptions in\n * the expression are propagated (uncaught). This is useful when evaluating Angular\n * expressions.\n *\n * # Example\n * ```js\n var scope = ng.$rootScope.Scope();\n scope.a = 1;\n scope.b = 2;\n\n expect(scope.$eval('a+b')).toEqual(3);\n expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);\n * ```\n *\n * @param {(string|function())=} expression An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with the current `scope` parameter.\n *\n * @param {(object)=} locals Local variables object, useful for overriding values in scope.\n * @returns {*} The result of evaluating the expression.\n */\n $eval: function(expr, locals) {\n return $parse(expr)(this, locals);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$evalAsync\n * @kind function\n *\n * @description\n * Executes the expression on the current scope at a later point in time.\n *\n * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only\n * that:\n *\n * - it will execute after the function that scheduled the evaluation (preferably before DOM\n * rendering).\n * - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after\n * `expression` execution.\n *\n * Any exceptions from the execution of the expression are forwarded to the\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle\n * will be scheduled. However, it is encouraged to always call code that changes the model\n * from within an `$apply` call. That includes code evaluated via `$evalAsync`.\n *\n * @param {(string|function())=} expression An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with the current `scope` parameter.\n *\n * @param {(object)=} locals Local variables object, useful for overriding values in scope.\n */\n $evalAsync: function(expr, locals) {\n // if we are outside of an $digest loop and this is the first time we are scheduling async\n // task also schedule async auto-flush\n if (!$rootScope.$$phase && !asyncQueue.length) {\n $browser.defer(function() {\n if (asyncQueue.length) {\n $rootScope.$digest();\n }\n });\n }\n\n asyncQueue.push({scope: this, expression: $parse(expr), locals: locals});\n },\n\n $$postDigest: function(fn) {\n postDigestQueue.push(fn);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$apply\n * @kind function\n *\n * @description\n * `$apply()` is used to execute an expression in angular from outside of the angular\n * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries).\n * Because we are calling into the angular framework we need to perform proper scope life\n * cycle of {@link ng.$exceptionHandler exception handling},\n * {@link ng.$rootScope.Scope#$digest executing watches}.\n *\n * ## Life cycle\n *\n * # Pseudo-Code of `$apply()`\n * ```js\n function $apply(expr) {\n try {\n return $eval(expr);\n } catch (e) {\n $exceptionHandler(e);\n } finally {\n $root.$digest();\n }\n }\n * ```\n *\n *\n * Scope's `$apply()` method transitions through the following stages:\n *\n * 1. The {@link guide/expression expression} is executed using the\n * {@link ng.$rootScope.Scope#$eval $eval()} method.\n * 2. Any exceptions from the execution of the expression are forwarded to the\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the\n * expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method.\n *\n *\n * @param {(string|function())=} exp An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with current `scope` parameter.\n *\n * @returns {*} The result of evaluating the expression.\n */\n $apply: function(expr) {\n try {\n beginPhase('$apply');\n try {\n return this.$eval(expr);\n } finally {\n clearPhase();\n }\n } catch (e) {\n $exceptionHandler(e);\n } finally {\n try {\n $rootScope.$digest();\n } catch (e) {\n $exceptionHandler(e);\n throw e;\n }\n }\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$applyAsync\n * @kind function\n *\n * @description\n * Schedule the invocation of $apply to occur at a later time. The actual time difference\n * varies across browsers, but is typically around ~10 milliseconds.\n *\n * This can be used to queue up multiple expressions which need to be evaluated in the same\n * digest.\n *\n * @param {(string|function())=} exp An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with current `scope` parameter.\n */\n $applyAsync: function(expr) {\n var scope = this;\n expr && applyAsyncQueue.push($applyAsyncExpression);\n expr = $parse(expr);\n scheduleApplyAsync();\n\n function $applyAsyncExpression() {\n scope.$eval(expr);\n }\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$on\n * @kind function\n *\n * @description\n * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for\n * discussion of event life cycle.\n *\n * The event listener function format is: `function(event, args...)`. The `event` object\n * passed into the listener has the following attributes:\n *\n * - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or\n * `$broadcast`-ed.\n * - `currentScope` - `{Scope}`: the scope that is currently handling the event. Once the\n * event propagates through the scope hierarchy, this property is set to null.\n * - `name` - `{string}`: name of the event.\n * - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel\n * further event propagation (available only for events that were `$emit`-ed).\n * - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag\n * to true.\n * - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.\n *\n * @param {string} name Event name to listen on.\n * @param {function(event, ...args)} listener Function to call when the event is emitted.\n * @returns {function()} Returns a deregistration function for this listener.\n */\n $on: function(name, listener) {\n var namedListeners = this.$$listeners[name];\n if (!namedListeners) {\n this.$$listeners[name] = namedListeners = [];\n }\n namedListeners.push(listener);\n\n var current = this;\n do {\n if (!current.$$listenerCount[name]) {\n current.$$listenerCount[name] = 0;\n }\n current.$$listenerCount[name]++;\n } while ((current = current.$parent));\n\n var self = this;\n return function() {\n var indexOfListener = namedListeners.indexOf(listener);\n if (indexOfListener !== -1) {\n namedListeners[indexOfListener] = null;\n decrementListenerCount(self, 1, name);\n }\n };\n },\n\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$emit\n * @kind function\n *\n * @description\n * Dispatches an event `name` upwards through the scope hierarchy notifying the\n * registered {@link ng.$rootScope.Scope#$on} listeners.\n *\n * The event life cycle starts at the scope on which `$emit` was called. All\n * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get\n * notified. Afterwards, the event traverses upwards toward the root scope and calls all\n * registered listeners along the way. The event will stop propagating if one of the listeners\n * cancels it.\n *\n * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed\n * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * @param {string} name Event name to emit.\n * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n * @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}).\n */\n $emit: function(name, args) {\n var empty = [],\n namedListeners,\n scope = this,\n stopPropagation = false,\n event = {\n name: name,\n targetScope: scope,\n stopPropagation: function() {stopPropagation = true;},\n preventDefault: function() {\n event.defaultPrevented = true;\n },\n defaultPrevented: false\n },\n listenerArgs = concat([event], arguments, 1),\n i, length;\n\n do {\n namedListeners = scope.$$listeners[name] || empty;\n event.currentScope = scope;\n for (i = 0, length = namedListeners.length; i < length; i++) {\n\n // if listeners were deregistered, defragment the array\n if (!namedListeners[i]) {\n namedListeners.splice(i, 1);\n i--;\n length--;\n continue;\n }\n try {\n //allow all listeners attached to the current scope to run\n namedListeners[i].apply(null, listenerArgs);\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n //if any listener on the current scope stops propagation, prevent bubbling\n if (stopPropagation) {\n event.currentScope = null;\n return event;\n }\n //traverse upwards\n scope = scope.$parent;\n } while (scope);\n\n event.currentScope = null;\n\n return event;\n },\n\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$broadcast\n * @kind function\n *\n * @description\n * Dispatches an event `name` downwards to all child scopes (and their children) notifying the\n * registered {@link ng.$rootScope.Scope#$on} listeners.\n *\n * The event life cycle starts at the scope on which `$broadcast` was called. All\n * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get\n * notified. Afterwards, the event propagates to all direct and indirect scopes of the current\n * scope and calls all registered listeners along the way. The event cannot be canceled.\n *\n * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed\n * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * @param {string} name Event name to broadcast.\n * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n * @return {Object} Event object, see {@link ng.$rootScope.Scope#$on}\n */\n $broadcast: function(name, args) {\n var target = this,\n current = target,\n next = target,\n event = {\n name: name,\n targetScope: target,\n preventDefault: function() {\n event.defaultPrevented = true;\n },\n defaultPrevented: false\n };\n\n if (!target.$$listenerCount[name]) return event;\n\n var listenerArgs = concat([event], arguments, 1),\n listeners, i, length;\n\n //down while you can, then up and next sibling or up and next sibling until back at root\n while ((current = next)) {\n event.currentScope = current;\n listeners = current.$$listeners[name] || [];\n for (i = 0, length = listeners.length; i < length; i++) {\n // if listeners were deregistered, defragment the array\n if (!listeners[i]) {\n listeners.splice(i, 1);\n i--;\n length--;\n continue;\n }\n\n try {\n listeners[i].apply(null, listenerArgs);\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n\n // Insanity Warning: scope depth-first traversal\n // yes, this code is a bit crazy, but it works and we have tests to prove it!\n // this piece should be kept in sync with the traversal in $digest\n // (though it differs due to having the extra check for $$listenerCount)\n if (!(next = ((current.$$listenerCount[name] && current.$$childHead) ||\n (current !== target && current.$$nextSibling)))) {\n while (current !== target && !(next = current.$$nextSibling)) {\n current = current.$parent;\n }\n }\n }\n\n event.currentScope = null;\n return event;\n }\n };\n\n var $rootScope = new Scope();\n\n //The internal queues. Expose them on the $rootScope for debugging/testing purposes.\n var asyncQueue = $rootScope.$$asyncQueue = [];\n var postDigestQueue = $rootScope.$$postDigestQueue = [];\n var applyAsyncQueue = $rootScope.$$applyAsyncQueue = [];\n\n return $rootScope;\n\n\n function beginPhase(phase) {\n if ($rootScope.$$phase) {\n throw $rootScopeMinErr('inprog', '{0} already in progress', $rootScope.$$phase);\n }\n\n $rootScope.$$phase = phase;\n }\n\n function clearPhase() {\n $rootScope.$$phase = null;\n }\n\n function incrementWatchersCount(current, count) {\n do {\n current.$$watchersCount += count;\n } while ((current = current.$parent));\n }\n\n function decrementListenerCount(current, count, name) {\n do {\n current.$$listenerCount[name] -= count;\n\n if (current.$$listenerCount[name] === 0) {\n delete current.$$listenerCount[name];\n }\n } while ((current = current.$parent));\n }\n\n /**\n * function used as an initial value for watchers.\n * because it's unique we can easily tell it apart from other values\n */\n function initWatchVal() {}\n\n function flushApplyAsync() {\n while (applyAsyncQueue.length) {\n try {\n applyAsyncQueue.shift()();\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n applyAsyncId = null;\n }\n\n function scheduleApplyAsync() {\n if (applyAsyncId === null) {\n applyAsyncId = $browser.defer(function() {\n $rootScope.$apply(flushApplyAsync);\n });\n }\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $rootElement\n *\n * @description\n * The root element of Angular application. This is either the element where {@link\n * ng.directive:ngApp ngApp} was declared or the element passed into\n * {@link angular.bootstrap}. The element represents the root element of application. It is also the\n * location where the application's {@link auto.$injector $injector} service gets\n * published, and can be retrieved using `$rootElement.injector()`.\n */\n\n\n// the implementation is in angular.bootstrap\n\n/**\n * @description\n * Private service to sanitize uris for links and images. Used by $compile and $sanitize.\n */\nfunction $$SanitizeUriProvider() {\n var aHrefSanitizationWhitelist = /^\\s*(https?|ftp|mailto|tel|file):/,\n imgSrcSanitizationWhitelist = /^\\s*((https?|ftp|file|blob):|data:image\\/)/;\n\n /**\n * @description\n * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n * urls during a[href] sanitization.\n *\n * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n *\n * Any url about to be assigned to a[href] via data-binding is first normalized and turned into\n * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`\n * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n *\n * @param {RegExp=} regexp New regexp to whitelist urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.aHrefSanitizationWhitelist = function(regexp) {\n if (isDefined(regexp)) {\n aHrefSanitizationWhitelist = regexp;\n return this;\n }\n return aHrefSanitizationWhitelist;\n };\n\n\n /**\n * @description\n * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n * urls during img[src] sanitization.\n *\n * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n *\n * Any url about to be assigned to img[src] via data-binding is first normalized and turned into\n * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`\n * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n *\n * @param {RegExp=} regexp New regexp to whitelist urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.imgSrcSanitizationWhitelist = function(regexp) {\n if (isDefined(regexp)) {\n imgSrcSanitizationWhitelist = regexp;\n return this;\n }\n return imgSrcSanitizationWhitelist;\n };\n\n this.$get = function() {\n return function sanitizeUri(uri, isImage) {\n var regex = isImage ? imgSrcSanitizationWhitelist : aHrefSanitizationWhitelist;\n var normalizedVal;\n normalizedVal = urlResolve(uri).href;\n if (normalizedVal !== '' && !normalizedVal.match(regex)) {\n return 'unsafe:' + normalizedVal;\n }\n return uri;\n };\n };\n}\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * Any commits to this file should be reviewed with security in mind. *\n * Changes to this file can potentially create security vulnerabilities. *\n * An approval from 2 Core members with history of modifying *\n * this file is required. *\n * *\n * Does the change somehow allow for arbitrary javascript to be executed? *\n * Or allows for someone to change the prototype of built-in objects? *\n * Or gives undesired access to variables likes document or window? *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\nvar $sceMinErr = minErr('$sce');\n\nvar SCE_CONTEXTS = {\n HTML: 'html',\n CSS: 'css',\n URL: 'url',\n // RESOURCE_URL is a subtype of URL used in contexts where a privileged resource is sourced from a\n // url. (e.g. ng-include, script src, templateUrl)\n RESOURCE_URL: 'resourceUrl',\n JS: 'js'\n};\n\n// Helper functions follow.\n\nfunction adjustMatcher(matcher) {\n if (matcher === 'self') {\n return matcher;\n } else if (isString(matcher)) {\n // Strings match exactly except for 2 wildcards - '*' and '**'.\n // '*' matches any character except those from the set ':/.?&'.\n // '**' matches any character (like .* in a RegExp).\n // More than 2 *'s raises an error as it's ill defined.\n if (matcher.indexOf('***') > -1) {\n throw $sceMinErr('iwcard',\n 'Illegal sequence *** in string matcher. String: {0}', matcher);\n }\n matcher = escapeForRegexp(matcher).\n replace('\\\\*\\\\*', '.*').\n replace('\\\\*', '[^:/.?&;]*');\n return new RegExp('^' + matcher + '$');\n } else if (isRegExp(matcher)) {\n // The only other type of matcher allowed is a Regexp.\n // Match entire URL / disallow partial matches.\n // Flags are reset (i.e. no global, ignoreCase or multiline)\n return new RegExp('^' + matcher.source + '$');\n } else {\n throw $sceMinErr('imatcher',\n 'Matchers may only be \"self\", string patterns or RegExp objects');\n }\n}\n\n\nfunction adjustMatchers(matchers) {\n var adjustedMatchers = [];\n if (isDefined(matchers)) {\n forEach(matchers, function(matcher) {\n adjustedMatchers.push(adjustMatcher(matcher));\n });\n }\n return adjustedMatchers;\n}\n\n\n/**\n * @ngdoc service\n * @name $sceDelegate\n * @kind function\n *\n * @description\n *\n * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict\n * Contextual Escaping (SCE)} services to AngularJS.\n *\n * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of\n * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS. This is\n * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to\n * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things\n * work because `$sce` delegates to `$sceDelegate` for these operations.\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service.\n *\n * The default instance of `$sceDelegate` should work out of the box with little pain. While you\n * can override it completely to change the behavior of `$sce`, the common case would\n * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting\n * your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as\n * templates. Refer {@link ng.$sceDelegateProvider#resourceUrlWhitelist\n * $sceDelegateProvider.resourceUrlWhitelist} and {@link\n * ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n */\n\n/**\n * @ngdoc provider\n * @name $sceDelegateProvider\n * @description\n *\n * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate\n * $sceDelegate} service. This allows one to get/set the whitelists and blacklists used to ensure\n * that the URLs used for sourcing Angular templates are safe. Refer {@link\n * ng.$sceDelegateProvider#resourceUrlWhitelist $sceDelegateProvider.resourceUrlWhitelist} and\n * {@link ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n *\n * For the general details about this service in Angular, read the main page for {@link ng.$sce\n * Strict Contextual Escaping (SCE)}.\n *\n * **Example**: Consider the following case. <a name=\"example\"></a>\n *\n * - your app is hosted at url `http://myapp.example.com/`\n * - but some of your templates are hosted on other domains you control such as\n * `http://srv01.assets.example.com/`,  `http://srv02.assets.example.com/`, etc.\n * - and you have an open redirect at `http://myapp.example.com/clickThru?...`.\n *\n * Here is what a secure configuration for this scenario might look like:\n *\n * ```\n * angular.module('myApp', []).config(function($sceDelegateProvider) {\n * $sceDelegateProvider.resourceUrlWhitelist([\n * // Allow same origin resource loads.\n * 'self',\n * // Allow loading from our assets domain. Notice the difference between * and **.\n * 'http://srv*.assets.example.com/**'\n * ]);\n *\n * // The blacklist overrides the whitelist so the open redirect here is blocked.\n * $sceDelegateProvider.resourceUrlBlacklist([\n * 'http://myapp.example.com/clickThru**'\n * ]);\n * });\n * ```\n */\n\nfunction $SceDelegateProvider() {\n this.SCE_CONTEXTS = SCE_CONTEXTS;\n\n // Resource URLs can also be trusted by policy.\n var resourceUrlWhitelist = ['self'],\n resourceUrlBlacklist = [];\n\n /**\n * @ngdoc method\n * @name $sceDelegateProvider#resourceUrlWhitelist\n * @kind function\n *\n * @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value\n * provided. This must be an array or null. A snapshot of this array is used so further\n * changes to the array are ignored.\n *\n * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n * allowed in this array.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** an empty whitelist array will block all URLs!\n * </div>\n *\n * @return {Array} the currently set whitelist array.\n *\n * The **default value** when no whitelist has been explicitly set is `['self']` allowing only\n * same origin resource requests.\n *\n * @description\n * Sets/Gets the whitelist of trusted resource URLs.\n */\n this.resourceUrlWhitelist = function(value) {\n if (arguments.length) {\n resourceUrlWhitelist = adjustMatchers(value);\n }\n return resourceUrlWhitelist;\n };\n\n /**\n * @ngdoc method\n * @name $sceDelegateProvider#resourceUrlBlacklist\n * @kind function\n *\n * @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value\n * provided. This must be an array or null. A snapshot of this array is used so further\n * changes to the array are ignored.\n *\n * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n * allowed in this array.\n *\n * The typical usage for the blacklist is to **block\n * [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as\n * these would otherwise be trusted but actually return content from the redirected domain.\n *\n * Finally, **the blacklist overrides the whitelist** and has the final say.\n *\n * @return {Array} the currently set blacklist array.\n *\n * The **default value** when no whitelist has been explicitly set is the empty array (i.e. there\n * is no blacklist.)\n *\n * @description\n * Sets/Gets the blacklist of trusted resource URLs.\n */\n\n this.resourceUrlBlacklist = function(value) {\n if (arguments.length) {\n resourceUrlBlacklist = adjustMatchers(value);\n }\n return resourceUrlBlacklist;\n };\n\n this.$get = ['$injector', function($injector) {\n\n var htmlSanitizer = function htmlSanitizer(html) {\n throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n };\n\n if ($injector.has('$sanitize')) {\n htmlSanitizer = $injector.get('$sanitize');\n }\n\n\n function matchUrl(matcher, parsedUrl) {\n if (matcher === 'self') {\n return urlIsSameOrigin(parsedUrl);\n } else {\n // definitely a regex. See adjustMatchers()\n return !!matcher.exec(parsedUrl.href);\n }\n }\n\n function isResourceUrlAllowedByPolicy(url) {\n var parsedUrl = urlResolve(url.toString());\n var i, n, allowed = false;\n // Ensure that at least one item from the whitelist allows this url.\n for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) {\n if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) {\n allowed = true;\n break;\n }\n }\n if (allowed) {\n // Ensure that no item from the blacklist blocked this url.\n for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) {\n if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) {\n allowed = false;\n break;\n }\n }\n }\n return allowed;\n }\n\n function generateHolderType(Base) {\n var holderType = function TrustedValueHolderType(trustedValue) {\n this.$$unwrapTrustedValue = function() {\n return trustedValue;\n };\n };\n if (Base) {\n holderType.prototype = new Base();\n }\n holderType.prototype.valueOf = function sceValueOf() {\n return this.$$unwrapTrustedValue();\n };\n holderType.prototype.toString = function sceToString() {\n return this.$$unwrapTrustedValue().toString();\n };\n return holderType;\n }\n\n var trustedValueHolderBase = generateHolderType(),\n byType = {};\n\n byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.URL] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]);\n\n /**\n * @ngdoc method\n * @name $sceDelegate#trustAs\n *\n * @description\n * Returns an object that is trusted by angular for use in specified strict\n * contextual escaping contexts (such as ng-bind-html, ng-include, any src\n * attribute interpolation, any dom event binding attribute interpolation\n * such as for onclick, etc.) that uses the provided value.\n * See {@link ng.$sce $sce} for enabling strict contextual escaping.\n *\n * @param {string} type The kind of context in which this value is safe for use. e.g. url,\n * resourceUrl, html, js and css.\n * @param {*} value The value that that should be considered trusted/safe.\n * @returns {*} A value that can be used to stand in for the provided `value` in places\n * where Angular expects a $sce.trustAs() return value.\n */\n function trustAs(type, trustedValue) {\n var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n if (!Constructor) {\n throw $sceMinErr('icontext',\n 'Attempted to trust a value in invalid context. Context: {0}; Value: {1}',\n type, trustedValue);\n }\n if (trustedValue === null || isUndefined(trustedValue) || trustedValue === '') {\n return trustedValue;\n }\n // All the current contexts in SCE_CONTEXTS happen to be strings. In order to avoid trusting\n // mutable objects, we ensure here that the value passed in is actually a string.\n if (typeof trustedValue !== 'string') {\n throw $sceMinErr('itype',\n 'Attempted to trust a non-string value in a content requiring a string: Context: {0}',\n type);\n }\n return new Constructor(trustedValue);\n }\n\n /**\n * @ngdoc method\n * @name $sceDelegate#valueOf\n *\n * @description\n * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link\n * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}.\n *\n * If the passed parameter is not a value that had been returned by {@link\n * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}, returns it as-is.\n *\n * @param {*} value The result of a prior {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}\n * call or anything else.\n * @returns {*} The `value` that was originally provided to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} if `value` is the result of such a call. Otherwise, returns\n * `value` unchanged.\n */\n function valueOf(maybeTrusted) {\n if (maybeTrusted instanceof trustedValueHolderBase) {\n return maybeTrusted.$$unwrapTrustedValue();\n } else {\n return maybeTrusted;\n }\n }\n\n /**\n * @ngdoc method\n * @name $sceDelegate#getTrusted\n *\n * @description\n * Takes the result of a {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`} call and\n * returns the originally supplied value if the queried context type is a supertype of the\n * created type. If this condition isn't satisfied, throws an exception.\n *\n * @param {string} type The kind of context in which this value is to be used.\n * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} call.\n * @returns {*} The value the was originally provided to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} if valid in this context. Otherwise, throws an exception.\n */\n function getTrusted(type, maybeTrusted) {\n if (maybeTrusted === null || isUndefined(maybeTrusted) || maybeTrusted === '') {\n return maybeTrusted;\n }\n var constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n if (constructor && maybeTrusted instanceof constructor) {\n return maybeTrusted.$$unwrapTrustedValue();\n }\n // If we get here, then we may only take one of two actions.\n // 1. sanitize the value for the requested type, or\n // 2. throw an exception.\n if (type === SCE_CONTEXTS.RESOURCE_URL) {\n if (isResourceUrlAllowedByPolicy(maybeTrusted)) {\n return maybeTrusted;\n } else {\n throw $sceMinErr('insecurl',\n 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}',\n maybeTrusted.toString());\n }\n } else if (type === SCE_CONTEXTS.HTML) {\n return htmlSanitizer(maybeTrusted);\n }\n throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n }\n\n return { trustAs: trustAs,\n getTrusted: getTrusted,\n valueOf: valueOf };\n }];\n}\n\n\n/**\n * @ngdoc provider\n * @name $sceProvider\n * @description\n *\n * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service.\n * - enable/disable Strict Contextual Escaping (SCE) in a module\n * - override the default implementation with a custom delegate\n *\n * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}.\n */\n\n/* jshint maxlen: false*/\n\n/**\n * @ngdoc service\n * @name $sce\n * @kind function\n *\n * @description\n *\n * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS.\n *\n * # Strict Contextual Escaping\n *\n * Strict Contextual Escaping (SCE) is a mode in which AngularJS requires bindings in certain\n * contexts to result in a value that is marked as safe to use for that context. One example of\n * such a context is binding arbitrary html controlled by the user via `ng-bind-html`. We refer\n * to these contexts as privileged or SCE contexts.\n *\n * As of version 1.2, Angular ships with SCE enabled by default.\n *\n * Note: When enabled (the default), IE<11 in quirks mode is not supported. In this mode, IE<11 allow\n * one to execute arbitrary javascript by the use of the expression() syntax. Refer\n * <http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx> to learn more about them.\n * You can ensure your document is in standards mode and not quirks mode by adding `<!doctype html>`\n * to the top of your HTML document.\n *\n * SCE assists in writing code in way that (a) is secure by default and (b) makes auditing for\n * security vulnerabilities such as XSS, clickjacking, etc. a lot easier.\n *\n * Here's an example of a binding in a privileged context:\n *\n * ```\n * <input ng-model=\"userHtml\" aria-label=\"User input\">\n * <div ng-bind-html=\"userHtml\"></div>\n * ```\n *\n * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user. With SCE\n * disabled, this application allows the user to render arbitrary HTML into the DIV.\n * In a more realistic example, one may be rendering user comments, blog articles, etc. via\n * bindings. (HTML is just one example of a context where rendering user controlled input creates\n * security vulnerabilities.)\n *\n * For the case of HTML, you might use a library, either on the client side, or on the server side,\n * to sanitize unsafe HTML before binding to the value and rendering it in the document.\n *\n * How would you ensure that every place that used these types of bindings was bound to a value that\n * was sanitized by your library (or returned as safe for rendering by your server?) How can you\n * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some\n * properties/fields and forgot to update the binding to the sanitized value?\n *\n * To be secure by default, you want to ensure that any such bindings are disallowed unless you can\n * determine that something explicitly says it's safe to use a value for binding in that\n * context. You can then audit your code (a simple grep would do) to ensure that this is only done\n * for those values that you can easily tell are safe - because they were received from your server,\n * sanitized by your library, etc. You can organize your codebase to help with this - perhaps\n * allowing only the files in a specific directory to do this. Ensuring that the internal API\n * exposed by that code doesn't markup arbitrary values as safe then becomes a more manageable task.\n *\n * In the case of AngularJS' SCE service, one uses {@link ng.$sce#trustAs $sce.trustAs}\n * (and shorthand methods such as {@link ng.$sce#trustAsHtml $sce.trustAsHtml}, etc.) to\n * obtain values that will be accepted by SCE / privileged contexts.\n *\n *\n * ## How does it work?\n *\n * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#getTrusted\n * $sce.getTrusted(context, value)} rather than to the value directly. Directives use {@link\n * ng.$sce#parseAs $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs the\n * {@link ng.$sce#getTrusted $sce.getTrusted} behind the scenes on non-constant literals.\n *\n * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link\n * ng.$sce#parseAsHtml $sce.parseAsHtml(binding expression)}. Here's the actual code (slightly\n * simplified):\n *\n * ```\n * var ngBindHtmlDirective = ['$sce', function($sce) {\n * return function(scope, element, attr) {\n * scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) {\n * element.html(value || '');\n * });\n * };\n * }];\n * ```\n *\n * ## Impact on loading templates\n *\n * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as\n * `templateUrl`'s specified by {@link guide/directive directives}.\n *\n * By default, Angular only loads templates from the same domain and protocol as the application\n * document. This is done by calling {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on the template URL. To load templates from other domains and/or\n * protocols, you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist\n * them} or {@link ng.$sce#trustAsResourceUrl wrap it} into a trusted value.\n *\n * *Please note*:\n * The browser's\n * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n * policy apply in addition to this and may further restrict whether the template is successfully\n * loaded. This means that without the right CORS policy, loading templates from a different domain\n * won't work on all browsers. Also, loading templates from `file://` URL does not work on some\n * browsers.\n *\n * ## This feels like too much overhead\n *\n * It's important to remember that SCE only applies to interpolation expressions.\n *\n * If your expressions are constant literals, they're automatically trusted and you don't need to\n * call `$sce.trustAs` on them (remember to include the `ngSanitize` module) (e.g.\n * `<div ng-bind-html=\"'<b>implicitly trusted</b>'\"></div>`) just works.\n *\n * Additionally, `a[href]` and `img[src]` automatically sanitize their URLs and do not pass them\n * through {@link ng.$sce#getTrusted $sce.getTrusted}. SCE doesn't play a role here.\n *\n * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load\n * templates in `ng-include` from your application's domain without having to even know about SCE.\n * It blocks loading templates from other domains or loading templates over http from an https\n * served document. You can change these by setting your own custom {@link\n * ng.$sceDelegateProvider#resourceUrlWhitelist whitelists} and {@link\n * ng.$sceDelegateProvider#resourceUrlBlacklist blacklists} for matching such URLs.\n *\n * This significantly reduces the overhead. It is far easier to pay the small overhead and have an\n * application that's secure and can be audited to verify that with much more ease than bolting\n * security onto an application later.\n *\n * <a name=\"contexts\"></a>\n * ## What trusted context types are supported?\n *\n * | Context | Notes |\n * |---------------------|----------------|\n * | `$sce.HTML` | For HTML that's safe to source into the application. The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. If an unsafe value is encountered and the {@link ngSanitize $sanitize} module is present this will sanitize the value instead of throwing an error. |\n * | `$sce.CSS` | For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives. |\n * | `$sce.URL` | For URLs that are safe to follow as links. Currently unused (`<a href=` and `<img src=` sanitize their urls and don't constitute an SCE context. |\n * | `$sce.RESOURCE_URL` | For URLs that are not only safe to follow as links, but whose contents are also safe to include in your application. Examples include `ng-include`, `src` / `ngSrc` bindings for tags other than `IMG` (e.g. `IFRAME`, `OBJECT`, etc.) <br><br>Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. |\n * | `$sce.JS` | For JavaScript that is safe to execute in your application's context. Currently unused. Feel free to use it in your own directives. |\n *\n * ## Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist} <a name=\"resourceUrlPatternItem\"></a>\n *\n * Each element in these arrays must be one of the following:\n *\n * - **'self'**\n * - The special **string**, `'self'`, can be used to match against all URLs of the **same\n * domain** as the application document using the **same protocol**.\n * - **String** (except the special value `'self'`)\n * - The string is matched against the full *normalized / absolute URL* of the resource\n * being tested (substring matches are not good enough.)\n * - There are exactly **two wildcard sequences** - `*` and `**`. All other characters\n * match themselves.\n * - `*`: matches zero or more occurrences of any character other than one of the following 6\n * characters: '`:`', '`/`', '`.`', '`?`', '`&`' and '`;`'. It's a useful wildcard for use\n * in a whitelist.\n * - `**`: matches zero or more occurrences of *any* character. As such, it's not\n * appropriate for use in a scheme, domain, etc. as it would match too much. (e.g.\n * http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might\n * not have been the intention.) Its usage at the very end of the path is ok. (e.g.\n * http://foo.example.com/templates/**).\n * - **RegExp** (*see caveat below*)\n * - *Caveat*: While regular expressions are powerful and offer great flexibility, their syntax\n * (and all the inevitable escaping) makes them *harder to maintain*. It's easy to\n * accidentally introduce a bug when one updates a complex expression (imho, all regexes should\n * have good test coverage). For instance, the use of `.` in the regex is correct only in a\n * small number of cases. A `.` character in the regex used when matching the scheme or a\n * subdomain could be matched against a `:` or literal `.` that was likely not intended. It\n * is highly recommended to use the string patterns and only fall back to regular expressions\n * as a last resort.\n * - The regular expression must be an instance of RegExp (i.e. not a string.) It is\n * matched against the **entire** *normalized / absolute URL* of the resource being tested\n * (even when the RegExp did not have the `^` and `$` codes.) In addition, any flags\n * present on the RegExp (such as multiline, global, ignoreCase) are ignored.\n * - If you are generating your JavaScript from some other templating engine (not\n * recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)),\n * remember to escape your regular expression (and be aware that you might need more than\n * one level of escaping depending on your templating engine and the way you interpolated\n * the value.) Do make use of your platform's escaping mechanism as it might be good\n * enough before coding your own. E.g. Ruby has\n * [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)\n * and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).\n * Javascript lacks a similar built in function for escaping. Take a look at Google\n * Closure library's [goog.string.regExpEscape(s)](\n * http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962).\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example.\n *\n * ## Show me an example using SCE.\n *\n * <example module=\"mySceApp\" deps=\"angular-sanitize.js\">\n * <file name=\"index.html\">\n * <div ng-controller=\"AppController as myCtrl\">\n * <i ng-bind-html=\"myCtrl.explicitlyTrustedHtml\" id=\"explicitlyTrustedHtml\"></i><br><br>\n * <b>User comments</b><br>\n * By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when\n * $sanitize is available. If $sanitize isn't available, this results in an error instead of an\n * exploit.\n * <div class=\"well\">\n * <div ng-repeat=\"userComment in myCtrl.userComments\">\n * <b>{{userComment.name}}</b>:\n * <span ng-bind-html=\"userComment.htmlComment\" class=\"htmlComment\"></span>\n * <br>\n * </div>\n * </div>\n * </div>\n * </file>\n *\n * <file name=\"script.js\">\n * angular.module('mySceApp', ['ngSanitize'])\n * .controller('AppController', ['$http', '$templateCache', '$sce',\n * function($http, $templateCache, $sce) {\n * var self = this;\n * $http.get(\"test_data.json\", {cache: $templateCache}).success(function(userComments) {\n * self.userComments = userComments;\n * });\n * self.explicitlyTrustedHtml = $sce.trustAsHtml(\n * '<span onmouseover=\"this.textContent=&quot;Explicitly trusted HTML bypasses ' +\n * 'sanitization.&quot;\">Hover over this text.</span>');\n * }]);\n * </file>\n *\n * <file name=\"test_data.json\">\n * [\n * { \"name\": \"Alice\",\n * \"htmlComment\":\n * \"<span onmouseover='this.textContent=\\\"PWN3D!\\\"'>Is <i>anyone</i> reading this?</span>\"\n * },\n * { \"name\": \"Bob\",\n * \"htmlComment\": \"<i>Yes!</i> Am I the only other one?\"\n * }\n * ]\n * </file>\n *\n * <file name=\"protractor.js\" type=\"protractor\">\n * describe('SCE doc demo', function() {\n * it('should sanitize untrusted values', function() {\n * expect(element.all(by.css('.htmlComment')).first().getInnerHtml())\n * .toBe('<span>Is <i>anyone</i> reading this?</span>');\n * });\n *\n * it('should NOT sanitize explicitly trusted values', function() {\n * expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe(\n * '<span onmouseover=\"this.textContent=&quot;Explicitly trusted HTML bypasses ' +\n * 'sanitization.&quot;\">Hover over this text.</span>');\n * });\n * });\n * </file>\n * </example>\n *\n *\n *\n * ## Can I disable SCE completely?\n *\n * Yes, you can. However, this is strongly discouraged. SCE gives you a lot of security benefits\n * for little coding overhead. It will be much harder to take an SCE disabled application and\n * either secure it on your own or enable SCE at a later stage. It might make sense to disable SCE\n * for cases where you have a lot of existing code that was written before SCE was introduced and\n * you're migrating them a module at a time.\n *\n * That said, here's how you can completely disable SCE:\n *\n * ```\n * angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) {\n * // Completely disable SCE. For demonstration purposes only!\n * // Do not use in new projects.\n * $sceProvider.enabled(false);\n * });\n * ```\n *\n */\n/* jshint maxlen: 100 */\n\nfunction $SceProvider() {\n var enabled = true;\n\n /**\n * @ngdoc method\n * @name $sceProvider#enabled\n * @kind function\n *\n * @param {boolean=} value If provided, then enables/disables SCE.\n * @return {boolean} true if SCE is enabled, false otherwise.\n *\n * @description\n * Enables/disables SCE and returns the current value.\n */\n this.enabled = function(value) {\n if (arguments.length) {\n enabled = !!value;\n }\n return enabled;\n };\n\n\n /* Design notes on the default implementation for SCE.\n *\n * The API contract for the SCE delegate\n * -------------------------------------\n * The SCE delegate object must provide the following 3 methods:\n *\n * - trustAs(contextEnum, value)\n * This method is used to tell the SCE service that the provided value is OK to use in the\n * contexts specified by contextEnum. It must return an object that will be accepted by\n * getTrusted() for a compatible contextEnum and return this value.\n *\n * - valueOf(value)\n * For values that were not produced by trustAs(), return them as is. For values that were\n * produced by trustAs(), return the corresponding input value to trustAs. Basically, if\n * trustAs is wrapping the given values into some type, this operation unwraps it when given\n * such a value.\n *\n * - getTrusted(contextEnum, value)\n * This function should return the a value that is safe to use in the context specified by\n * contextEnum or throw and exception otherwise.\n *\n * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be\n * opaque or wrapped in some holder object. That happens to be an implementation detail. For\n * instance, an implementation could maintain a registry of all trusted objects by context. In\n * such a case, trustAs() would return the same object that was passed in. getTrusted() would\n * return the same object passed in if it was found in the registry under a compatible context or\n * throw an exception otherwise. An implementation might only wrap values some of the time based\n * on some criteria. getTrusted() might return a value and not throw an exception for special\n * constants or objects even if not wrapped. All such implementations fulfill this contract.\n *\n *\n * A note on the inheritance model for SCE contexts\n * ------------------------------------------------\n * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types. This\n * is purely an implementation details.\n *\n * The contract is simply this:\n *\n * getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value)\n * will also succeed.\n *\n * Inheritance happens to capture this in a natural way. In some future, we\n * may not use inheritance anymore. That is OK because no code outside of\n * sce.js and sceSpecs.js would need to be aware of this detail.\n */\n\n this.$get = ['$parse', '$sceDelegate', function(\n $parse, $sceDelegate) {\n // Prereq: Ensure that we're not running in IE<11 quirks mode. In that mode, IE < 11 allow\n // the \"expression(javascript expression)\" syntax which is insecure.\n if (enabled && msie < 8) {\n throw $sceMinErr('iequirks',\n 'Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks ' +\n 'mode. You can fix this by adding the text <!doctype html> to the top of your HTML ' +\n 'document. See http://docs.angularjs.org/api/ng.$sce for more information.');\n }\n\n var sce = shallowCopy(SCE_CONTEXTS);\n\n /**\n * @ngdoc method\n * @name $sce#isEnabled\n * @kind function\n *\n * @return {Boolean} true if SCE is enabled, false otherwise. If you want to set the value, you\n * have to do it at module config time on {@link ng.$sceProvider $sceProvider}.\n *\n * @description\n * Returns a boolean indicating if SCE is enabled.\n */\n sce.isEnabled = function() {\n return enabled;\n };\n sce.trustAs = $sceDelegate.trustAs;\n sce.getTrusted = $sceDelegate.getTrusted;\n sce.valueOf = $sceDelegate.valueOf;\n\n if (!enabled) {\n sce.trustAs = sce.getTrusted = function(type, value) { return value; };\n sce.valueOf = identity;\n }\n\n /**\n * @ngdoc method\n * @name $sce#parseAs\n *\n * @description\n * Converts Angular {@link guide/expression expression} into a function. This is like {@link\n * ng.$parse $parse} and is identical when the expression is a literal constant. Otherwise, it\n * wraps the expression in a call to {@link ng.$sce#getTrusted $sce.getTrusted(*type*,\n * *result*)}\n *\n * @param {string} type The kind of SCE context in which this result will be used.\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` `{object}` an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` `{object=}` local variables context object, useful for overriding values in\n * `context`.\n */\n sce.parseAs = function sceParseAs(type, expr) {\n var parsed = $parse(expr);\n if (parsed.literal && parsed.constant) {\n return parsed;\n } else {\n return $parse(expr, function(value) {\n return sce.getTrusted(type, value);\n });\n }\n };\n\n /**\n * @ngdoc method\n * @name $sce#trustAs\n *\n * @description\n * Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. As such,\n * returns an object that is trusted by angular for use in specified strict contextual\n * escaping contexts (such as ng-bind-html, ng-include, any src attribute\n * interpolation, any dom event binding attribute interpolation such as for onclick, etc.)\n * that uses the provided value. See * {@link ng.$sce $sce} for enabling strict contextual\n * escaping.\n *\n * @param {string} type The kind of context in which this value is safe for use. e.g. url,\n * resourceUrl, html, js and css.\n * @param {*} value The value that that should be considered trusted/safe.\n * @returns {*} A value that can be used to stand in for the provided `value` in places\n * where Angular expects a $sce.trustAs() return value.\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsHtml\n *\n * @description\n * Shorthand method. `$sce.trustAsHtml(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.HTML, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedHtml\n * $sce.getTrustedHtml(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the\n * return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsUrl\n *\n * @description\n * Shorthand method. `$sce.trustAsUrl(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.URL, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedUrl\n * $sce.getTrustedUrl(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the\n * return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsResourceUrl\n *\n * @description\n * Shorthand method. `$sce.trustAsResourceUrl(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the return\n * value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsJs\n *\n * @description\n * Shorthand method. `$sce.trustAsJs(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.JS, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedJs\n * $sce.getTrustedJs(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the\n * return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrusted\n *\n * @description\n * Delegates to {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted`}. As such,\n * takes the result of a {@link ng.$sce#trustAs `$sce.trustAs`}() call and returns the\n * originally supplied value if the queried context type is a supertype of the created type.\n * If this condition isn't satisfied, throws an exception.\n *\n * @param {string} type The kind of context in which this value is to be used.\n * @param {*} maybeTrusted The result of a prior {@link ng.$sce#trustAs `$sce.trustAs`}\n * call.\n * @returns {*} The value the was originally provided to\n * {@link ng.$sce#trustAs `$sce.trustAs`} if valid in this context.\n * Otherwise, throws an exception.\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedHtml\n *\n * @description\n * Shorthand method. `$sce.getTrustedHtml(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.HTML, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedCss\n *\n * @description\n * Shorthand method. `$sce.getTrustedCss(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.CSS, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedUrl\n *\n * @description\n * Shorthand method. `$sce.getTrustedUrl(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.URL, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.URL, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedResourceUrl\n *\n * @description\n * Shorthand method. `$sce.getTrustedResourceUrl(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`}\n *\n * @param {*} value The value to pass to `$sceDelegate.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedJs\n *\n * @description\n * Shorthand method. `$sce.getTrustedJs(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.JS, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.JS, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsHtml\n *\n * @description\n * Shorthand method. `$sce.parseAsHtml(expression string)` →\n * {@link ng.$sce#parseAs `$sce.parseAs($sce.HTML, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` `{object}` an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` `{object=}` local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsCss\n *\n * @description\n * Shorthand method. `$sce.parseAsCss(value)` →\n * {@link ng.$sce#parseAs `$sce.parseAs($sce.CSS, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` `{object}` an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` `{object=}` local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsUrl\n *\n * @description\n * Shorthand method. `$sce.parseAsUrl(value)` →\n * {@link ng.$sce#parseAs `$sce.parseAs($sce.URL, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` `{object}` an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` `{object=}` local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsResourceUrl\n *\n * @description\n * Shorthand method. `$sce.parseAsResourceUrl(value)` →\n * {@link ng.$sce#parseAs `$sce.parseAs($sce.RESOURCE_URL, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` `{object}` an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` `{object=}` local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsJs\n *\n * @description\n * Shorthand method. `$sce.parseAsJs(value)` →\n * {@link ng.$sce#parseAs `$sce.parseAs($sce.JS, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` `{object}` an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` `{object=}` local variables context object, useful for overriding values in\n * `context`.\n */\n\n // Shorthand delegations.\n var parse = sce.parseAs,\n getTrusted = sce.getTrusted,\n trustAs = sce.trustAs;\n\n forEach(SCE_CONTEXTS, function(enumValue, name) {\n var lName = lowercase(name);\n sce[camelCase(\"parse_as_\" + lName)] = function(expr) {\n return parse(enumValue, expr);\n };\n sce[camelCase(\"get_trusted_\" + lName)] = function(value) {\n return getTrusted(enumValue, value);\n };\n sce[camelCase(\"trust_as_\" + lName)] = function(value) {\n return trustAs(enumValue, value);\n };\n });\n\n return sce;\n }];\n}\n\n/**\n * !!! This is an undocumented \"private\" service !!!\n *\n * @name $sniffer\n * @requires $window\n * @requires $document\n *\n * @property {boolean} history Does the browser support html5 history api ?\n * @property {boolean} transitions Does the browser support CSS transition events ?\n * @property {boolean} animations Does the browser support CSS animation events ?\n *\n * @description\n * This is very simple implementation of testing browser's features.\n */\nfunction $SnifferProvider() {\n this.$get = ['$window', '$document', function($window, $document) {\n var eventSupport = {},\n android =\n toInt((/android (\\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),\n boxee = /Boxee/i.test(($window.navigator || {}).userAgent),\n document = $document[0] || {},\n vendorPrefix,\n vendorRegex = /^(Moz|webkit|ms)(?=[A-Z])/,\n bodyStyle = document.body && document.body.style,\n transitions = false,\n animations = false,\n match;\n\n if (bodyStyle) {\n for (var prop in bodyStyle) {\n if (match = vendorRegex.exec(prop)) {\n vendorPrefix = match[0];\n vendorPrefix = vendorPrefix.substr(0, 1).toUpperCase() + vendorPrefix.substr(1);\n break;\n }\n }\n\n if (!vendorPrefix) {\n vendorPrefix = ('WebkitOpacity' in bodyStyle) && 'webkit';\n }\n\n transitions = !!(('transition' in bodyStyle) || (vendorPrefix + 'Transition' in bodyStyle));\n animations = !!(('animation' in bodyStyle) || (vendorPrefix + 'Animation' in bodyStyle));\n\n if (android && (!transitions || !animations)) {\n transitions = isString(bodyStyle.webkitTransition);\n animations = isString(bodyStyle.webkitAnimation);\n }\n }\n\n\n return {\n // Android has history.pushState, but it does not update location correctly\n // so let's not use the history API at all.\n // http://code.google.com/p/android/issues/detail?id=17471\n // https://github.com/angular/angular.js/issues/904\n\n // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has\n // so let's not use the history API also\n // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined\n // jshint -W018\n history: !!($window.history && $window.history.pushState && !(android < 4) && !boxee),\n // jshint +W018\n hasEvent: function(event) {\n // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have\n // it. In particular the event is not fired when backspace or delete key are pressed or\n // when cut operation is performed.\n // IE10+ implements 'input' event but it erroneously fires under various situations,\n // e.g. when placeholder changes, or a form is focused.\n if (event === 'input' && msie <= 11) return false;\n\n if (isUndefined(eventSupport[event])) {\n var divElm = document.createElement('div');\n eventSupport[event] = 'on' + event in divElm;\n }\n\n return eventSupport[event];\n },\n csp: csp(),\n vendorPrefix: vendorPrefix,\n transitions: transitions,\n animations: animations,\n android: android\n };\n }];\n}\n\nvar $compileMinErr = minErr('$compile');\n\n/**\n * @ngdoc service\n * @name $templateRequest\n *\n * @description\n * The `$templateRequest` service runs security checks then downloads the provided template using\n * `$http` and, upon success, stores the contents inside of `$templateCache`. If the HTTP request\n * fails or the response data of the HTTP request is empty, a `$compile` error will be thrown (the\n * exception can be thwarted by setting the 2nd parameter of the function to true). Note that the\n * contents of `$templateCache` are trusted, so the call to `$sce.getTrustedUrl(tpl)` is omitted\n * when `tpl` is of type string and `$templateCache` has the matching entry.\n *\n * @param {string|TrustedResourceUrl} tpl The HTTP request template URL\n * @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty\n *\n * @return {Promise} a promise for the HTTP response data of the given URL.\n *\n * @property {number} totalPendingRequests total amount of pending template requests being downloaded.\n */\nfunction $TemplateRequestProvider() {\n this.$get = ['$templateCache', '$http', '$q', '$sce', function($templateCache, $http, $q, $sce) {\n function handleRequestFn(tpl, ignoreRequestError) {\n handleRequestFn.totalPendingRequests++;\n\n // We consider the template cache holds only trusted templates, so\n // there's no need to go through whitelisting again for keys that already\n // are included in there. This also makes Angular accept any script\n // directive, no matter its name. However, we still need to unwrap trusted\n // types.\n if (!isString(tpl) || isUndefined($templateCache.get(tpl))) {\n tpl = $sce.getTrustedResourceUrl(tpl);\n }\n\n var transformResponse = $http.defaults && $http.defaults.transformResponse;\n\n if (isArray(transformResponse)) {\n transformResponse = transformResponse.filter(function(transformer) {\n return transformer !== defaultHttpResponseTransform;\n });\n } else if (transformResponse === defaultHttpResponseTransform) {\n transformResponse = null;\n }\n\n var httpOptions = {\n cache: $templateCache,\n transformResponse: transformResponse\n };\n\n return $http.get(tpl, httpOptions)\n ['finally'](function() {\n handleRequestFn.totalPendingRequests--;\n })\n .then(function(response) {\n $templateCache.put(tpl, response.data);\n return response.data;\n }, handleError);\n\n function handleError(resp) {\n if (!ignoreRequestError) {\n throw $compileMinErr('tpload', 'Failed to load template: {0} (HTTP status: {1} {2})',\n tpl, resp.status, resp.statusText);\n }\n return $q.reject(resp);\n }\n }\n\n handleRequestFn.totalPendingRequests = 0;\n\n return handleRequestFn;\n }];\n}\n\nfunction $$TestabilityProvider() {\n this.$get = ['$rootScope', '$browser', '$location',\n function($rootScope, $browser, $location) {\n\n /**\n * @name $testability\n *\n * @description\n * The private $$testability service provides a collection of methods for use when debugging\n * or by automated test and debugging tools.\n */\n var testability = {};\n\n /**\n * @name $$testability#findBindings\n *\n * @description\n * Returns an array of elements that are bound (via ng-bind or {{}})\n * to expressions matching the input.\n *\n * @param {Element} element The element root to search from.\n * @param {string} expression The binding expression to match.\n * @param {boolean} opt_exactMatch If true, only returns exact matches\n * for the expression. Filters and whitespace are ignored.\n */\n testability.findBindings = function(element, expression, opt_exactMatch) {\n var bindings = element.getElementsByClassName('ng-binding');\n var matches = [];\n forEach(bindings, function(binding) {\n var dataBinding = angular.element(binding).data('$binding');\n if (dataBinding) {\n forEach(dataBinding, function(bindingName) {\n if (opt_exactMatch) {\n var matcher = new RegExp('(^|\\\\s)' + escapeForRegexp(expression) + '(\\\\s|\\\\||$)');\n if (matcher.test(bindingName)) {\n matches.push(binding);\n }\n } else {\n if (bindingName.indexOf(expression) != -1) {\n matches.push(binding);\n }\n }\n });\n }\n });\n return matches;\n };\n\n /**\n * @name $$testability#findModels\n *\n * @description\n * Returns an array of elements that are two-way found via ng-model to\n * expressions matching the input.\n *\n * @param {Element} element The element root to search from.\n * @param {string} expression The model expression to match.\n * @param {boolean} opt_exactMatch If true, only returns exact matches\n * for the expression.\n */\n testability.findModels = function(element, expression, opt_exactMatch) {\n var prefixes = ['ng-', 'data-ng-', 'ng\\\\:'];\n for (var p = 0; p < prefixes.length; ++p) {\n var attributeEquals = opt_exactMatch ? '=' : '*=';\n var selector = '[' + prefixes[p] + 'model' + attributeEquals + '\"' + expression + '\"]';\n var elements = element.querySelectorAll(selector);\n if (elements.length) {\n return elements;\n }\n }\n };\n\n /**\n * @name $$testability#getLocation\n *\n * @description\n * Shortcut for getting the location in a browser agnostic way. Returns\n * the path, search, and hash. (e.g. /path?a=b#hash)\n */\n testability.getLocation = function() {\n return $location.url();\n };\n\n /**\n * @name $$testability#setLocation\n *\n * @description\n * Shortcut for navigating to a location without doing a full page reload.\n *\n * @param {string} url The location url (path, search and hash,\n * e.g. /path?a=b#hash) to go to.\n */\n testability.setLocation = function(url) {\n if (url !== $location.url()) {\n $location.url(url);\n $rootScope.$digest();\n }\n };\n\n /**\n * @name $$testability#whenStable\n *\n * @description\n * Calls the callback when $timeout and $http requests are completed.\n *\n * @param {function} callback\n */\n testability.whenStable = function(callback) {\n $browser.notifyWhenNoOutstandingRequests(callback);\n };\n\n return testability;\n }];\n}\n\nfunction $TimeoutProvider() {\n this.$get = ['$rootScope', '$browser', '$q', '$$q', '$exceptionHandler',\n function($rootScope, $browser, $q, $$q, $exceptionHandler) {\n\n var deferreds = {};\n\n\n /**\n * @ngdoc service\n * @name $timeout\n *\n * @description\n * Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch\n * block and delegates any exceptions to\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * The return value of calling `$timeout` is a promise, which will be resolved when\n * the delay has passed and the timeout function, if provided, is executed.\n *\n * To cancel a timeout request, call `$timeout.cancel(promise)`.\n *\n * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to\n * synchronously flush the queue of deferred functions.\n *\n * If you only want a promise that will be resolved after some specified delay\n * then you can call `$timeout` without the `fn` function.\n *\n * @param {function()=} fn A function, whose execution should be delayed.\n * @param {number=} [delay=0] Delay in milliseconds.\n * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n * @param {...*=} Pass additional parameters to the executed function.\n * @returns {Promise} Promise that will be resolved when the timeout is reached. The promise\n * will be resolved with the return value of the `fn` function.\n *\n */\n function timeout(fn, delay, invokeApply) {\n if (!isFunction(fn)) {\n invokeApply = delay;\n delay = fn;\n fn = noop;\n }\n\n var args = sliceArgs(arguments, 3),\n skipApply = (isDefined(invokeApply) && !invokeApply),\n deferred = (skipApply ? $$q : $q).defer(),\n promise = deferred.promise,\n timeoutId;\n\n timeoutId = $browser.defer(function() {\n try {\n deferred.resolve(fn.apply(null, args));\n } catch (e) {\n deferred.reject(e);\n $exceptionHandler(e);\n }\n finally {\n delete deferreds[promise.$$timeoutId];\n }\n\n if (!skipApply) $rootScope.$apply();\n }, delay);\n\n promise.$$timeoutId = timeoutId;\n deferreds[timeoutId] = deferred;\n\n return promise;\n }\n\n\n /**\n * @ngdoc method\n * @name $timeout#cancel\n *\n * @description\n * Cancels a task associated with the `promise`. As a result of this, the promise will be\n * resolved with a rejection.\n *\n * @param {Promise=} promise Promise returned by the `$timeout` function.\n * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n * canceled.\n */\n timeout.cancel = function(promise) {\n if (promise && promise.$$timeoutId in deferreds) {\n deferreds[promise.$$timeoutId].reject('canceled');\n delete deferreds[promise.$$timeoutId];\n return $browser.defer.cancel(promise.$$timeoutId);\n }\n return false;\n };\n\n return timeout;\n }];\n}\n\n// NOTE: The usage of window and document instead of $window and $document here is\n// deliberate. This service depends on the specific behavior of anchor nodes created by the\n// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and\n// cause us to break tests. In addition, when the browser resolves a URL for XHR, it\n// doesn't know about mocked locations and resolves URLs to the real document - which is\n// exactly the behavior needed here. There is little value is mocking these out for this\n// service.\nvar urlParsingNode = document.createElement(\"a\");\nvar originUrl = urlResolve(window.location.href);\n\n\n/**\n *\n * Implementation Notes for non-IE browsers\n * ----------------------------------------\n * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM,\n * results both in the normalizing and parsing of the URL. Normalizing means that a relative\n * URL will be resolved into an absolute URL in the context of the application document.\n * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related\n * properties are all populated to reflect the normalized URL. This approach has wide\n * compatibility - Safari 1+, Mozilla 1+, Opera 7+,e etc. See\n * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n *\n * Implementation Notes for IE\n * ---------------------------\n * IE <= 10 normalizes the URL when assigned to the anchor node similar to the other\n * browsers. However, the parsed components will not be set if the URL assigned did not specify\n * them. (e.g. if you assign a.href = \"foo\", then a.protocol, a.host, etc. will be empty.) We\n * work around that by performing the parsing in a 2nd step by taking a previously normalized\n * URL (e.g. by assigning to a.href) and assigning it a.href again. This correctly populates the\n * properties such as protocol, hostname, port, etc.\n *\n * References:\n * http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement\n * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n * http://url.spec.whatwg.org/#urlutils\n * https://github.com/angular/angular.js/pull/2902\n * http://james.padolsey.com/javascript/parsing-urls-with-the-dom/\n *\n * @kind function\n * @param {string} url The URL to be parsed.\n * @description Normalizes and parses a URL.\n * @returns {object} Returns the normalized URL as a dictionary.\n *\n * | member name | Description |\n * |---------------|----------------|\n * | href | A normalized version of the provided URL if it was not an absolute URL |\n * | protocol | The protocol including the trailing colon |\n * | host | The host and port (if the port is non-default) of the normalizedUrl |\n * | search | The search params, minus the question mark |\n * | hash | The hash string, minus the hash symbol\n * | hostname | The hostname\n * | port | The port, without \":\"\n * | pathname | The pathname, beginning with \"/\"\n *\n */\nfunction urlResolve(url) {\n var href = url;\n\n if (msie) {\n // Normalize before parse. Refer Implementation Notes on why this is\n // done in two steps on IE.\n urlParsingNode.setAttribute(\"href\", href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/')\n ? urlParsingNode.pathname\n : '/' + urlParsingNode.pathname\n };\n}\n\n/**\n * Parse a request URL and determine whether this is a same-origin request as the application document.\n *\n * @param {string|object} requestUrl The url of the request as a string that will be resolved\n * or a parsed URL object.\n * @returns {boolean} Whether the request is for the same origin as the application document.\n */\nfunction urlIsSameOrigin(requestUrl) {\n var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;\n return (parsed.protocol === originUrl.protocol &&\n parsed.host === originUrl.host);\n}\n\n/**\n * @ngdoc service\n * @name $window\n *\n * @description\n * A reference to the browser's `window` object. While `window`\n * is globally available in JavaScript, it causes testability problems, because\n * it is a global variable. In angular we always refer to it through the\n * `$window` service, so it may be overridden, removed or mocked for testing.\n *\n * Expressions, like the one defined for the `ngClick` directive in the example\n * below, are evaluated with respect to the current scope. Therefore, there is\n * no risk of inadvertently coding in a dependency on a global value in such an\n * expression.\n *\n * @example\n <example module=\"windowExample\">\n <file name=\"index.html\">\n <script>\n angular.module('windowExample', [])\n .controller('ExampleController', ['$scope', '$window', function($scope, $window) {\n $scope.greeting = 'Hello, World!';\n $scope.doGreeting = function(greeting) {\n $window.alert(greeting);\n };\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <input type=\"text\" ng-model=\"greeting\" aria-label=\"greeting\" />\n <button ng-click=\"doGreeting(greeting)\">ALERT</button>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should display the greeting in the input box', function() {\n element(by.model('greeting')).sendKeys('Hello, E2E Tests');\n // If we click the button it will block the test runner\n // element(':button').click();\n });\n </file>\n </example>\n */\nfunction $WindowProvider() {\n this.$get = valueFn(window);\n}\n\n/**\n * @name $$cookieReader\n * @requires $document\n *\n * @description\n * This is a private service for reading cookies used by $http and ngCookies\n *\n * @return {Object} a key/value map of the current cookies\n */\nfunction $$CookieReader($document) {\n var rawDocument = $document[0] || {};\n var lastCookies = {};\n var lastCookieString = '';\n\n function safeDecodeURIComponent(str) {\n try {\n return decodeURIComponent(str);\n } catch (e) {\n return str;\n }\n }\n\n return function() {\n var cookieArray, cookie, i, index, name;\n var currentCookieString = rawDocument.cookie || '';\n\n if (currentCookieString !== lastCookieString) {\n lastCookieString = currentCookieString;\n cookieArray = lastCookieString.split('; ');\n lastCookies = {};\n\n for (i = 0; i < cookieArray.length; i++) {\n cookie = cookieArray[i];\n index = cookie.indexOf('=');\n if (index > 0) { //ignore nameless cookies\n name = safeDecodeURIComponent(cookie.substring(0, index));\n // the first value that is seen for a cookie is the most\n // specific one. values for the same cookie name that\n // follow are for less specific paths.\n if (isUndefined(lastCookies[name])) {\n lastCookies[name] = safeDecodeURIComponent(cookie.substring(index + 1));\n }\n }\n }\n }\n return lastCookies;\n };\n}\n\n$$CookieReader.$inject = ['$document'];\n\nfunction $$CookieReaderProvider() {\n this.$get = $$CookieReader;\n}\n\n/* global currencyFilter: true,\n dateFilter: true,\n filterFilter: true,\n jsonFilter: true,\n limitToFilter: true,\n lowercaseFilter: true,\n numberFilter: true,\n orderByFilter: true,\n uppercaseFilter: true,\n */\n\n/**\n * @ngdoc provider\n * @name $filterProvider\n * @description\n *\n * Filters are just functions which transform input to an output. However filters need to be\n * Dependency Injected. To achieve this a filter definition consists of a factory function which is\n * annotated with dependencies and is responsible for creating a filter function.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.\n * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace\n * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores\n * (`myapp_subsection_filterx`).\n * </div>\n *\n * ```js\n * // Filter registration\n * function MyModule($provide, $filterProvider) {\n * // create a service to demonstrate injection (not always needed)\n * $provide.value('greet', function(name){\n * return 'Hello ' + name + '!';\n * });\n *\n * // register a filter factory which uses the\n * // greet service to demonstrate DI.\n * $filterProvider.register('greet', function(greet){\n * // return the filter function which uses the greet service\n * // to generate salutation\n * return function(text) {\n * // filters need to be forgiving so check input validity\n * return text && greet(text) || text;\n * };\n * });\n * }\n * ```\n *\n * The filter function is registered with the `$injector` under the filter name suffix with\n * `Filter`.\n *\n * ```js\n * it('should be the same instance', inject(\n * function($filterProvider) {\n * $filterProvider.register('reverse', function(){\n * return ...;\n * });\n * },\n * function($filter, reverseFilter) {\n * expect($filter('reverse')).toBe(reverseFilter);\n * });\n * ```\n *\n *\n * For more information about how angular filters work, and how to create your own filters, see\n * {@link guide/filter Filters} in the Angular Developer Guide.\n */\n\n/**\n * @ngdoc service\n * @name $filter\n * @kind function\n * @description\n * Filters are used for formatting data displayed to the user.\n *\n * The general syntax in templates is as follows:\n *\n * {{ expression [| filter_name[:parameter_value] ... ] }}\n *\n * @param {String} name Name of the filter function to retrieve\n * @return {Function} the filter function\n * @example\n <example name=\"$filter\" module=\"filterExample\">\n <file name=\"index.html\">\n <div ng-controller=\"MainCtrl\">\n <h3>{{ originalText }}</h3>\n <h3>{{ filteredText }}</h3>\n </div>\n </file>\n\n <file name=\"script.js\">\n angular.module('filterExample', [])\n .controller('MainCtrl', function($scope, $filter) {\n $scope.originalText = 'hello';\n $scope.filteredText = $filter('uppercase')($scope.originalText);\n });\n </file>\n </example>\n */\n$FilterProvider.$inject = ['$provide'];\nfunction $FilterProvider($provide) {\n var suffix = 'Filter';\n\n /**\n * @ngdoc method\n * @name $filterProvider#register\n * @param {string|Object} name Name of the filter function, or an object map of filters where\n * the keys are the filter names and the values are the filter factories.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.\n * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace\n * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores\n * (`myapp_subsection_filterx`).\n * </div>\n * @param {Function} factory If the first argument was a string, a factory function for the filter to be registered.\n * @returns {Object} Registered filter instance, or if a map of filters was provided then a map\n * of the registered filter instances.\n */\n function register(name, factory) {\n if (isObject(name)) {\n var filters = {};\n forEach(name, function(filter, key) {\n filters[key] = register(key, filter);\n });\n return filters;\n } else {\n return $provide.factory(name + suffix, factory);\n }\n }\n this.register = register;\n\n this.$get = ['$injector', function($injector) {\n return function(name) {\n return $injector.get(name + suffix);\n };\n }];\n\n ////////////////////////////////////////\n\n /* global\n currencyFilter: false,\n dateFilter: false,\n filterFilter: false,\n jsonFilter: false,\n limitToFilter: false,\n lowercaseFilter: false,\n numberFilter: false,\n orderByFilter: false,\n uppercaseFilter: false,\n */\n\n register('currency', currencyFilter);\n register('date', dateFilter);\n register('filter', filterFilter);\n register('json', jsonFilter);\n register('limitTo', limitToFilter);\n register('lowercase', lowercaseFilter);\n register('number', numberFilter);\n register('orderBy', orderByFilter);\n register('uppercase', uppercaseFilter);\n}\n\n/**\n * @ngdoc filter\n * @name filter\n * @kind function\n *\n * @description\n * Selects a subset of items from `array` and returns it as a new array.\n *\n * @param {Array} array The source array.\n * @param {string|Object|function()} expression The predicate to be used for selecting items from\n * `array`.\n *\n * Can be one of:\n *\n * - `string`: The string is used for matching against the contents of the `array`. All strings or\n * objects with string properties in `array` that match this string will be returned. This also\n * applies to nested object properties.\n * The predicate can be negated by prefixing the string with `!`.\n *\n * - `Object`: A pattern object can be used to filter specific properties on objects contained\n * by `array`. For example `{name:\"M\", phone:\"1\"}` predicate will return an array of items\n * which have property `name` containing \"M\" and property `phone` containing \"1\". A special\n * property name `$` can be used (as in `{$:\"text\"}`) to accept a match against any\n * property of the object or its nested object properties. That's equivalent to the simple\n * substring match with a `string` as described above. The predicate can be negated by prefixing\n * the string with `!`.\n * For example `{name: \"!M\"}` predicate will return an array of items which have property `name`\n * not containing \"M\".\n *\n * Note that a named property will match properties on the same level only, while the special\n * `$` property will match properties on the same level or deeper. E.g. an array item like\n * `{name: {first: 'John', last: 'Doe'}}` will **not** be matched by `{name: 'John'}`, but\n * **will** be matched by `{$: 'John'}`.\n *\n * - `function(value, index, array)`: A predicate function can be used to write arbitrary filters.\n * The function is called for each element of the array, with the element, its index, and\n * the entire array itself as arguments.\n *\n * The final result is an array of those elements that the predicate returned true for.\n *\n * @param {function(actual, expected)|true|undefined} comparator Comparator which is used in\n * determining if the expected value (from the filter expression) and actual value (from\n * the object in the array) should be considered a match.\n *\n * Can be one of:\n *\n * - `function(actual, expected)`:\n * The function will be given the object value and the predicate value to compare and\n * should return true if both values should be considered equal.\n *\n * - `true`: A shorthand for `function(actual, expected) { return angular.equals(actual, expected)}`.\n * This is essentially strict comparison of expected and actual.\n *\n * - `false|undefined`: A short hand for a function which will look for a substring match in case\n * insensitive way.\n *\n * Primitive values are converted to strings. Objects are not compared against primitives,\n * unless they have a custom `toString` method (e.g. `Date` objects).\n *\n * @example\n <example>\n <file name=\"index.html\">\n <div ng-init=\"friends = [{name:'John', phone:'555-1276'},\n {name:'Mary', phone:'800-BIG-MARY'},\n {name:'Mike', phone:'555-4321'},\n {name:'Adam', phone:'555-5678'},\n {name:'Julie', phone:'555-8765'},\n {name:'Juliette', phone:'555-5678'}]\"></div>\n\n <label>Search: <input ng-model=\"searchText\"></label>\n <table id=\"searchTextResults\">\n <tr><th>Name</th><th>Phone</th></tr>\n <tr ng-repeat=\"friend in friends | filter:searchText\">\n <td>{{friend.name}}</td>\n <td>{{friend.phone}}</td>\n </tr>\n </table>\n <hr>\n <label>Any: <input ng-model=\"search.$\"></label> <br>\n <label>Name only <input ng-model=\"search.name\"></label><br>\n <label>Phone only <input ng-model=\"search.phone\"></label><br>\n <label>Equality <input type=\"checkbox\" ng-model=\"strict\"></label><br>\n <table id=\"searchObjResults\">\n <tr><th>Name</th><th>Phone</th></tr>\n <tr ng-repeat=\"friendObj in friends | filter:search:strict\">\n <td>{{friendObj.name}}</td>\n <td>{{friendObj.phone}}</td>\n </tr>\n </table>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var expectFriendNames = function(expectedNames, key) {\n element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) {\n arr.forEach(function(wd, i) {\n expect(wd.getText()).toMatch(expectedNames[i]);\n });\n });\n };\n\n it('should search across all fields when filtering with a string', function() {\n var searchText = element(by.model('searchText'));\n searchText.clear();\n searchText.sendKeys('m');\n expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend');\n\n searchText.clear();\n searchText.sendKeys('76');\n expectFriendNames(['John', 'Julie'], 'friend');\n });\n\n it('should search in specific fields when filtering with a predicate object', function() {\n var searchAny = element(by.model('search.$'));\n searchAny.clear();\n searchAny.sendKeys('i');\n expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj');\n });\n it('should use a equal comparison when comparator is true', function() {\n var searchName = element(by.model('search.name'));\n var strict = element(by.model('strict'));\n searchName.clear();\n searchName.sendKeys('Julie');\n strict.click();\n expectFriendNames(['Julie'], 'friendObj');\n });\n </file>\n </example>\n */\nfunction filterFilter() {\n return function(array, expression, comparator) {\n if (!isArrayLike(array)) {\n if (array == null) {\n return array;\n } else {\n throw minErr('filter')('notarray', 'Expected array but received: {0}', array);\n }\n }\n\n var expressionType = getTypeForFilter(expression);\n var predicateFn;\n var matchAgainstAnyProp;\n\n switch (expressionType) {\n case 'function':\n predicateFn = expression;\n break;\n case 'boolean':\n case 'null':\n case 'number':\n case 'string':\n matchAgainstAnyProp = true;\n //jshint -W086\n case 'object':\n //jshint +W086\n predicateFn = createPredicateFn(expression, comparator, matchAgainstAnyProp);\n break;\n default:\n return array;\n }\n\n return Array.prototype.filter.call(array, predicateFn);\n };\n}\n\n// Helper functions for `filterFilter`\nfunction createPredicateFn(expression, comparator, matchAgainstAnyProp) {\n var shouldMatchPrimitives = isObject(expression) && ('$' in expression);\n var predicateFn;\n\n if (comparator === true) {\n comparator = equals;\n } else if (!isFunction(comparator)) {\n comparator = function(actual, expected) {\n if (isUndefined(actual)) {\n // No substring matching against `undefined`\n return false;\n }\n if ((actual === null) || (expected === null)) {\n // No substring matching against `null`; only match against `null`\n return actual === expected;\n }\n if (isObject(expected) || (isObject(actual) && !hasCustomToString(actual))) {\n // Should not compare primitives against objects, unless they have custom `toString` method\n return false;\n }\n\n actual = lowercase('' + actual);\n expected = lowercase('' + expected);\n return actual.indexOf(expected) !== -1;\n };\n }\n\n predicateFn = function(item) {\n if (shouldMatchPrimitives && !isObject(item)) {\n return deepCompare(item, expression.$, comparator, false);\n }\n return deepCompare(item, expression, comparator, matchAgainstAnyProp);\n };\n\n return predicateFn;\n}\n\nfunction deepCompare(actual, expected, comparator, matchAgainstAnyProp, dontMatchWholeObject) {\n var actualType = getTypeForFilter(actual);\n var expectedType = getTypeForFilter(expected);\n\n if ((expectedType === 'string') && (expected.charAt(0) === '!')) {\n return !deepCompare(actual, expected.substring(1), comparator, matchAgainstAnyProp);\n } else if (isArray(actual)) {\n // In case `actual` is an array, consider it a match\n // if ANY of it's items matches `expected`\n return actual.some(function(item) {\n return deepCompare(item, expected, comparator, matchAgainstAnyProp);\n });\n }\n\n switch (actualType) {\n case 'object':\n var key;\n if (matchAgainstAnyProp) {\n for (key in actual) {\n if ((key.charAt(0) !== '$') && deepCompare(actual[key], expected, comparator, true)) {\n return true;\n }\n }\n return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, false);\n } else if (expectedType === 'object') {\n for (key in expected) {\n var expectedVal = expected[key];\n if (isFunction(expectedVal) || isUndefined(expectedVal)) {\n continue;\n }\n\n var matchAnyProperty = key === '$';\n var actualVal = matchAnyProperty ? actual : actual[key];\n if (!deepCompare(actualVal, expectedVal, comparator, matchAnyProperty, matchAnyProperty)) {\n return false;\n }\n }\n return true;\n } else {\n return comparator(actual, expected);\n }\n break;\n case 'function':\n return false;\n default:\n return comparator(actual, expected);\n }\n}\n\n// Used for easily differentiating between `null` and actual `object`\nfunction getTypeForFilter(val) {\n return (val === null) ? 'null' : typeof val;\n}\n\nvar MAX_DIGITS = 22;\nvar DECIMAL_SEP = '.';\nvar ZERO_CHAR = '0';\n\n/**\n * @ngdoc filter\n * @name currency\n * @kind function\n *\n * @description\n * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default\n * symbol for current locale is used.\n *\n * @param {number} amount Input to filter.\n * @param {string=} symbol Currency symbol or identifier to be displayed.\n * @param {number=} fractionSize Number of decimal places to round the amount to, defaults to default max fraction size for current locale\n * @returns {string} Formatted number.\n *\n *\n * @example\n <example module=\"currencyExample\">\n <file name=\"index.html\">\n <script>\n angular.module('currencyExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.amount = 1234.56;\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <input type=\"number\" ng-model=\"amount\" aria-label=\"amount\"> <br>\n default currency symbol ($): <span id=\"currency-default\">{{amount | currency}}</span><br>\n custom currency identifier (USD$): <span id=\"currency-custom\">{{amount | currency:\"USD$\"}}</span>\n no fractions (0): <span id=\"currency-no-fractions\">{{amount | currency:\"USD$\":0}}</span>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should init with 1234.56', function() {\n expect(element(by.id('currency-default')).getText()).toBe('$1,234.56');\n expect(element(by.id('currency-custom')).getText()).toBe('USD$1,234.56');\n expect(element(by.id('currency-no-fractions')).getText()).toBe('USD$1,235');\n });\n it('should update', function() {\n if (browser.params.browser == 'safari') {\n // Safari does not understand the minus key. See\n // https://github.com/angular/protractor/issues/481\n return;\n }\n element(by.model('amount')).clear();\n element(by.model('amount')).sendKeys('-1234');\n expect(element(by.id('currency-default')).getText()).toBe('-$1,234.00');\n expect(element(by.id('currency-custom')).getText()).toBe('-USD$1,234.00');\n expect(element(by.id('currency-no-fractions')).getText()).toBe('-USD$1,234');\n });\n </file>\n </example>\n */\ncurrencyFilter.$inject = ['$locale'];\nfunction currencyFilter($locale) {\n var formats = $locale.NUMBER_FORMATS;\n return function(amount, currencySymbol, fractionSize) {\n if (isUndefined(currencySymbol)) {\n currencySymbol = formats.CURRENCY_SYM;\n }\n\n if (isUndefined(fractionSize)) {\n fractionSize = formats.PATTERNS[1].maxFrac;\n }\n\n // if null or undefined pass it through\n return (amount == null)\n ? amount\n : formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, fractionSize).\n replace(/\\u00A4/g, currencySymbol);\n };\n}\n\n/**\n * @ngdoc filter\n * @name number\n * @kind function\n *\n * @description\n * Formats a number as text.\n *\n * If the input is null or undefined, it will just be returned.\n * If the input is infinite (Infinity or -Infinity), the Infinity symbol '∞' or '-∞' is returned, respectively.\n * If the input is not a number an empty string is returned.\n *\n *\n * @param {number|string} number Number to format.\n * @param {(number|string)=} fractionSize Number of decimal places to round the number to.\n * If this is not provided then the fraction size is computed from the current locale's number\n * formatting pattern. In the case of the default locale, it will be 3.\n * @returns {string} Number rounded to `fractionSize` appropriately formatted based on the current\n * locale (e.g., in the en_US locale it will have \".\" as the decimal separator and\n * include \",\" group separators after each third digit).\n *\n * @example\n <example module=\"numberFilterExample\">\n <file name=\"index.html\">\n <script>\n angular.module('numberFilterExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.val = 1234.56789;\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <label>Enter number: <input ng-model='val'></label><br>\n Default formatting: <span id='number-default'>{{val | number}}</span><br>\n No fractions: <span>{{val | number:0}}</span><br>\n Negative number: <span>{{-val | number:4}}</span>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should format numbers', function() {\n expect(element(by.id('number-default')).getText()).toBe('1,234.568');\n expect(element(by.binding('val | number:0')).getText()).toBe('1,235');\n expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679');\n });\n\n it('should update', function() {\n element(by.model('val')).clear();\n element(by.model('val')).sendKeys('3374.333');\n expect(element(by.id('number-default')).getText()).toBe('3,374.333');\n expect(element(by.binding('val | number:0')).getText()).toBe('3,374');\n expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');\n });\n </file>\n </example>\n */\nnumberFilter.$inject = ['$locale'];\nfunction numberFilter($locale) {\n var formats = $locale.NUMBER_FORMATS;\n return function(number, fractionSize) {\n\n // if null or undefined pass it through\n return (number == null)\n ? number\n : formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP,\n fractionSize);\n };\n}\n\n/**\n * Parse a number (as a string) into three components that can be used\n * for formatting the number.\n *\n * (Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/)\n *\n * @param {string} numStr The number to parse\n * @return {object} An object describing this number, containing the following keys:\n * - d : an array of digits containing leading zeros as necessary\n * - i : the number of the digits in `d` that are to the left of the decimal point\n * - e : the exponent for numbers that would need more than `MAX_DIGITS` digits in `d`\n *\n */\nfunction parse(numStr) {\n var exponent = 0, digits, numberOfIntegerDigits;\n var i, j, zeros;\n\n // Decimal point?\n if ((numberOfIntegerDigits = numStr.indexOf(DECIMAL_SEP)) > -1) {\n numStr = numStr.replace(DECIMAL_SEP, '');\n }\n\n // Exponential form?\n if ((i = numStr.search(/e/i)) > 0) {\n // Work out the exponent.\n if (numberOfIntegerDigits < 0) numberOfIntegerDigits = i;\n numberOfIntegerDigits += +numStr.slice(i + 1);\n numStr = numStr.substring(0, i);\n } else if (numberOfIntegerDigits < 0) {\n // There was no decimal point or exponent so it is an integer.\n numberOfIntegerDigits = numStr.length;\n }\n\n // Count the number of leading zeros.\n for (i = 0; numStr.charAt(i) == ZERO_CHAR; i++) {/* jshint noempty: false */}\n\n if (i == (zeros = numStr.length)) {\n // The digits are all zero.\n digits = [0];\n numberOfIntegerDigits = 1;\n } else {\n // Count the number of trailing zeros\n zeros--;\n while (numStr.charAt(zeros) == ZERO_CHAR) zeros--;\n\n // Trailing zeros are insignificant so ignore them\n numberOfIntegerDigits -= i;\n digits = [];\n // Convert string to array of digits without leading/trailing zeros.\n for (j = 0; i <= zeros; i++, j++) {\n digits[j] = +numStr.charAt(i);\n }\n }\n\n // If the number overflows the maximum allowed digits then use an exponent.\n if (numberOfIntegerDigits > MAX_DIGITS) {\n digits = digits.splice(0, MAX_DIGITS - 1);\n exponent = numberOfIntegerDigits - 1;\n numberOfIntegerDigits = 1;\n }\n\n return { d: digits, e: exponent, i: numberOfIntegerDigits };\n}\n\n/**\n * Round the parsed number to the specified number of decimal places\n * This function changed the parsedNumber in-place\n */\nfunction roundNumber(parsedNumber, fractionSize, minFrac, maxFrac) {\n var digits = parsedNumber.d;\n var fractionLen = digits.length - parsedNumber.i;\n\n // determine fractionSize if it is not specified; `+fractionSize` converts it to a number\n fractionSize = (isUndefined(fractionSize)) ? Math.min(Math.max(minFrac, fractionLen), maxFrac) : +fractionSize;\n\n // The index of the digit to where rounding is to occur\n var roundAt = fractionSize + parsedNumber.i;\n var digit = digits[roundAt];\n\n if (roundAt > 0) {\n digits.splice(roundAt);\n } else {\n // We rounded to zero so reset the parsedNumber\n parsedNumber.i = 1;\n digits.length = roundAt = fractionSize + 1;\n for (var i=0; i < roundAt; i++) digits[i] = 0;\n }\n\n if (digit >= 5) digits[roundAt - 1]++;\n\n // Pad out with zeros to get the required fraction length\n for (; fractionLen < fractionSize; fractionLen++) digits.push(0);\n\n\n // Do any carrying, e.g. a digit was rounded up to 10\n var carry = digits.reduceRight(function(carry, d, i, digits) {\n d = d + carry;\n digits[i] = d % 10;\n return Math.floor(d / 10);\n }, 0);\n if (carry) {\n digits.unshift(carry);\n parsedNumber.i++;\n }\n}\n\n/**\n * Format a number into a string\n * @param {number} number The number to format\n * @param {{\n * minFrac, // the minimum number of digits required in the fraction part of the number\n * maxFrac, // the maximum number of digits required in the fraction part of the number\n * gSize, // number of digits in each group of separated digits\n * lgSize, // number of digits in the last group of digits before the decimal separator\n * negPre, // the string to go in front of a negative number (e.g. `-` or `(`))\n * posPre, // the string to go in front of a positive number\n * negSuf, // the string to go after a negative number (e.g. `)`)\n * posSuf // the string to go after a positive number\n * }} pattern\n * @param {string} groupSep The string to separate groups of number (e.g. `,`)\n * @param {string} decimalSep The string to act as the decimal separator (e.g. `.`)\n * @param {[type]} fractionSize The size of the fractional part of the number\n * @return {string} The number formatted as a string\n */\nfunction formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {\n\n if (!(isString(number) || isNumber(number)) || isNaN(number)) return '';\n\n var isInfinity = !isFinite(number);\n var isZero = false;\n var numStr = Math.abs(number) + '',\n formattedText = '',\n parsedNumber;\n\n if (isInfinity) {\n formattedText = '\\u221e';\n } else {\n parsedNumber = parse(numStr);\n\n roundNumber(parsedNumber, fractionSize, pattern.minFrac, pattern.maxFrac);\n\n var digits = parsedNumber.d;\n var integerLen = parsedNumber.i;\n var exponent = parsedNumber.e;\n var decimals = [];\n isZero = digits.reduce(function(isZero, d) { return isZero && !d; }, true);\n\n // pad zeros for small numbers\n while (integerLen < 0) {\n digits.unshift(0);\n integerLen++;\n }\n\n // extract decimals digits\n if (integerLen > 0) {\n decimals = digits.splice(integerLen, digits.length);\n } else {\n decimals = digits;\n digits = [0];\n }\n\n // format the integer digits with grouping separators\n var groups = [];\n if (digits.length >= pattern.lgSize) {\n groups.unshift(digits.splice(-pattern.lgSize, digits.length).join(''));\n }\n while (digits.length > pattern.gSize) {\n groups.unshift(digits.splice(-pattern.gSize, digits.length).join(''));\n }\n if (digits.length) {\n groups.unshift(digits.join(''));\n }\n formattedText = groups.join(groupSep);\n\n // append the decimal digits\n if (decimals.length) {\n formattedText += decimalSep + decimals.join('');\n }\n\n if (exponent) {\n formattedText += 'e+' + exponent;\n }\n }\n if (number < 0 && !isZero) {\n return pattern.negPre + formattedText + pattern.negSuf;\n } else {\n return pattern.posPre + formattedText + pattern.posSuf;\n }\n}\n\nfunction padNumber(num, digits, trim) {\n var neg = '';\n if (num < 0) {\n neg = '-';\n num = -num;\n }\n num = '' + num;\n while (num.length < digits) num = ZERO_CHAR + num;\n if (trim) {\n num = num.substr(num.length - digits);\n }\n return neg + num;\n}\n\n\nfunction dateGetter(name, size, offset, trim) {\n offset = offset || 0;\n return function(date) {\n var value = date['get' + name]();\n if (offset > 0 || value > -offset) {\n value += offset;\n }\n if (value === 0 && offset == -12) value = 12;\n return padNumber(value, size, trim);\n };\n}\n\nfunction dateStrGetter(name, shortForm) {\n return function(date, formats) {\n var value = date['get' + name]();\n var get = uppercase(shortForm ? ('SHORT' + name) : name);\n\n return formats[get][value];\n };\n}\n\nfunction timeZoneGetter(date, formats, offset) {\n var zone = -1 * offset;\n var paddedZone = (zone >= 0) ? \"+\" : \"\";\n\n paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) +\n padNumber(Math.abs(zone % 60), 2);\n\n return paddedZone;\n}\n\nfunction getFirstThursdayOfYear(year) {\n // 0 = index of January\n var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay();\n // 4 = index of Thursday (+1 to account for 1st = 5)\n // 11 = index of *next* Thursday (+1 account for 1st = 12)\n return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst);\n}\n\nfunction getThursdayThisWeek(datetime) {\n return new Date(datetime.getFullYear(), datetime.getMonth(),\n // 4 = index of Thursday\n datetime.getDate() + (4 - datetime.getDay()));\n}\n\nfunction weekGetter(size) {\n return function(date) {\n var firstThurs = getFirstThursdayOfYear(date.getFullYear()),\n thisThurs = getThursdayThisWeek(date);\n\n var diff = +thisThurs - +firstThurs,\n result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week\n\n return padNumber(result, size);\n };\n}\n\nfunction ampmGetter(date, formats) {\n return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];\n}\n\nfunction eraGetter(date, formats) {\n return date.getFullYear() <= 0 ? formats.ERAS[0] : formats.ERAS[1];\n}\n\nfunction longEraGetter(date, formats) {\n return date.getFullYear() <= 0 ? formats.ERANAMES[0] : formats.ERANAMES[1];\n}\n\nvar DATE_FORMATS = {\n yyyy: dateGetter('FullYear', 4),\n yy: dateGetter('FullYear', 2, 0, true),\n y: dateGetter('FullYear', 1),\n MMMM: dateStrGetter('Month'),\n MMM: dateStrGetter('Month', true),\n MM: dateGetter('Month', 2, 1),\n M: dateGetter('Month', 1, 1),\n dd: dateGetter('Date', 2),\n d: dateGetter('Date', 1),\n HH: dateGetter('Hours', 2),\n H: dateGetter('Hours', 1),\n hh: dateGetter('Hours', 2, -12),\n h: dateGetter('Hours', 1, -12),\n mm: dateGetter('Minutes', 2),\n m: dateGetter('Minutes', 1),\n ss: dateGetter('Seconds', 2),\n s: dateGetter('Seconds', 1),\n // while ISO 8601 requires fractions to be prefixed with `.` or `,`\n // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions\n sss: dateGetter('Milliseconds', 3),\n EEEE: dateStrGetter('Day'),\n EEE: dateStrGetter('Day', true),\n a: ampmGetter,\n Z: timeZoneGetter,\n ww: weekGetter(2),\n w: weekGetter(1),\n G: eraGetter,\n GG: eraGetter,\n GGG: eraGetter,\n GGGG: longEraGetter\n};\n\nvar DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,\n NUMBER_STRING = /^\\-?\\d+$/;\n\n/**\n * @ngdoc filter\n * @name date\n * @kind function\n *\n * @description\n * Formats `date` to a string based on the requested `format`.\n *\n * `format` string can be composed of the following elements:\n *\n * * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)\n * * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n * * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)\n * * `'MMMM'`: Month in year (January-December)\n * * `'MMM'`: Month in year (Jan-Dec)\n * * `'MM'`: Month in year, padded (01-12)\n * * `'M'`: Month in year (1-12)\n * * `'dd'`: Day in month, padded (01-31)\n * * `'d'`: Day in month (1-31)\n * * `'EEEE'`: Day in Week,(Sunday-Saturday)\n * * `'EEE'`: Day in Week, (Sun-Sat)\n * * `'HH'`: Hour in day, padded (00-23)\n * * `'H'`: Hour in day (0-23)\n * * `'hh'`: Hour in AM/PM, padded (01-12)\n * * `'h'`: Hour in AM/PM, (1-12)\n * * `'mm'`: Minute in hour, padded (00-59)\n * * `'m'`: Minute in hour (0-59)\n * * `'ss'`: Second in minute, padded (00-59)\n * * `'s'`: Second in minute (0-59)\n * * `'sss'`: Millisecond in second, padded (000-999)\n * * `'a'`: AM/PM marker\n * * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)\n * * `'ww'`: Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year\n * * `'w'`: Week of year (0-53). Week 1 is the week with the first Thursday of the year\n * * `'G'`, `'GG'`, `'GGG'`: The abbreviated form of the era string (e.g. 'AD')\n * * `'GGGG'`: The long form of the era string (e.g. 'Anno Domini')\n *\n * `format` string can also be one of the following predefined\n * {@link guide/i18n localizable formats}:\n *\n * * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale\n * (e.g. Sep 3, 2010 12:05:08 PM)\n * * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US locale (e.g. 9/3/10 12:05 PM)\n * * `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` for en_US locale\n * (e.g. Friday, September 3, 2010)\n * * `'longDate'`: equivalent to `'MMMM d, y'` for en_US locale (e.g. September 3, 2010)\n * * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US locale (e.g. Sep 3, 2010)\n * * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10)\n * * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 PM)\n * * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 PM)\n *\n * `format` string can contain literal values. These need to be escaped by surrounding with single quotes (e.g.\n * `\"h 'in the morning'\"`). In order to output a single quote, escape it - i.e., two single quotes in a sequence\n * (e.g. `\"h 'o''clock'\"`).\n *\n * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or\n * number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its\n * shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is\n * specified in the string input, the time is considered to be in the local timezone.\n * @param {string=} format Formatting rules (see Description). If not specified,\n * `mediumDate` is used.\n * @param {string=} timezone Timezone to be used for formatting. It understands UTC/GMT and the\n * continental US time zone abbreviations, but for general use, use a time zone offset, for\n * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian)\n * If not specified, the timezone of the browser will be used.\n * @returns {string} Formatted string or the input if input is not recognized as date/millis.\n *\n * @example\n <example>\n <file name=\"index.html\">\n <span ng-non-bindable>{{1288323623006 | date:'medium'}}</span>:\n <span>{{1288323623006 | date:'medium'}}</span><br>\n <span ng-non-bindable>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span>:\n <span>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span><br>\n <span ng-non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>:\n <span>{{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}</span><br>\n <span ng-non-bindable>{{1288323623006 | date:\"MM/dd/yyyy 'at' h:mma\"}}</span>:\n <span>{{'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"}}</span><br>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should format date', function() {\n expect(element(by.binding(\"1288323623006 | date:'medium'\")).getText()).\n toMatch(/Oct 2\\d, 2010 \\d{1,2}:\\d{2}:\\d{2} (AM|PM)/);\n expect(element(by.binding(\"1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'\")).getText()).\n toMatch(/2010\\-10\\-2\\d \\d{2}:\\d{2}:\\d{2} (\\-|\\+)?\\d{4}/);\n expect(element(by.binding(\"'1288323623006' | date:'MM/dd/yyyy @ h:mma'\")).getText()).\n toMatch(/10\\/2\\d\\/2010 @ \\d{1,2}:\\d{2}(AM|PM)/);\n expect(element(by.binding(\"'1288323623006' | date:\\\"MM/dd/yyyy 'at' h:mma\\\"\")).getText()).\n toMatch(/10\\/2\\d\\/2010 at \\d{1,2}:\\d{2}(AM|PM)/);\n });\n </file>\n </example>\n */\ndateFilter.$inject = ['$locale'];\nfunction dateFilter($locale) {\n\n\n var R_ISO8601_STR = /^(\\d{4})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n // 1 2 3 4 5 6 7 8 9 10 11\n function jsonStringToDate(string) {\n var match;\n if (match = string.match(R_ISO8601_STR)) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = toInt(match[9] + match[10]);\n tzMin = toInt(match[9] + match[11]);\n }\n dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\n var h = toInt(match[4] || 0) - tzHour;\n var m = toInt(match[5] || 0) - tzMin;\n var s = toInt(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }\n\n\n return function(date, format, timezone) {\n var text = '',\n parts = [],\n fn, match;\n\n format = format || 'mediumDate';\n format = $locale.DATETIME_FORMATS[format] || format;\n if (isString(date)) {\n date = NUMBER_STRING.test(date) ? toInt(date) : jsonStringToDate(date);\n }\n\n if (isNumber(date)) {\n date = new Date(date);\n }\n\n if (!isDate(date) || !isFinite(date.getTime())) {\n return date;\n }\n\n while (format) {\n match = DATE_FORMATS_SPLIT.exec(format);\n if (match) {\n parts = concat(parts, match, 1);\n format = parts.pop();\n } else {\n parts.push(format);\n format = null;\n }\n }\n\n var dateTimezoneOffset = date.getTimezoneOffset();\n if (timezone) {\n dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n date = convertTimezoneToLocal(date, timezone, true);\n }\n forEach(parts, function(value) {\n fn = DATE_FORMATS[value];\n text += fn ? fn(date, $locale.DATETIME_FORMATS, dateTimezoneOffset)\n : value === \"''\" ? \"'\" : value.replace(/(^'|'$)/g, '').replace(/''/g, \"'\");\n });\n\n return text;\n };\n}\n\n\n/**\n * @ngdoc filter\n * @name json\n * @kind function\n *\n * @description\n * Allows you to convert a JavaScript object into JSON string.\n *\n * This filter is mostly useful for debugging. When using the double curly {{value}} notation\n * the binding is automatically converted to JSON.\n *\n * @param {*} object Any JavaScript object (including arrays and primitive types) to filter.\n * @param {number=} spacing The number of spaces to use per indentation, defaults to 2.\n * @returns {string} JSON string.\n *\n *\n * @example\n <example>\n <file name=\"index.html\">\n <pre id=\"default-spacing\">{{ {'name':'value'} | json }}</pre>\n <pre id=\"custom-spacing\">{{ {'name':'value'} | json:4 }}</pre>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should jsonify filtered objects', function() {\n expect(element(by.id('default-spacing')).getText()).toMatch(/\\{\\n \"name\": ?\"value\"\\n}/);\n expect(element(by.id('custom-spacing')).getText()).toMatch(/\\{\\n \"name\": ?\"value\"\\n}/);\n });\n </file>\n </example>\n *\n */\nfunction jsonFilter() {\n return function(object, spacing) {\n if (isUndefined(spacing)) {\n spacing = 2;\n }\n return toJson(object, spacing);\n };\n}\n\n\n/**\n * @ngdoc filter\n * @name lowercase\n * @kind function\n * @description\n * Converts string to lowercase.\n * @see angular.lowercase\n */\nvar lowercaseFilter = valueFn(lowercase);\n\n\n/**\n * @ngdoc filter\n * @name uppercase\n * @kind function\n * @description\n * Converts string to uppercase.\n * @see angular.uppercase\n */\nvar uppercaseFilter = valueFn(uppercase);\n\n/**\n * @ngdoc filter\n * @name limitTo\n * @kind function\n *\n * @description\n * Creates a new array or string containing only a specified number of elements. The elements\n * are taken from either the beginning or the end of the source array, string or number, as specified by\n * the value and sign (positive or negative) of `limit`. If a number is used as input, it is\n * converted to a string.\n *\n * @param {Array|string|number} input Source array, string or number to be limited.\n * @param {string|number} limit The length of the returned array or string. If the `limit` number\n * is positive, `limit` number of items from the beginning of the source array/string are copied.\n * If the number is negative, `limit` number of items from the end of the source array/string\n * are copied. The `limit` will be trimmed if it exceeds `array.length`. If `limit` is undefined,\n * the input will be returned unchanged.\n * @param {(string|number)=} begin Index at which to begin limitation. As a negative index, `begin`\n * indicates an offset from the end of `input`. Defaults to `0`.\n * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array\n * had less than `limit` elements.\n *\n * @example\n <example module=\"limitToExample\">\n <file name=\"index.html\">\n <script>\n angular.module('limitToExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.numbers = [1,2,3,4,5,6,7,8,9];\n $scope.letters = \"abcdefghi\";\n $scope.longNumber = 2345432342;\n $scope.numLimit = 3;\n $scope.letterLimit = 3;\n $scope.longNumberLimit = 3;\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <label>\n Limit {{numbers}} to:\n <input type=\"number\" step=\"1\" ng-model=\"numLimit\">\n </label>\n <p>Output numbers: {{ numbers | limitTo:numLimit }}</p>\n <label>\n Limit {{letters}} to:\n <input type=\"number\" step=\"1\" ng-model=\"letterLimit\">\n </label>\n <p>Output letters: {{ letters | limitTo:letterLimit }}</p>\n <label>\n Limit {{longNumber}} to:\n <input type=\"number\" step=\"1\" ng-model=\"longNumberLimit\">\n </label>\n <p>Output long number: {{ longNumber | limitTo:longNumberLimit }}</p>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var numLimitInput = element(by.model('numLimit'));\n var letterLimitInput = element(by.model('letterLimit'));\n var longNumberLimitInput = element(by.model('longNumberLimit'));\n var limitedNumbers = element(by.binding('numbers | limitTo:numLimit'));\n var limitedLetters = element(by.binding('letters | limitTo:letterLimit'));\n var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit'));\n\n it('should limit the number array to first three items', function() {\n expect(numLimitInput.getAttribute('value')).toBe('3');\n expect(letterLimitInput.getAttribute('value')).toBe('3');\n expect(longNumberLimitInput.getAttribute('value')).toBe('3');\n expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]');\n expect(limitedLetters.getText()).toEqual('Output letters: abc');\n expect(limitedLongNumber.getText()).toEqual('Output long number: 234');\n });\n\n // There is a bug in safari and protractor that doesn't like the minus key\n // it('should update the output when -3 is entered', function() {\n // numLimitInput.clear();\n // numLimitInput.sendKeys('-3');\n // letterLimitInput.clear();\n // letterLimitInput.sendKeys('-3');\n // longNumberLimitInput.clear();\n // longNumberLimitInput.sendKeys('-3');\n // expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]');\n // expect(limitedLetters.getText()).toEqual('Output letters: ghi');\n // expect(limitedLongNumber.getText()).toEqual('Output long number: 342');\n // });\n\n it('should not exceed the maximum size of input array', function() {\n numLimitInput.clear();\n numLimitInput.sendKeys('100');\n letterLimitInput.clear();\n letterLimitInput.sendKeys('100');\n longNumberLimitInput.clear();\n longNumberLimitInput.sendKeys('100');\n expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]');\n expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi');\n expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342');\n });\n </file>\n </example>\n*/\nfunction limitToFilter() {\n return function(input, limit, begin) {\n if (Math.abs(Number(limit)) === Infinity) {\n limit = Number(limit);\n } else {\n limit = toInt(limit);\n }\n if (isNaN(limit)) return input;\n\n if (isNumber(input)) input = input.toString();\n if (!isArray(input) && !isString(input)) return input;\n\n begin = (!begin || isNaN(begin)) ? 0 : toInt(begin);\n begin = (begin < 0) ? Math.max(0, input.length + begin) : begin;\n\n if (limit >= 0) {\n return input.slice(begin, begin + limit);\n } else {\n if (begin === 0) {\n return input.slice(limit, input.length);\n } else {\n return input.slice(Math.max(0, begin + limit), begin);\n }\n }\n };\n}\n\n/**\n * @ngdoc filter\n * @name orderBy\n * @kind function\n *\n * @description\n * Orders a specified `array` by the `expression` predicate. It is ordered alphabetically\n * for strings and numerically for numbers. Note: if you notice numbers are not being sorted\n * as expected, make sure they are actually being saved as numbers and not strings.\n *\n * @param {Array} array The array to sort.\n * @param {function(*)|string|Array.<(function(*)|string)>=} expression A predicate to be\n * used by the comparator to determine the order of elements.\n *\n * Can be one of:\n *\n * - `function`: Getter function. The result of this function will be sorted using the\n * `<`, `===`, `>` operator.\n * - `string`: An Angular expression. The result of this expression is used to compare elements\n * (for example `name` to sort by a property called `name` or `name.substr(0, 3)` to sort by\n * 3 first characters of a property called `name`). The result of a constant expression\n * is interpreted as a property name to be used in comparisons (for example `\"special name\"`\n * to sort object by the value of their `special name` property). An expression can be\n * optionally prefixed with `+` or `-` to control ascending or descending sort order\n * (for example, `+name` or `-name`). If no property is provided, (e.g. `'+'`) then the array\n * element itself is used to compare where sorting.\n * - `Array`: An array of function or string predicates. The first predicate in the array\n * is used for sorting, but when two items are equivalent, the next predicate is used.\n *\n * If the predicate is missing or empty then it defaults to `'+'`.\n *\n * @param {boolean=} reverse Reverse the order of the array.\n * @returns {Array} Sorted copy of the source array.\n *\n *\n * @example\n * The example below demonstrates a simple ngRepeat, where the data is sorted\n * by age in descending order (predicate is set to `'-age'`).\n * `reverse` is not set, which means it defaults to `false`.\n <example module=\"orderByExample\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <table class=\"friend\">\n <tr>\n <th>Name</th>\n <th>Phone Number</th>\n <th>Age</th>\n </tr>\n <tr ng-repeat=\"friend in friends | orderBy:'-age'\">\n <td>{{friend.name}}</td>\n <td>{{friend.phone}}</td>\n <td>{{friend.age}}</td>\n </tr>\n </table>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('orderByExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.friends =\n [{name:'John', phone:'555-1212', age:10},\n {name:'Mary', phone:'555-9876', age:19},\n {name:'Mike', phone:'555-4321', age:21},\n {name:'Adam', phone:'555-5678', age:35},\n {name:'Julie', phone:'555-8765', age:29}];\n }]);\n </file>\n </example>\n *\n * The predicate and reverse parameters can be controlled dynamically through scope properties,\n * as shown in the next example.\n * @example\n <example module=\"orderByExample\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <pre>Sorting predicate = {{predicate}}; reverse = {{reverse}}</pre>\n <hr/>\n <button ng-click=\"predicate=''\">Set to unsorted</button>\n <table class=\"friend\">\n <tr>\n <th>\n <button ng-click=\"order('name')\">Name</button>\n <span class=\"sortorder\" ng-show=\"predicate === 'name'\" ng-class=\"{reverse:reverse}\"></span>\n </th>\n <th>\n <button ng-click=\"order('phone')\">Phone Number</button>\n <span class=\"sortorder\" ng-show=\"predicate === 'phone'\" ng-class=\"{reverse:reverse}\"></span>\n </th>\n <th>\n <button ng-click=\"order('age')\">Age</button>\n <span class=\"sortorder\" ng-show=\"predicate === 'age'\" ng-class=\"{reverse:reverse}\"></span>\n </th>\n </tr>\n <tr ng-repeat=\"friend in friends | orderBy:predicate:reverse\">\n <td>{{friend.name}}</td>\n <td>{{friend.phone}}</td>\n <td>{{friend.age}}</td>\n </tr>\n </table>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('orderByExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.friends =\n [{name:'John', phone:'555-1212', age:10},\n {name:'Mary', phone:'555-9876', age:19},\n {name:'Mike', phone:'555-4321', age:21},\n {name:'Adam', phone:'555-5678', age:35},\n {name:'Julie', phone:'555-8765', age:29}];\n $scope.predicate = 'age';\n $scope.reverse = true;\n $scope.order = function(predicate) {\n $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;\n $scope.predicate = predicate;\n };\n }]);\n </file>\n <file name=\"style.css\">\n .sortorder:after {\n content: '\\25b2';\n }\n .sortorder.reverse:after {\n content: '\\25bc';\n }\n </file>\n </example>\n *\n * It's also possible to call the orderBy filter manually, by injecting `$filter`, retrieving the\n * filter routine with `$filter('orderBy')`, and calling the returned filter routine with the\n * desired parameters.\n *\n * Example:\n *\n * @example\n <example module=\"orderByExample\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <pre>Sorting predicate = {{predicate}}; reverse = {{reverse}}</pre>\n <table class=\"friend\">\n <tr>\n <th>\n <button ng-click=\"order('name')\">Name</button>\n <span class=\"sortorder\" ng-show=\"predicate === 'name'\" ng-class=\"{reverse:reverse}\"></span>\n </th>\n <th>\n <button ng-click=\"order('phone')\">Phone Number</button>\n <span class=\"sortorder\" ng-show=\"predicate === 'phone'\" ng-class=\"{reverse:reverse}\"></span>\n </th>\n <th>\n <button ng-click=\"order('age')\">Age</button>\n <span class=\"sortorder\" ng-show=\"predicate === 'age'\" ng-class=\"{reverse:reverse}\"></span>\n </th>\n </tr>\n <tr ng-repeat=\"friend in friends\">\n <td>{{friend.name}}</td>\n <td>{{friend.phone}}</td>\n <td>{{friend.age}}</td>\n </tr>\n </table>\n </div>\n </file>\n\n <file name=\"script.js\">\n angular.module('orderByExample', [])\n .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) {\n var orderBy = $filter('orderBy');\n $scope.friends = [\n { name: 'John', phone: '555-1212', age: 10 },\n { name: 'Mary', phone: '555-9876', age: 19 },\n { name: 'Mike', phone: '555-4321', age: 21 },\n { name: 'Adam', phone: '555-5678', age: 35 },\n { name: 'Julie', phone: '555-8765', age: 29 }\n ];\n $scope.order = function(predicate) {\n $scope.predicate = predicate;\n $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;\n $scope.friends = orderBy($scope.friends, predicate, $scope.reverse);\n };\n $scope.order('age', true);\n }]);\n </file>\n\n <file name=\"style.css\">\n .sortorder:after {\n content: '\\25b2';\n }\n .sortorder.reverse:after {\n content: '\\25bc';\n }\n </file>\n</example>\n */\norderByFilter.$inject = ['$parse'];\nfunction orderByFilter($parse) {\n return function(array, sortPredicate, reverseOrder) {\n\n if (!(isArrayLike(array))) return array;\n\n if (!isArray(sortPredicate)) { sortPredicate = [sortPredicate]; }\n if (sortPredicate.length === 0) { sortPredicate = ['+']; }\n\n var predicates = processPredicates(sortPredicate, reverseOrder);\n // Add a predicate at the end that evaluates to the element index. This makes the\n // sort stable as it works as a tie-breaker when all the input predicates cannot\n // distinguish between two elements.\n predicates.push({ get: function() { return {}; }, descending: reverseOrder ? -1 : 1});\n\n // The next three lines are a version of a Swartzian Transform idiom from Perl\n // (sometimes called the Decorate-Sort-Undecorate idiom)\n // See https://en.wikipedia.org/wiki/Schwartzian_transform\n var compareValues = Array.prototype.map.call(array, getComparisonObject);\n compareValues.sort(doComparison);\n array = compareValues.map(function(item) { return item.value; });\n\n return array;\n\n function getComparisonObject(value, index) {\n return {\n value: value,\n predicateValues: predicates.map(function(predicate) {\n return getPredicateValue(predicate.get(value), index);\n })\n };\n }\n\n function doComparison(v1, v2) {\n var result = 0;\n for (var index=0, length = predicates.length; index < length; ++index) {\n result = compare(v1.predicateValues[index], v2.predicateValues[index]) * predicates[index].descending;\n if (result) break;\n }\n return result;\n }\n };\n\n function processPredicates(sortPredicate, reverseOrder) {\n reverseOrder = reverseOrder ? -1 : 1;\n return sortPredicate.map(function(predicate) {\n var descending = 1, get = identity;\n\n if (isFunction(predicate)) {\n get = predicate;\n } else if (isString(predicate)) {\n if ((predicate.charAt(0) == '+' || predicate.charAt(0) == '-')) {\n descending = predicate.charAt(0) == '-' ? -1 : 1;\n predicate = predicate.substring(1);\n }\n if (predicate !== '') {\n get = $parse(predicate);\n if (get.constant) {\n var key = get();\n get = function(value) { return value[key]; };\n }\n }\n }\n return { get: get, descending: descending * reverseOrder };\n });\n }\n\n function isPrimitive(value) {\n switch (typeof value) {\n case 'number': /* falls through */\n case 'boolean': /* falls through */\n case 'string':\n return true;\n default:\n return false;\n }\n }\n\n function objectValue(value, index) {\n // If `valueOf` is a valid function use that\n if (typeof value.valueOf === 'function') {\n value = value.valueOf();\n if (isPrimitive(value)) return value;\n }\n // If `toString` is a valid function and not the one from `Object.prototype` use that\n if (hasCustomToString(value)) {\n value = value.toString();\n if (isPrimitive(value)) return value;\n }\n // We have a basic object so we use the position of the object in the collection\n return index;\n }\n\n function getPredicateValue(value, index) {\n var type = typeof value;\n if (value === null) {\n type = 'string';\n value = 'null';\n } else if (type === 'string') {\n value = value.toLowerCase();\n } else if (type === 'object') {\n value = objectValue(value, index);\n }\n return { value: value, type: type };\n }\n\n function compare(v1, v2) {\n var result = 0;\n if (v1.type === v2.type) {\n if (v1.value !== v2.value) {\n result = v1.value < v2.value ? -1 : 1;\n }\n } else {\n result = v1.type < v2.type ? -1 : 1;\n }\n return result;\n }\n}\n\nfunction ngDirective(directive) {\n if (isFunction(directive)) {\n directive = {\n link: directive\n };\n }\n directive.restrict = directive.restrict || 'AC';\n return valueFn(directive);\n}\n\n/**\n * @ngdoc directive\n * @name a\n * @restrict E\n *\n * @description\n * Modifies the default behavior of the html A tag so that the default action is prevented when\n * the href attribute is empty.\n *\n * This change permits the easy creation of action links with the `ngClick` directive\n * without changing the location or causing page reloads, e.g.:\n * `<a href=\"\" ng-click=\"list.addItem()\">Add Item</a>`\n */\nvar htmlAnchorDirective = valueFn({\n restrict: 'E',\n compile: function(element, attr) {\n if (!attr.href && !attr.xlinkHref) {\n return function(scope, element) {\n // If the linked element is not an anchor tag anymore, do nothing\n if (element[0].nodeName.toLowerCase() !== 'a') return;\n\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?\n 'xlink:href' : 'href';\n element.on('click', function(event) {\n // if we have no href url, then don't navigate anywhere.\n if (!element.attr(href)) {\n event.preventDefault();\n }\n });\n };\n }\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngHref\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in an href attribute will\n * make the link go to the wrong URL if the user clicks it before\n * Angular has a chance to replace the `{{hash}}` markup with its\n * value. Until Angular replaces the markup the link will be broken\n * and will most likely return a 404 error. The `ngHref` directive\n * solves this problem.\n *\n * The wrong way to write it:\n * ```html\n * <a href=\"http://www.gravatar.com/avatar/{{hash}}\">link1</a>\n * ```\n *\n * The correct way to write it:\n * ```html\n * <a ng-href=\"http://www.gravatar.com/avatar/{{hash}}\">link1</a>\n * ```\n *\n * @element A\n * @param {template} ngHref any string which can contain `{{}}` markup.\n *\n * @example\n * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes\n * in links and their different behaviors:\n <example>\n <file name=\"index.html\">\n <input ng-model=\"value\" /><br />\n <a id=\"link-1\" href ng-click=\"value = 1\">link 1</a> (link, don't reload)<br />\n <a id=\"link-2\" href=\"\" ng-click=\"value = 2\">link 2</a> (link, don't reload)<br />\n <a id=\"link-3\" ng-href=\"/{{'123'}}\">link 3</a> (link, reload!)<br />\n <a id=\"link-4\" href=\"\" name=\"xx\" ng-click=\"value = 4\">anchor</a> (link, don't reload)<br />\n <a id=\"link-5\" name=\"xxx\" ng-click=\"value = 5\">anchor</a> (no link)<br />\n <a id=\"link-6\" ng-href=\"{{value}}\">link</a> (link, change location)\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should execute ng-click but not reload when href without value', function() {\n element(by.id('link-1')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('1');\n expect(element(by.id('link-1')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click but not reload when href empty string', function() {\n element(by.id('link-2')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('2');\n expect(element(by.id('link-2')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click and change url when ng-href specified', function() {\n expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\\/123$/);\n\n element(by.id('link-3')).click();\n\n // At this point, we navigate away from an Angular page, so we need\n // to use browser.driver to get the base webdriver.\n\n browser.wait(function() {\n return browser.driver.getCurrentUrl().then(function(url) {\n return url.match(/\\/123$/);\n });\n }, 5000, 'page should navigate to /123');\n });\n\n it('should execute ng-click but not reload when href empty string and name specified', function() {\n element(by.id('link-4')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('4');\n expect(element(by.id('link-4')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click but not reload when no href but name specified', function() {\n element(by.id('link-5')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('5');\n expect(element(by.id('link-5')).getAttribute('href')).toBe(null);\n });\n\n it('should only change url when only ng-href', function() {\n element(by.model('value')).clear();\n element(by.model('value')).sendKeys('6');\n expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\\/6$/);\n\n element(by.id('link-6')).click();\n\n // At this point, we navigate away from an Angular page, so we need\n // to use browser.driver to get the base webdriver.\n browser.wait(function() {\n return browser.driver.getCurrentUrl().then(function(url) {\n return url.match(/\\/6$/);\n });\n }, 5000, 'page should navigate to /6');\n });\n </file>\n </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngSrc\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in a `src` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until Angular replaces the expression inside\n * `{{hash}}`. The `ngSrc` directive solves this problem.\n *\n * The buggy way to write it:\n * ```html\n * <img src=\"http://www.gravatar.com/avatar/{{hash}}\" alt=\"Description\"/>\n * ```\n *\n * The correct way to write it:\n * ```html\n * <img ng-src=\"http://www.gravatar.com/avatar/{{hash}}\" alt=\"Description\" />\n * ```\n *\n * @element IMG\n * @param {template} ngSrc any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ngSrcset\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in a `srcset` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until Angular replaces the expression inside\n * `{{hash}}`. The `ngSrcset` directive solves this problem.\n *\n * The buggy way to write it:\n * ```html\n * <img srcset=\"http://www.gravatar.com/avatar/{{hash}} 2x\" alt=\"Description\"/>\n * ```\n *\n * The correct way to write it:\n * ```html\n * <img ng-srcset=\"http://www.gravatar.com/avatar/{{hash}} 2x\" alt=\"Description\" />\n * ```\n *\n * @element IMG\n * @param {template} ngSrcset any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ngDisabled\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * This directive sets the `disabled` attribute on the element if the\n * {@link guide/expression expression} inside `ngDisabled` evaluates to truthy.\n *\n * A special directive is necessary because we cannot use interpolation inside the `disabled`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * @example\n <example>\n <file name=\"index.html\">\n <label>Click me to toggle: <input type=\"checkbox\" ng-model=\"checked\"></label><br/>\n <button ng-model=\"button\" ng-disabled=\"checked\">Button</button>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should toggle button', function() {\n expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy();\n element(by.model('checked')).click();\n expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy();\n });\n </file>\n </example>\n *\n * @element INPUT\n * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,\n * then the `disabled` attribute will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngChecked\n * @restrict A\n * @priority 100\n *\n * @description\n * Sets the `checked` attribute on the element, if the expression inside `ngChecked` is truthy.\n *\n * Note that this directive should not be used together with {@link ngModel `ngModel`},\n * as this can lead to unexpected behavior.\n *\n * A special directive is necessary because we cannot use interpolation inside the `checked`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * @example\n <example>\n <file name=\"index.html\">\n <label>Check me to check both: <input type=\"checkbox\" ng-model=\"master\"></label><br/>\n <input id=\"checkSlave\" type=\"checkbox\" ng-checked=\"master\" aria-label=\"Slave input\">\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check both checkBoxes', function() {\n expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy();\n element(by.model('master')).click();\n expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy();\n });\n </file>\n </example>\n *\n * @element INPUT\n * @param {expression} ngChecked If the {@link guide/expression expression} is truthy,\n * then the `checked` attribute will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngReadonly\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * Sets the `readOnly` attribute on the element, if the expression inside `ngReadonly` is truthy.\n *\n * A special directive is necessary because we cannot use interpolation inside the `readOnly`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * @example\n <example>\n <file name=\"index.html\">\n <label>Check me to make text readonly: <input type=\"checkbox\" ng-model=\"checked\"></label><br/>\n <input type=\"text\" ng-readonly=\"checked\" value=\"I'm Angular\" aria-label=\"Readonly field\" />\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should toggle readonly attr', function() {\n expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeFalsy();\n element(by.model('checked')).click();\n expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeTruthy();\n });\n </file>\n </example>\n *\n * @element INPUT\n * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,\n * then special attribute \"readonly\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngSelected\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * Sets the `selected` attribute on the element, if the expression inside `ngSelected` is truthy.\n *\n * A special directive is necessary because we cannot use interpolation inside the `selected`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * @example\n <example>\n <file name=\"index.html\">\n <label>Check me to select: <input type=\"checkbox\" ng-model=\"selected\"></label><br/>\n <select aria-label=\"ngSelected demo\">\n <option>Hello!</option>\n <option id=\"greet\" ng-selected=\"selected\">Greetings!</option>\n </select>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should select Greetings!', function() {\n expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy();\n element(by.model('selected')).click();\n expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy();\n });\n </file>\n </example>\n *\n * @element OPTION\n * @param {expression} ngSelected If the {@link guide/expression expression} is truthy,\n * then special attribute \"selected\" will be set on the element\n */\n\n/**\n * @ngdoc directive\n * @name ngOpen\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * Sets the `open` attribute on the element, if the expression inside `ngOpen` is truthy.\n *\n * A special directive is necessary because we cannot use interpolation inside the `open`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * @example\n <example>\n <file name=\"index.html\">\n <label>Check me check multiple: <input type=\"checkbox\" ng-model=\"open\"></label><br/>\n <details id=\"details\" ng-open=\"open\">\n <summary>Show/Hide me</summary>\n </details>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should toggle open', function() {\n expect(element(by.id('details')).getAttribute('open')).toBeFalsy();\n element(by.model('open')).click();\n expect(element(by.id('details')).getAttribute('open')).toBeTruthy();\n });\n </file>\n </example>\n *\n * @element DETAILS\n * @param {expression} ngOpen If the {@link guide/expression expression} is truthy,\n * then special attribute \"open\" will be set on the element\n */\n\nvar ngAttributeAliasDirectives = {};\n\n// boolean attrs are evaluated\nforEach(BOOLEAN_ATTR, function(propName, attrName) {\n // binding to multiple is not supported\n if (propName == \"multiple\") return;\n\n function defaultLinkFn(scope, element, attr) {\n scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) {\n attr.$set(attrName, !!value);\n });\n }\n\n var normalized = directiveNormalize('ng-' + attrName);\n var linkFn = defaultLinkFn;\n\n if (propName === 'checked') {\n linkFn = function(scope, element, attr) {\n // ensuring ngChecked doesn't interfere with ngModel when both are set on the same input\n if (attr.ngModel !== attr[normalized]) {\n defaultLinkFn(scope, element, attr);\n }\n };\n }\n\n ngAttributeAliasDirectives[normalized] = function() {\n return {\n restrict: 'A',\n priority: 100,\n link: linkFn\n };\n };\n});\n\n// aliased input attrs are evaluated\nforEach(ALIASED_ATTR, function(htmlAttr, ngAttr) {\n ngAttributeAliasDirectives[ngAttr] = function() {\n return {\n priority: 100,\n link: function(scope, element, attr) {\n //special case ngPattern when a literal regular expression value\n //is used as the expression (this way we don't have to watch anything).\n if (ngAttr === \"ngPattern\" && attr.ngPattern.charAt(0) == \"/\") {\n var match = attr.ngPattern.match(REGEX_STRING_REGEXP);\n if (match) {\n attr.$set(\"ngPattern\", new RegExp(match[1], match[2]));\n return;\n }\n }\n\n scope.$watch(attr[ngAttr], function ngAttrAliasWatchAction(value) {\n attr.$set(ngAttr, value);\n });\n }\n };\n };\n});\n\n// ng-src, ng-srcset, ng-href are interpolated\nforEach(['src', 'srcset', 'href'], function(attrName) {\n var normalized = directiveNormalize('ng-' + attrName);\n ngAttributeAliasDirectives[normalized] = function() {\n return {\n priority: 99, // it needs to run after the attributes are interpolated\n link: function(scope, element, attr) {\n var propName = attrName,\n name = attrName;\n\n if (attrName === 'href' &&\n toString.call(element.prop('href')) === '[object SVGAnimatedString]') {\n name = 'xlinkHref';\n attr.$attr[name] = 'xlink:href';\n propName = null;\n }\n\n attr.$observe(normalized, function(value) {\n if (!value) {\n if (attrName === 'href') {\n attr.$set(name, null);\n }\n return;\n }\n\n attr.$set(name, value);\n\n // on IE, if \"ng:src\" directive declaration is used and \"src\" attribute doesn't exist\n // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need\n // to set the property as well to achieve the desired effect.\n // we use attr[attrName] value since $set can sanitize the url.\n if (msie && propName) element.prop(propName, attr[name]);\n });\n }\n };\n };\n});\n\n/* global -nullFormCtrl, -SUBMITTED_CLASS, addSetValidityMethod: true\n */\nvar nullFormCtrl = {\n $addControl: noop,\n $$renameControl: nullFormRenameControl,\n $removeControl: noop,\n $setValidity: noop,\n $setDirty: noop,\n $setPristine: noop,\n $setSubmitted: noop\n},\nSUBMITTED_CLASS = 'ng-submitted';\n\nfunction nullFormRenameControl(control, name) {\n control.$name = name;\n}\n\n/**\n * @ngdoc type\n * @name form.FormController\n *\n * @property {boolean} $pristine True if user has not interacted with the form yet.\n * @property {boolean} $dirty True if user has already interacted with the form.\n * @property {boolean} $valid True if all of the containing forms and controls are valid.\n * @property {boolean} $invalid True if at least one containing control or form is invalid.\n * @property {boolean} $pending True if at least one containing control or form is pending.\n * @property {boolean} $submitted True if user has submitted the form even if its invalid.\n *\n * @property {Object} $error Is an object hash, containing references to controls or\n * forms with failing validators, where:\n *\n * - keys are validation tokens (error names),\n * - values are arrays of controls or forms that have a failing validator for given error name.\n *\n * Built-in validation tokens:\n *\n * - `email`\n * - `max`\n * - `maxlength`\n * - `min`\n * - `minlength`\n * - `number`\n * - `pattern`\n * - `required`\n * - `url`\n * - `date`\n * - `datetimelocal`\n * - `time`\n * - `week`\n * - `month`\n *\n * @description\n * `FormController` keeps track of all its controls and nested forms as well as the state of them,\n * such as being valid/invalid or dirty/pristine.\n *\n * Each {@link ng.directive:form form} directive creates an instance\n * of `FormController`.\n *\n */\n//asks for $scope to fool the BC controller module\nFormController.$inject = ['$element', '$attrs', '$scope', '$animate', '$interpolate'];\nfunction FormController(element, attrs, $scope, $animate, $interpolate) {\n var form = this,\n controls = [];\n\n // init state\n form.$error = {};\n form.$$success = {};\n form.$pending = undefined;\n form.$name = $interpolate(attrs.name || attrs.ngForm || '')($scope);\n form.$dirty = false;\n form.$pristine = true;\n form.$valid = true;\n form.$invalid = false;\n form.$submitted = false;\n form.$$parentForm = nullFormCtrl;\n\n /**\n * @ngdoc method\n * @name form.FormController#$rollbackViewValue\n *\n * @description\n * Rollback all form controls pending updates to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. This method is typically needed by the reset button of\n * a form that uses `ng-model-options` to pend updates.\n */\n form.$rollbackViewValue = function() {\n forEach(controls, function(control) {\n control.$rollbackViewValue();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$commitViewValue\n *\n * @description\n * Commit all form controls pending updates to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. This method is rarely needed as `NgModelController`\n * usually handles calling this in response to input events.\n */\n form.$commitViewValue = function() {\n forEach(controls, function(control) {\n control.$commitViewValue();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$addControl\n * @param {object} control control object, either a {@link form.FormController} or an\n * {@link ngModel.NgModelController}\n *\n * @description\n * Register a control with the form. Input elements using ngModelController do this automatically\n * when they are linked.\n *\n * Note that the current state of the control will not be reflected on the new parent form. This\n * is not an issue with normal use, as freshly compiled and linked controls are in a `$pristine`\n * state.\n *\n * However, if the method is used programmatically, for example by adding dynamically created controls,\n * or controls that have been previously removed without destroying their corresponding DOM element,\n * it's the developers responsiblity to make sure the current state propagates to the parent form.\n *\n * For example, if an input control is added that is already `$dirty` and has `$error` properties,\n * calling `$setDirty()` and `$validate()` afterwards will propagate the state to the parent form.\n */\n form.$addControl = function(control) {\n // Breaking change - before, inputs whose name was \"hasOwnProperty\" were quietly ignored\n // and not added to the scope. Now we throw an error.\n assertNotHasOwnProperty(control.$name, 'input');\n controls.push(control);\n\n if (control.$name) {\n form[control.$name] = control;\n }\n\n control.$$parentForm = form;\n };\n\n // Private API: rename a form control\n form.$$renameControl = function(control, newName) {\n var oldName = control.$name;\n\n if (form[oldName] === control) {\n delete form[oldName];\n }\n form[newName] = control;\n control.$name = newName;\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$removeControl\n * @param {object} control control object, either a {@link form.FormController} or an\n * {@link ngModel.NgModelController}\n *\n * @description\n * Deregister a control from the form.\n *\n * Input elements using ngModelController do this automatically when they are destroyed.\n *\n * Note that only the removed control's validation state (`$errors`etc.) will be removed from the\n * form. `$dirty`, `$submitted` states will not be changed, because the expected behavior can be\n * different from case to case. For example, removing the only `$dirty` control from a form may or\n * may not mean that the form is still `$dirty`.\n */\n form.$removeControl = function(control) {\n if (control.$name && form[control.$name] === control) {\n delete form[control.$name];\n }\n forEach(form.$pending, function(value, name) {\n form.$setValidity(name, null, control);\n });\n forEach(form.$error, function(value, name) {\n form.$setValidity(name, null, control);\n });\n forEach(form.$$success, function(value, name) {\n form.$setValidity(name, null, control);\n });\n\n arrayRemove(controls, control);\n control.$$parentForm = nullFormCtrl;\n };\n\n\n /**\n * @ngdoc method\n * @name form.FormController#$setValidity\n *\n * @description\n * Sets the validity of a form control.\n *\n * This method will also propagate to parent forms.\n */\n addSetValidityMethod({\n ctrl: this,\n $element: element,\n set: function(object, property, controller) {\n var list = object[property];\n if (!list) {\n object[property] = [controller];\n } else {\n var index = list.indexOf(controller);\n if (index === -1) {\n list.push(controller);\n }\n }\n },\n unset: function(object, property, controller) {\n var list = object[property];\n if (!list) {\n return;\n }\n arrayRemove(list, controller);\n if (list.length === 0) {\n delete object[property];\n }\n },\n $animate: $animate\n });\n\n /**\n * @ngdoc method\n * @name form.FormController#$setDirty\n *\n * @description\n * Sets the form to a dirty state.\n *\n * This method can be called to add the 'ng-dirty' class and set the form to a dirty\n * state (ng-dirty class). This method will also propagate to parent forms.\n */\n form.$setDirty = function() {\n $animate.removeClass(element, PRISTINE_CLASS);\n $animate.addClass(element, DIRTY_CLASS);\n form.$dirty = true;\n form.$pristine = false;\n form.$$parentForm.$setDirty();\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$setPristine\n *\n * @description\n * Sets the form to its pristine state.\n *\n * This method can be called to remove the 'ng-dirty' class and set the form to its pristine\n * state (ng-pristine class). This method will also propagate to all the controls contained\n * in this form.\n *\n * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after\n * saving or resetting it.\n */\n form.$setPristine = function() {\n $animate.setClass(element, PRISTINE_CLASS, DIRTY_CLASS + ' ' + SUBMITTED_CLASS);\n form.$dirty = false;\n form.$pristine = true;\n form.$submitted = false;\n forEach(controls, function(control) {\n control.$setPristine();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$setUntouched\n *\n * @description\n * Sets the form to its untouched state.\n *\n * This method can be called to remove the 'ng-touched' class and set the form controls to their\n * untouched state (ng-untouched class).\n *\n * Setting a form controls back to their untouched state is often useful when setting the form\n * back to its pristine state.\n */\n form.$setUntouched = function() {\n forEach(controls, function(control) {\n control.$setUntouched();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$setSubmitted\n *\n * @description\n * Sets the form to its submitted state.\n */\n form.$setSubmitted = function() {\n $animate.addClass(element, SUBMITTED_CLASS);\n form.$submitted = true;\n form.$$parentForm.$setSubmitted();\n };\n}\n\n/**\n * @ngdoc directive\n * @name ngForm\n * @restrict EAC\n *\n * @description\n * Nestable alias of {@link ng.directive:form `form`} directive. HTML\n * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a\n * sub-group of controls needs to be determined.\n *\n * Note: the purpose of `ngForm` is to group controls,\n * but not to be a replacement for the `<form>` tag with all of its capabilities\n * (e.g. posting to the server, ...).\n *\n * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into\n * related scope, under this name.\n *\n */\n\n /**\n * @ngdoc directive\n * @name form\n * @restrict E\n *\n * @description\n * Directive that instantiates\n * {@link form.FormController FormController}.\n *\n * If the `name` attribute is specified, the form controller is published onto the current scope under\n * this name.\n *\n * # Alias: {@link ng.directive:ngForm `ngForm`}\n *\n * In Angular, forms can be nested. This means that the outer form is valid when all of the child\n * forms are valid as well. However, browsers do not allow nesting of `<form>` elements, so\n * Angular provides the {@link ng.directive:ngForm `ngForm`} directive, which behaves identically to\n * `form` but can be nested. Nested forms can be useful, for example, if the validity of a sub-group\n * of controls needs to be determined.\n *\n * # CSS classes\n * - `ng-valid` is set if the form is valid.\n * - `ng-invalid` is set if the form is invalid.\n * - `ng-pending` is set if the form is pending.\n * - `ng-pristine` is set if the form is pristine.\n * - `ng-dirty` is set if the form is dirty.\n * - `ng-submitted` is set if the form was submitted.\n *\n * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n *\n *\n * # Submitting a form and preventing the default action\n *\n * Since the role of forms in client-side Angular applications is different than in classical\n * roundtrip apps, it is desirable for the browser not to translate the form submission into a full\n * page reload that sends the data to the server. Instead some javascript logic should be triggered\n * to handle the form submission in an application-specific way.\n *\n * For this reason, Angular prevents the default action (form submission to the server) unless the\n * `<form>` element has an `action` attribute specified.\n *\n * You can use one of the following two ways to specify what javascript method should be called when\n * a form is submitted:\n *\n * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element\n * - {@link ng.directive:ngClick ngClick} directive on the first\n * button or input field of type submit (input[type=submit])\n *\n * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit}\n * or {@link ng.directive:ngClick ngClick} directives.\n * This is because of the following form submission rules in the HTML specification:\n *\n * - If a form has only one input field then hitting enter in this field triggers form submit\n * (`ngSubmit`)\n * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter\n * doesn't trigger submit\n * - if a form has one or more input fields and one or more buttons or input[type=submit] then\n * hitting enter in any of the input fields will trigger the click handler on the *first* button or\n * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)\n *\n * Any pending `ngModelOptions` changes will take place immediately when an enclosing form is\n * submitted. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`\n * to have access to the updated model.\n *\n * ## Animation Hooks\n *\n * Animations in ngForm are triggered when any of the associated CSS classes are added and removed.\n * These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any\n * other validations that are performed within the form. Animations in ngForm are similar to how\n * they work in ngClass and animations can be hooked into using CSS transitions, keyframes as well\n * as JS animations.\n *\n * The following example shows a simple way to utilize CSS transitions to style a form element\n * that has been rendered as invalid after it has been validated:\n *\n * <pre>\n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-form {\n * transition:0.5s linear all;\n * background: white;\n * }\n * .my-form.ng-invalid {\n * background: red;\n * color:white;\n * }\n * </pre>\n *\n * @example\n <example deps=\"angular-animate.js\" animations=\"true\" fixBase=\"true\" module=\"formExample\">\n <file name=\"index.html\">\n <script>\n angular.module('formExample', [])\n .controller('FormController', ['$scope', function($scope) {\n $scope.userType = 'guest';\n }]);\n </script>\n <style>\n .my-form {\n transition:all linear 0.5s;\n background: transparent;\n }\n .my-form.ng-invalid {\n background: red;\n }\n </style>\n <form name=\"myForm\" ng-controller=\"FormController\" class=\"my-form\">\n userType: <input name=\"input\" ng-model=\"userType\" required>\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">Required!</span><br>\n <code>userType = {{userType}}</code><br>\n <code>myForm.input.$valid = {{myForm.input.$valid}}</code><br>\n <code>myForm.input.$error = {{myForm.input.$error}}</code><br>\n <code>myForm.$valid = {{myForm.$valid}}</code><br>\n <code>myForm.$error.required = {{!!myForm.$error.required}}</code><br>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should initialize to model', function() {\n var userType = element(by.binding('userType'));\n var valid = element(by.binding('myForm.input.$valid'));\n\n expect(userType.getText()).toContain('guest');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n var userType = element(by.binding('userType'));\n var valid = element(by.binding('myForm.input.$valid'));\n var userInput = element(by.model('userType'));\n\n userInput.clear();\n userInput.sendKeys('');\n\n expect(userType.getText()).toEqual('userType =');\n expect(valid.getText()).toContain('false');\n });\n </file>\n </example>\n *\n * @param {string=} name Name of the form. If specified, the form controller will be published into\n * related scope, under this name.\n */\nvar formDirectiveFactory = function(isNgForm) {\n return ['$timeout', '$parse', function($timeout, $parse) {\n var formDirective = {\n name: 'form',\n restrict: isNgForm ? 'EAC' : 'E',\n require: ['form', '^^?form'], //first is the form's own ctrl, second is an optional parent form\n controller: FormController,\n compile: function ngFormCompile(formElement, attr) {\n // Setup initial state of the control\n formElement.addClass(PRISTINE_CLASS).addClass(VALID_CLASS);\n\n var nameAttr = attr.name ? 'name' : (isNgForm && attr.ngForm ? 'ngForm' : false);\n\n return {\n pre: function ngFormPreLink(scope, formElement, attr, ctrls) {\n var controller = ctrls[0];\n\n // if `action` attr is not present on the form, prevent the default action (submission)\n if (!('action' in attr)) {\n // we can't use jq events because if a form is destroyed during submission the default\n // action is not prevented. see #1238\n //\n // IE 9 is not affected because it doesn't fire a submit event and try to do a full\n // page reload if the form was destroyed by submission of the form via a click handler\n // on a button in the form. Looks like an IE9 specific bug.\n var handleFormSubmission = function(event) {\n scope.$apply(function() {\n controller.$commitViewValue();\n controller.$setSubmitted();\n });\n\n event.preventDefault();\n };\n\n addEventListenerFn(formElement[0], 'submit', handleFormSubmission);\n\n // unregister the preventDefault listener so that we don't not leak memory but in a\n // way that will achieve the prevention of the default action.\n formElement.on('$destroy', function() {\n $timeout(function() {\n removeEventListenerFn(formElement[0], 'submit', handleFormSubmission);\n }, 0, false);\n });\n }\n\n var parentFormCtrl = ctrls[1] || controller.$$parentForm;\n parentFormCtrl.$addControl(controller);\n\n var setter = nameAttr ? getSetter(controller.$name) : noop;\n\n if (nameAttr) {\n setter(scope, controller);\n attr.$observe(nameAttr, function(newValue) {\n if (controller.$name === newValue) return;\n setter(scope, undefined);\n controller.$$parentForm.$$renameControl(controller, newValue);\n setter = getSetter(controller.$name);\n setter(scope, controller);\n });\n }\n formElement.on('$destroy', function() {\n controller.$$parentForm.$removeControl(controller);\n setter(scope, undefined);\n extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards\n });\n }\n };\n }\n };\n\n return formDirective;\n\n function getSetter(expression) {\n if (expression === '') {\n //create an assignable expression, so forms with an empty name can be renamed later\n return $parse('this[\"\"]').assign;\n }\n return $parse(expression).assign || noop;\n }\n }];\n};\n\nvar formDirective = formDirectiveFactory();\nvar ngFormDirective = formDirectiveFactory(true);\n\n/* global VALID_CLASS: false,\n INVALID_CLASS: false,\n PRISTINE_CLASS: false,\n DIRTY_CLASS: false,\n UNTOUCHED_CLASS: false,\n TOUCHED_CLASS: false,\n ngModelMinErr: false,\n*/\n\n// Regex code is obtained from SO: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231\nvar ISO_DATE_REGEXP = /\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z)/;\n// See valid URLs in RFC3987 (http://tools.ietf.org/html/rfc3987)\n// Note: We are being more lenient, because browsers are too.\n// 1. Scheme\n// 2. Slashes\n// 3. Username\n// 4. Password\n// 5. Hostname\n// 6. Port\n// 7. Path\n// 8. Query\n// 9. Fragment\n// 1111111111111111 222 333333 44444 555555555555555555555555 666 77777777 8888888 999\nvar URL_REGEXP = /^[a-z][a-z\\d.+-]*:\\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\\s:/?#]+|\\[[a-f\\d:]+\\])(?::\\d+)?(?:\\/[^?#]*)?(?:\\?[^#]*)?(?:#.*)?$/i;\nvar EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;\nvar NUMBER_REGEXP = /^\\s*(\\-|\\+)?(\\d+|(\\d*(\\.\\d*)))([eE][+-]?\\d+)?\\s*$/;\nvar DATE_REGEXP = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\nvar DATETIMELOCAL_REGEXP = /^(\\d{4})-(\\d\\d)-(\\d\\d)T(\\d\\d):(\\d\\d)(?::(\\d\\d)(\\.\\d{1,3})?)?$/;\nvar WEEK_REGEXP = /^(\\d{4})-W(\\d\\d)$/;\nvar MONTH_REGEXP = /^(\\d{4})-(\\d\\d)$/;\nvar TIME_REGEXP = /^(\\d\\d):(\\d\\d)(?::(\\d\\d)(\\.\\d{1,3})?)?$/;\n\nvar PARTIAL_VALIDATION_EVENTS = 'keydown wheel mousedown';\nvar PARTIAL_VALIDATION_TYPES = createMap();\nforEach('date,datetime-local,month,time,week'.split(','), function(type) {\n PARTIAL_VALIDATION_TYPES[type] = true;\n});\n\nvar inputType = {\n\n /**\n * @ngdoc input\n * @name input[text]\n *\n * @description\n * Standard HTML text input with angular data binding, inherited by most of the `input` elements.\n *\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Adds `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n * any length.\n * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n * that contains the regular expression body that will be converted to a regular expression\n * as in the ngPattern directive.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match\n * a RegExp found by evaluating the Angular expression given in the attribute value.\n * If the expression evaluates to a RegExp object, then this is used directly.\n * If the expression evaluates to a string, then it will be converted to a RegExp\n * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n * `new RegExp('^abc$')`.<br />\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n * This parameter is ignored for input[type=password] controls, which will never trim the\n * input.\n *\n * @example\n <example name=\"text-input-directive\" module=\"textInputExample\">\n <file name=\"index.html\">\n <script>\n angular.module('textInputExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.example = {\n text: 'guest',\n word: /^\\s*\\w*\\s*$/\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"ExampleController\">\n <label>Single word:\n <input type=\"text\" name=\"input\" ng-model=\"example.text\"\n ng-pattern=\"example.word\" required ng-trim=\"false\">\n </label>\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n Required!</span>\n <span class=\"error\" ng-show=\"myForm.input.$error.pattern\">\n Single word only!</span>\n </div>\n <tt>text = {{example.text}}</tt><br/>\n <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var text = element(by.binding('example.text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('example.text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('guest');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if multi word', function() {\n input.clear();\n input.sendKeys('hello world');\n\n expect(valid.getText()).toContain('false');\n });\n </file>\n </example>\n */\n 'text': textInputType,\n\n /**\n * @ngdoc input\n * @name input[date]\n *\n * @description\n * Input with date validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, text must be entered in a valid ISO-8601\n * date format (yyyy-MM-dd), for example: `2009-01-06`. Since many\n * modern browsers do not yet support this input type, it is important to provide cues to users on the\n * expected input format via a placeholder or label.\n *\n * The model must always be a Date object, otherwise Angular will throw an error.\n * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute\n * (e.g. `min=\"{{minDate | date:'yyyy-MM-dd'}}\"`). Note that `min` will also add native HTML5\n * constraint validation.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be\n * a valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute\n * (e.g. `max=\"{{maxDate | date:'yyyy-MM-dd'}}\"`). Note that `max` will also add native HTML5\n * constraint validation.\n * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO date string\n * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO date string\n * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n <example name=\"date-input-directive\" module=\"dateInputExample\">\n <file name=\"index.html\">\n <script>\n angular.module('dateInputExample', [])\n .controller('DateController', ['$scope', function($scope) {\n $scope.example = {\n value: new Date(2013, 9, 22)\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n <label for=\"exampleInput\">Pick a date in 2013:</label>\n <input type=\"date\" id=\"exampleInput\" name=\"input\" ng-model=\"example.value\"\n placeholder=\"yyyy-MM-dd\" min=\"2013-01-01\" max=\"2013-12-31\" required />\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n Required!</span>\n <span class=\"error\" ng-show=\"myForm.input.$error.date\">\n Not a valid date!</span>\n </div>\n <tt>value = {{example.value | date: \"yyyy-MM-dd\"}}</tt><br/>\n <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var value = element(by.binding('example.value | date: \"yyyy-MM-dd\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('example.value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (see https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-10-22');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01-01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n </file>\n </example>\n */\n 'date': createDateInputType('date', DATE_REGEXP,\n createDateParser(DATE_REGEXP, ['yyyy', 'MM', 'dd']),\n 'yyyy-MM-dd'),\n\n /**\n * @ngdoc input\n * @name input[datetime-local]\n *\n * @description\n * Input with datetime validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * local datetime format (yyyy-MM-ddTHH:mm:ss), for example: `2010-12-28T14:57:00`.\n *\n * The model must always be a Date object, otherwise Angular will throw an error.\n * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation\n * inside this attribute (e.g. `min=\"{{minDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}\"`).\n * Note that `min` will also add native HTML5 constraint validation.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation\n * inside this attribute (e.g. `max=\"{{maxDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}\"`).\n * Note that `max` will also add native HTML5 constraint validation.\n * @param {(date|string)=} ngMin Sets the `min` validation error key to the Date / ISO datetime string\n * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n * @param {(date|string)=} ngMax Sets the `max` validation error key to the Date / ISO datetime string\n * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n <example name=\"datetimelocal-input-directive\" module=\"dateExample\">\n <file name=\"index.html\">\n <script>\n angular.module('dateExample', [])\n .controller('DateController', ['$scope', function($scope) {\n $scope.example = {\n value: new Date(2010, 11, 28, 14, 57)\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n <label for=\"exampleInput\">Pick a date between in 2013:</label>\n <input type=\"datetime-local\" id=\"exampleInput\" name=\"input\" ng-model=\"example.value\"\n placeholder=\"yyyy-MM-ddTHH:mm:ss\" min=\"2001-01-01T00:00:00\" max=\"2013-12-31T00:00:00\" required />\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n Required!</span>\n <span class=\"error\" ng-show=\"myForm.input.$error.datetimelocal\">\n Not a valid date!</span>\n </div>\n <tt>value = {{example.value | date: \"yyyy-MM-ddTHH:mm:ss\"}}</tt><br/>\n <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var value = element(by.binding('example.value | date: \"yyyy-MM-ddTHH:mm:ss\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('example.value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2010-12-28T14:57:00');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01-01T23:59:00');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n </file>\n </example>\n */\n 'datetime-local': createDateInputType('datetimelocal', DATETIMELOCAL_REGEXP,\n createDateParser(DATETIMELOCAL_REGEXP, ['yyyy', 'MM', 'dd', 'HH', 'mm', 'ss', 'sss']),\n 'yyyy-MM-ddTHH:mm:ss.sss'),\n\n /**\n * @ngdoc input\n * @name input[time]\n *\n * @description\n * Input with time validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * local time format (HH:mm:ss), for example: `14:57:00`. Model must be a Date object. This binding will always output a\n * Date object to the model of January 1, 1970, or local date `new Date(1970, 0, 1, HH, mm, ss)`.\n *\n * The model must always be a Date object, otherwise Angular will throw an error.\n * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this\n * attribute (e.g. `min=\"{{minTime | date:'HH:mm:ss'}}\"`). Note that `min` will also add\n * native HTML5 constraint validation.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this\n * attribute (e.g. `max=\"{{maxTime | date:'HH:mm:ss'}}\"`). Note that `max` will also add\n * native HTML5 constraint validation.\n * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO time string the\n * `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO time string the\n * `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n <example name=\"time-input-directive\" module=\"timeExample\">\n <file name=\"index.html\">\n <script>\n angular.module('timeExample', [])\n .controller('DateController', ['$scope', function($scope) {\n $scope.example = {\n value: new Date(1970, 0, 1, 14, 57, 0)\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n <label for=\"exampleInput\">Pick a time between 8am and 5pm:</label>\n <input type=\"time\" id=\"exampleInput\" name=\"input\" ng-model=\"example.value\"\n placeholder=\"HH:mm:ss\" min=\"08:00:00\" max=\"17:00:00\" required />\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n Required!</span>\n <span class=\"error\" ng-show=\"myForm.input.$error.time\">\n Not a valid date!</span>\n </div>\n <tt>value = {{example.value | date: \"HH:mm:ss\"}}</tt><br/>\n <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var value = element(by.binding('example.value | date: \"HH:mm:ss\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('example.value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('14:57:00');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('23:59:00');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n </file>\n </example>\n */\n 'time': createDateInputType('time', TIME_REGEXP,\n createDateParser(TIME_REGEXP, ['HH', 'mm', 'ss', 'sss']),\n 'HH:mm:ss.sss'),\n\n /**\n * @ngdoc input\n * @name input[week]\n *\n * @description\n * Input with week-of-the-year validation and transformation to Date. In browsers that do not yet support\n * the HTML5 week input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * week format (yyyy-W##), for example: `2013-W02`.\n *\n * The model must always be a Date object, otherwise Angular will throw an error.\n * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this\n * attribute (e.g. `min=\"{{minWeek | date:'yyyy-Www'}}\"`). Note that `min` will also add\n * native HTML5 constraint validation.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this\n * attribute (e.g. `max=\"{{maxWeek | date:'yyyy-Www'}}\"`). Note that `max` will also add\n * native HTML5 constraint validation.\n * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string\n * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string\n * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n <example name=\"week-input-directive\" module=\"weekExample\">\n <file name=\"index.html\">\n <script>\n angular.module('weekExample', [])\n .controller('DateController', ['$scope', function($scope) {\n $scope.example = {\n value: new Date(2013, 0, 3)\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n <label>Pick a date between in 2013:\n <input id=\"exampleInput\" type=\"week\" name=\"input\" ng-model=\"example.value\"\n placeholder=\"YYYY-W##\" min=\"2012-W32\"\n max=\"2013-W52\" required />\n </label>\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n Required!</span>\n <span class=\"error\" ng-show=\"myForm.input.$error.week\">\n Not a valid date!</span>\n </div>\n <tt>value = {{example.value | date: \"yyyy-Www\"}}</tt><br/>\n <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var value = element(by.binding('example.value | date: \"yyyy-Www\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('example.value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-W01');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-W01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n </file>\n </example>\n */\n 'week': createDateInputType('week', WEEK_REGEXP, weekParser, 'yyyy-Www'),\n\n /**\n * @ngdoc input\n * @name input[month]\n *\n * @description\n * Input with month validation and transformation. In browsers that do not yet support\n * the HTML5 month input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * month format (yyyy-MM), for example: `2009-01`.\n *\n * The model must always be a Date object, otherwise Angular will throw an error.\n * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n * If the model is not set to the first of the month, the next view to model update will set it\n * to the first of the month.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this\n * attribute (e.g. `min=\"{{minMonth | date:'yyyy-MM'}}\"`). Note that `min` will also add\n * native HTML5 constraint validation.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this\n * attribute (e.g. `max=\"{{maxMonth | date:'yyyy-MM'}}\"`). Note that `max` will also add\n * native HTML5 constraint validation.\n * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string\n * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string\n * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n <example name=\"month-input-directive\" module=\"monthExample\">\n <file name=\"index.html\">\n <script>\n angular.module('monthExample', [])\n .controller('DateController', ['$scope', function($scope) {\n $scope.example = {\n value: new Date(2013, 9, 1)\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n <label for=\"exampleInput\">Pick a month in 2013:</label>\n <input id=\"exampleInput\" type=\"month\" name=\"input\" ng-model=\"example.value\"\n placeholder=\"yyyy-MM\" min=\"2013-01\" max=\"2013-12\" required />\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n Required!</span>\n <span class=\"error\" ng-show=\"myForm.input.$error.month\">\n Not a valid month!</span>\n </div>\n <tt>value = {{example.value | date: \"yyyy-MM\"}}</tt><br/>\n <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var value = element(by.binding('example.value | date: \"yyyy-MM\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('example.value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-10');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n </file>\n </example>\n */\n 'month': createDateInputType('month', MONTH_REGEXP,\n createDateParser(MONTH_REGEXP, ['yyyy', 'MM']),\n 'yyyy-MM'),\n\n /**\n * @ngdoc input\n * @name input[number]\n *\n * @description\n * Text input with number validation and transformation. Sets the `number` validation\n * error if not a valid number.\n *\n * <div class=\"alert alert-warning\">\n * The model must always be of type `number` otherwise Angular will throw an error.\n * Be aware that a string containing a number is not enough. See the {@link ngModel:numfmt}\n * error docs for more information and an example of how to convert your model if necessary.\n * </div>\n *\n * ## Issues with HTML5 constraint validation\n *\n * In browsers that follow the\n * [HTML5 specification](https://html.spec.whatwg.org/multipage/forms.html#number-state-%28type=number%29),\n * `input[number]` does not work as expected with {@link ngModelOptions `ngModelOptions.allowInvalid`}.\n * If a non-number is entered in the input, the browser will report the value as an empty string,\n * which means the view / model values in `ngModel` and subsequently the scope value\n * will also be an empty string.\n *\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n * any length.\n * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n * that contains the regular expression body that will be converted to a regular expression\n * as in the ngPattern directive.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match\n * a RegExp found by evaluating the Angular expression given in the attribute value.\n * If the expression evaluates to a RegExp object, then this is used directly.\n * If the expression evaluates to a string, then it will be converted to a RegExp\n * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n * `new RegExp('^abc$')`.<br />\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n <example name=\"number-input-directive\" module=\"numberExample\">\n <file name=\"index.html\">\n <script>\n angular.module('numberExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.example = {\n value: 12\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"ExampleController\">\n <label>Number:\n <input type=\"number\" name=\"input\" ng-model=\"example.value\"\n min=\"0\" max=\"99\" required>\n </label>\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n Required!</span>\n <span class=\"error\" ng-show=\"myForm.input.$error.number\">\n Not valid number!</span>\n </div>\n <tt>value = {{example.value}}</tt><br/>\n <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var value = element(by.binding('example.value'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('example.value'));\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('12');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if over max', function() {\n input.clear();\n input.sendKeys('123');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('false');\n });\n </file>\n </example>\n */\n 'number': numberInputType,\n\n\n /**\n * @ngdoc input\n * @name input[url]\n *\n * @description\n * Text input with URL validation. Sets the `url` validation error key if the content is not a\n * valid URL.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** `input[url]` uses a regex to validate urls that is derived from the regex\n * used in Chromium. If you need stricter validation, you can use `ng-pattern` or modify\n * the built-in validators (see the {@link guide/forms Forms guide})\n * </div>\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n * any length.\n * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n * that contains the regular expression body that will be converted to a regular expression\n * as in the ngPattern directive.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match\n * a RegExp found by evaluating the Angular expression given in the attribute value.\n * If the expression evaluates to a RegExp object, then this is used directly.\n * If the expression evaluates to a string, then it will be converted to a RegExp\n * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n * `new RegExp('^abc$')`.<br />\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n <example name=\"url-input-directive\" module=\"urlExample\">\n <file name=\"index.html\">\n <script>\n angular.module('urlExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.url = {\n text: 'http://google.com'\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"ExampleController\">\n <label>URL:\n <input type=\"url\" name=\"input\" ng-model=\"url.text\" required>\n <label>\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n Required!</span>\n <span class=\"error\" ng-show=\"myForm.input.$error.url\">\n Not valid url!</span>\n </div>\n <tt>text = {{url.text}}</tt><br/>\n <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n <tt>myForm.$error.url = {{!!myForm.$error.url}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var text = element(by.binding('url.text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('url.text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('http://google.com');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if not url', function() {\n input.clear();\n input.sendKeys('box');\n\n expect(valid.getText()).toContain('false');\n });\n </file>\n </example>\n */\n 'url': urlInputType,\n\n\n /**\n * @ngdoc input\n * @name input[email]\n *\n * @description\n * Text input with email validation. Sets the `email` validation error key if not a valid email\n * address.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** `input[email]` uses a regex to validate email addresses that is derived from the regex\n * used in Chromium. If you need stricter validation (e.g. requiring a top-level domain), you can\n * use `ng-pattern` or modify the built-in validators (see the {@link guide/forms Forms guide})\n * </div>\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n * any length.\n * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n * that contains the regular expression body that will be converted to a regular expression\n * as in the ngPattern directive.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match\n * a RegExp found by evaluating the Angular expression given in the attribute value.\n * If the expression evaluates to a RegExp object, then this is used directly.\n * If the expression evaluates to a string, then it will be converted to a RegExp\n * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n * `new RegExp('^abc$')`.<br />\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n <example name=\"email-input-directive\" module=\"emailExample\">\n <file name=\"index.html\">\n <script>\n angular.module('emailExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.email = {\n text: 'me@example.com'\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"ExampleController\">\n <label>Email:\n <input type=\"email\" name=\"input\" ng-model=\"email.text\" required>\n </label>\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n Required!</span>\n <span class=\"error\" ng-show=\"myForm.input.$error.email\">\n Not valid email!</span>\n </div>\n <tt>text = {{email.text}}</tt><br/>\n <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n <tt>myForm.$error.email = {{!!myForm.$error.email}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var text = element(by.binding('email.text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('email.text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('me@example.com');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if not email', function() {\n input.clear();\n input.sendKeys('xxx');\n\n expect(valid.getText()).toContain('false');\n });\n </file>\n </example>\n */\n 'email': emailInputType,\n\n\n /**\n * @ngdoc input\n * @name input[radio]\n *\n * @description\n * HTML radio button.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string} value The value to which the `ngModel` expression should be set when selected.\n * Note that `value` only supports `string` values, i.e. the scope model needs to be a string,\n * too. Use `ngValue` if you need complex models (`number`, `object`, ...).\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {string} ngValue Angular expression to which `ngModel` will be be set when the radio\n * is selected. Should be used instead of the `value` attribute if you need\n * a non-string `ngModel` (`boolean`, `array`, ...).\n *\n * @example\n <example name=\"radio-input-directive\" module=\"radioExample\">\n <file name=\"index.html\">\n <script>\n angular.module('radioExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.color = {\n name: 'blue'\n };\n $scope.specialValue = {\n \"id\": \"12345\",\n \"value\": \"green\"\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"ExampleController\">\n <label>\n <input type=\"radio\" ng-model=\"color.name\" value=\"red\">\n Red\n </label><br/>\n <label>\n <input type=\"radio\" ng-model=\"color.name\" ng-value=\"specialValue\">\n Green\n </label><br/>\n <label>\n <input type=\"radio\" ng-model=\"color.name\" value=\"blue\">\n Blue\n </label><br/>\n <tt>color = {{color.name | json}}</tt><br/>\n </form>\n Note that `ng-value=\"specialValue\"` sets radio item's value to be the value of `$scope.specialValue`.\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should change state', function() {\n var color = element(by.binding('color.name'));\n\n expect(color.getText()).toContain('blue');\n\n element.all(by.model('color.name')).get(0).click();\n\n expect(color.getText()).toContain('red');\n });\n </file>\n </example>\n */\n 'radio': radioInputType,\n\n\n /**\n * @ngdoc input\n * @name input[checkbox]\n *\n * @description\n * HTML checkbox.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {expression=} ngTrueValue The value to which the expression should be set when selected.\n * @param {expression=} ngFalseValue The value to which the expression should be set when not selected.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n <example name=\"checkbox-input-directive\" module=\"checkboxExample\">\n <file name=\"index.html\">\n <script>\n angular.module('checkboxExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.checkboxModel = {\n value1 : true,\n value2 : 'YES'\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"ExampleController\">\n <label>Value1:\n <input type=\"checkbox\" ng-model=\"checkboxModel.value1\">\n </label><br/>\n <label>Value2:\n <input type=\"checkbox\" ng-model=\"checkboxModel.value2\"\n ng-true-value=\"'YES'\" ng-false-value=\"'NO'\">\n </label><br/>\n <tt>value1 = {{checkboxModel.value1}}</tt><br/>\n <tt>value2 = {{checkboxModel.value2}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should change state', function() {\n var value1 = element(by.binding('checkboxModel.value1'));\n var value2 = element(by.binding('checkboxModel.value2'));\n\n expect(value1.getText()).toContain('true');\n expect(value2.getText()).toContain('YES');\n\n element(by.model('checkboxModel.value1')).click();\n element(by.model('checkboxModel.value2')).click();\n\n expect(value1.getText()).toContain('false');\n expect(value2.getText()).toContain('NO');\n });\n </file>\n </example>\n */\n 'checkbox': checkboxInputType,\n\n 'hidden': noop,\n 'button': noop,\n 'submit': noop,\n 'reset': noop,\n 'file': noop\n};\n\nfunction stringBasedInputType(ctrl) {\n ctrl.$formatters.push(function(value) {\n return ctrl.$isEmpty(value) ? value : value.toString();\n });\n}\n\nfunction textInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n stringBasedInputType(ctrl);\n}\n\nfunction baseInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n var type = lowercase(element[0].type);\n\n // In composition mode, users are still inputing intermediate text buffer,\n // hold the listener until composition is done.\n // More about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent\n if (!$sniffer.android) {\n var composing = false;\n\n element.on('compositionstart', function(data) {\n composing = true;\n });\n\n element.on('compositionend', function() {\n composing = false;\n listener();\n });\n }\n\n var timeout;\n\n var listener = function(ev) {\n if (timeout) {\n $browser.defer.cancel(timeout);\n timeout = null;\n }\n if (composing) return;\n var value = element.val(),\n event = ev && ev.type;\n\n // By default we will trim the value\n // If the attribute ng-trim exists we will avoid trimming\n // If input type is 'password', the value is never trimmed\n if (type !== 'password' && (!attr.ngTrim || attr.ngTrim !== 'false')) {\n value = trim(value);\n }\n\n // If a control is suffering from bad input (due to native validators), browsers discard its\n // value, so it may be necessary to revalidate (by calling $setViewValue again) even if the\n // control's value is the same empty value twice in a row.\n if (ctrl.$viewValue !== value || (value === '' && ctrl.$$hasNativeValidators)) {\n ctrl.$setViewValue(value, event);\n }\n };\n\n // if the browser does support \"input\" event, we are fine - except on IE9 which doesn't fire the\n // input event on backspace, delete or cut\n if ($sniffer.hasEvent('input')) {\n element.on('input', listener);\n } else {\n var deferListener = function(ev, input, origValue) {\n if (!timeout) {\n timeout = $browser.defer(function() {\n timeout = null;\n if (!input || input.value !== origValue) {\n listener(ev);\n }\n });\n }\n };\n\n element.on('keydown', function(event) {\n var key = event.keyCode;\n\n // ignore\n // command modifiers arrows\n if (key === 91 || (15 < key && key < 19) || (37 <= key && key <= 40)) return;\n\n deferListener(event, this, this.value);\n });\n\n // if user modifies input value using context menu in IE, we need \"paste\" and \"cut\" events to catch it\n if ($sniffer.hasEvent('paste')) {\n element.on('paste cut', deferListener);\n }\n }\n\n // if user paste into input using mouse on older browser\n // or form autocomplete on newer browser, we need \"change\" event to catch it\n element.on('change', listener);\n\n // Some native input types (date-family) have the ability to change validity without\n // firing any input/change events.\n // For these event types, when native validators are present and the browser supports the type,\n // check for validity changes on various DOM events.\n if (PARTIAL_VALIDATION_TYPES[type] && ctrl.$$hasNativeValidators && type === attr.type) {\n element.on(PARTIAL_VALIDATION_EVENTS, function(ev) {\n if (!timeout) {\n var validity = this[VALIDITY_STATE_PROPERTY];\n var origBadInput = validity.badInput;\n var origTypeMismatch = validity.typeMismatch;\n timeout = $browser.defer(function() {\n timeout = null;\n if (validity.badInput !== origBadInput || validity.typeMismatch !== origTypeMismatch) {\n listener(ev);\n }\n });\n }\n });\n }\n\n ctrl.$render = function() {\n // Workaround for Firefox validation #12102.\n var value = ctrl.$isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue;\n if (element.val() !== value) {\n element.val(value);\n }\n };\n}\n\nfunction weekParser(isoWeek, existingDate) {\n if (isDate(isoWeek)) {\n return isoWeek;\n }\n\n if (isString(isoWeek)) {\n WEEK_REGEXP.lastIndex = 0;\n var parts = WEEK_REGEXP.exec(isoWeek);\n if (parts) {\n var year = +parts[1],\n week = +parts[2],\n hours = 0,\n minutes = 0,\n seconds = 0,\n milliseconds = 0,\n firstThurs = getFirstThursdayOfYear(year),\n addDays = (week - 1) * 7;\n\n if (existingDate) {\n hours = existingDate.getHours();\n minutes = existingDate.getMinutes();\n seconds = existingDate.getSeconds();\n milliseconds = existingDate.getMilliseconds();\n }\n\n return new Date(year, 0, firstThurs.getDate() + addDays, hours, minutes, seconds, milliseconds);\n }\n }\n\n return NaN;\n}\n\nfunction createDateParser(regexp, mapping) {\n return function(iso, date) {\n var parts, map;\n\n if (isDate(iso)) {\n return iso;\n }\n\n if (isString(iso)) {\n // When a date is JSON'ified to wraps itself inside of an extra\n // set of double quotes. This makes the date parsing code unable\n // to match the date string and parse it as a date.\n if (iso.charAt(0) == '\"' && iso.charAt(iso.length - 1) == '\"') {\n iso = iso.substring(1, iso.length - 1);\n }\n if (ISO_DATE_REGEXP.test(iso)) {\n return new Date(iso);\n }\n regexp.lastIndex = 0;\n parts = regexp.exec(iso);\n\n if (parts) {\n parts.shift();\n if (date) {\n map = {\n yyyy: date.getFullYear(),\n MM: date.getMonth() + 1,\n dd: date.getDate(),\n HH: date.getHours(),\n mm: date.getMinutes(),\n ss: date.getSeconds(),\n sss: date.getMilliseconds() / 1000\n };\n } else {\n map = { yyyy: 1970, MM: 1, dd: 1, HH: 0, mm: 0, ss: 0, sss: 0 };\n }\n\n forEach(parts, function(part, index) {\n if (index < mapping.length) {\n map[mapping[index]] = +part;\n }\n });\n return new Date(map.yyyy, map.MM - 1, map.dd, map.HH, map.mm, map.ss || 0, map.sss * 1000 || 0);\n }\n }\n\n return NaN;\n };\n}\n\nfunction createDateInputType(type, regexp, parseDate, format) {\n return function dynamicDateInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter) {\n badInputChecker(scope, element, attr, ctrl);\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n var timezone = ctrl && ctrl.$options && ctrl.$options.timezone;\n var previousDate;\n\n ctrl.$$parserName = type;\n ctrl.$parsers.push(function(value) {\n if (ctrl.$isEmpty(value)) return null;\n if (regexp.test(value)) {\n // Note: We cannot read ctrl.$modelValue, as there might be a different\n // parser/formatter in the processing chain so that the model\n // contains some different data format!\n var parsedDate = parseDate(value, previousDate);\n if (timezone) {\n parsedDate = convertTimezoneToLocal(parsedDate, timezone);\n }\n return parsedDate;\n }\n return undefined;\n });\n\n ctrl.$formatters.push(function(value) {\n if (value && !isDate(value)) {\n throw ngModelMinErr('datefmt', 'Expected `{0}` to be a date', value);\n }\n if (isValidDate(value)) {\n previousDate = value;\n if (previousDate && timezone) {\n previousDate = convertTimezoneToLocal(previousDate, timezone, true);\n }\n return $filter('date')(value, format, timezone);\n } else {\n previousDate = null;\n return '';\n }\n });\n\n if (isDefined(attr.min) || attr.ngMin) {\n var minVal;\n ctrl.$validators.min = function(value) {\n return !isValidDate(value) || isUndefined(minVal) || parseDate(value) >= minVal;\n };\n attr.$observe('min', function(val) {\n minVal = parseObservedDateValue(val);\n ctrl.$validate();\n });\n }\n\n if (isDefined(attr.max) || attr.ngMax) {\n var maxVal;\n ctrl.$validators.max = function(value) {\n return !isValidDate(value) || isUndefined(maxVal) || parseDate(value) <= maxVal;\n };\n attr.$observe('max', function(val) {\n maxVal = parseObservedDateValue(val);\n ctrl.$validate();\n });\n }\n\n function isValidDate(value) {\n // Invalid Date: getTime() returns NaN\n return value && !(value.getTime && value.getTime() !== value.getTime());\n }\n\n function parseObservedDateValue(val) {\n return isDefined(val) && !isDate(val) ? parseDate(val) || undefined : val;\n }\n };\n}\n\nfunction badInputChecker(scope, element, attr, ctrl) {\n var node = element[0];\n var nativeValidation = ctrl.$$hasNativeValidators = isObject(node.validity);\n if (nativeValidation) {\n ctrl.$parsers.push(function(value) {\n var validity = element.prop(VALIDITY_STATE_PROPERTY) || {};\n // Detect bug in FF35 for input[email] (https://bugzilla.mozilla.org/show_bug.cgi?id=1064430):\n // - also sets validity.badInput (should only be validity.typeMismatch).\n // - see http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#e-mail-state-(type=email)\n // - can ignore this case as we can still read out the erroneous email...\n return validity.badInput && !validity.typeMismatch ? undefined : value;\n });\n }\n}\n\nfunction numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n badInputChecker(scope, element, attr, ctrl);\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n ctrl.$$parserName = 'number';\n ctrl.$parsers.push(function(value) {\n if (ctrl.$isEmpty(value)) return null;\n if (NUMBER_REGEXP.test(value)) return parseFloat(value);\n return undefined;\n });\n\n ctrl.$formatters.push(function(value) {\n if (!ctrl.$isEmpty(value)) {\n if (!isNumber(value)) {\n throw ngModelMinErr('numfmt', 'Expected `{0}` to be a number', value);\n }\n value = value.toString();\n }\n return value;\n });\n\n if (isDefined(attr.min) || attr.ngMin) {\n var minVal;\n ctrl.$validators.min = function(value) {\n return ctrl.$isEmpty(value) || isUndefined(minVal) || value >= minVal;\n };\n\n attr.$observe('min', function(val) {\n if (isDefined(val) && !isNumber(val)) {\n val = parseFloat(val, 10);\n }\n minVal = isNumber(val) && !isNaN(val) ? val : undefined;\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n });\n }\n\n if (isDefined(attr.max) || attr.ngMax) {\n var maxVal;\n ctrl.$validators.max = function(value) {\n return ctrl.$isEmpty(value) || isUndefined(maxVal) || value <= maxVal;\n };\n\n attr.$observe('max', function(val) {\n if (isDefined(val) && !isNumber(val)) {\n val = parseFloat(val, 10);\n }\n maxVal = isNumber(val) && !isNaN(val) ? val : undefined;\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n });\n }\n}\n\nfunction urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n // Note: no badInputChecker here by purpose as `url` is only a validation\n // in browsers, i.e. we can always read out input.value even if it is not valid!\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n stringBasedInputType(ctrl);\n\n ctrl.$$parserName = 'url';\n ctrl.$validators.url = function(modelValue, viewValue) {\n var value = modelValue || viewValue;\n return ctrl.$isEmpty(value) || URL_REGEXP.test(value);\n };\n}\n\nfunction emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n // Note: no badInputChecker here by purpose as `url` is only a validation\n // in browsers, i.e. we can always read out input.value even if it is not valid!\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n stringBasedInputType(ctrl);\n\n ctrl.$$parserName = 'email';\n ctrl.$validators.email = function(modelValue, viewValue) {\n var value = modelValue || viewValue;\n return ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value);\n };\n}\n\nfunction radioInputType(scope, element, attr, ctrl) {\n // make the name unique, if not defined\n if (isUndefined(attr.name)) {\n element.attr('name', nextUid());\n }\n\n var listener = function(ev) {\n if (element[0].checked) {\n ctrl.$setViewValue(attr.value, ev && ev.type);\n }\n };\n\n element.on('click', listener);\n\n ctrl.$render = function() {\n var value = attr.value;\n element[0].checked = (value == ctrl.$viewValue);\n };\n\n attr.$observe('value', ctrl.$render);\n}\n\nfunction parseConstantExpr($parse, context, name, expression, fallback) {\n var parseFn;\n if (isDefined(expression)) {\n parseFn = $parse(expression);\n if (!parseFn.constant) {\n throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' +\n '`{1}`.', name, expression);\n }\n return parseFn(context);\n }\n return fallback;\n}\n\nfunction checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {\n var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true);\n var falseValue = parseConstantExpr($parse, scope, 'ngFalseValue', attr.ngFalseValue, false);\n\n var listener = function(ev) {\n ctrl.$setViewValue(element[0].checked, ev && ev.type);\n };\n\n element.on('click', listener);\n\n ctrl.$render = function() {\n element[0].checked = ctrl.$viewValue;\n };\n\n // Override the standard `$isEmpty` because the $viewValue of an empty checkbox is always set to `false`\n // This is because of the parser below, which compares the `$modelValue` with `trueValue` to convert\n // it to a boolean.\n ctrl.$isEmpty = function(value) {\n return value === false;\n };\n\n ctrl.$formatters.push(function(value) {\n return equals(value, trueValue);\n });\n\n ctrl.$parsers.push(function(value) {\n return value ? trueValue : falseValue;\n });\n}\n\n\n/**\n * @ngdoc directive\n * @name textarea\n * @restrict E\n *\n * @description\n * HTML textarea element control with angular data-binding. The data-binding and validation\n * properties of this element are exactly the same as those of the\n * {@link ng.directive:input input element}.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any\n * length.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match\n * a RegExp found by evaluating the Angular expression given in the attribute value.\n * If the expression evaluates to a RegExp object, then this is used directly.\n * If the expression evaluates to a string, then it will be converted to a RegExp\n * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n * `new RegExp('^abc$')`.<br />\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n */\n\n\n/**\n * @ngdoc directive\n * @name input\n * @restrict E\n *\n * @description\n * HTML input element control. When used together with {@link ngModel `ngModel`}, it provides data-binding,\n * input state control, and validation.\n * Input control follows HTML5 input types and polyfills the HTML5 validation behavior for older browsers.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Not every feature offered is available for all input types.\n * Specifically, data binding and event handling via `ng-model` is unsupported for `input[file]`.\n * </div>\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {boolean=} ngRequired Sets `required` attribute if set to true\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any\n * length.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match\n * a RegExp found by evaluating the Angular expression given in the attribute value.\n * If the expression evaluates to a RegExp object, then this is used directly.\n * If the expression evaluates to a string, then it will be converted to a RegExp\n * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n * `new RegExp('^abc$')`.<br />\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n * This parameter is ignored for input[type=password] controls, which will never trim the\n * input.\n *\n * @example\n <example name=\"input-directive\" module=\"inputExample\">\n <file name=\"index.html\">\n <script>\n angular.module('inputExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.user = {name: 'guest', last: 'visitor'};\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <form name=\"myForm\">\n <label>\n User name:\n <input type=\"text\" name=\"userName\" ng-model=\"user.name\" required>\n </label>\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.userName.$error.required\">\n Required!</span>\n </div>\n <label>\n Last name:\n <input type=\"text\" name=\"lastName\" ng-model=\"user.last\"\n ng-minlength=\"3\" ng-maxlength=\"10\">\n </label>\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.lastName.$error.minlength\">\n Too short!</span>\n <span class=\"error\" ng-show=\"myForm.lastName.$error.maxlength\">\n Too long!</span>\n </div>\n </form>\n <hr>\n <tt>user = {{user}}</tt><br/>\n <tt>myForm.userName.$valid = {{myForm.userName.$valid}}</tt><br/>\n <tt>myForm.userName.$error = {{myForm.userName.$error}}</tt><br/>\n <tt>myForm.lastName.$valid = {{myForm.lastName.$valid}}</tt><br/>\n <tt>myForm.lastName.$error = {{myForm.lastName.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n <tt>myForm.$error.minlength = {{!!myForm.$error.minlength}}</tt><br/>\n <tt>myForm.$error.maxlength = {{!!myForm.$error.maxlength}}</tt><br/>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var user = element(by.exactBinding('user'));\n var userNameValid = element(by.binding('myForm.userName.$valid'));\n var lastNameValid = element(by.binding('myForm.lastName.$valid'));\n var lastNameError = element(by.binding('myForm.lastName.$error'));\n var formValid = element(by.binding('myForm.$valid'));\n var userNameInput = element(by.model('user.name'));\n var userLastInput = element(by.model('user.last'));\n\n it('should initialize to model', function() {\n expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"visitor\"}');\n expect(userNameValid.getText()).toContain('true');\n expect(formValid.getText()).toContain('true');\n });\n\n it('should be invalid if empty when required', function() {\n userNameInput.clear();\n userNameInput.sendKeys('');\n\n expect(user.getText()).toContain('{\"last\":\"visitor\"}');\n expect(userNameValid.getText()).toContain('false');\n expect(formValid.getText()).toContain('false');\n });\n\n it('should be valid if empty when min length is set', function() {\n userLastInput.clear();\n userLastInput.sendKeys('');\n\n expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"\"}');\n expect(lastNameValid.getText()).toContain('true');\n expect(formValid.getText()).toContain('true');\n });\n\n it('should be invalid if less than required min length', function() {\n userLastInput.clear();\n userLastInput.sendKeys('xx');\n\n expect(user.getText()).toContain('{\"name\":\"guest\"}');\n expect(lastNameValid.getText()).toContain('false');\n expect(lastNameError.getText()).toContain('minlength');\n expect(formValid.getText()).toContain('false');\n });\n\n it('should be invalid if longer than max length', function() {\n userLastInput.clear();\n userLastInput.sendKeys('some ridiculously long name');\n\n expect(user.getText()).toContain('{\"name\":\"guest\"}');\n expect(lastNameValid.getText()).toContain('false');\n expect(lastNameError.getText()).toContain('maxlength');\n expect(formValid.getText()).toContain('false');\n });\n </file>\n </example>\n */\nvar inputDirective = ['$browser', '$sniffer', '$filter', '$parse',\n function($browser, $sniffer, $filter, $parse) {\n return {\n restrict: 'E',\n require: ['?ngModel'],\n link: {\n pre: function(scope, element, attr, ctrls) {\n if (ctrls[0]) {\n (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrls[0], $sniffer,\n $browser, $filter, $parse);\n }\n }\n }\n };\n}];\n\n\n\nvar CONSTANT_VALUE_REGEXP = /^(true|false|\\d+)$/;\n/**\n * @ngdoc directive\n * @name ngValue\n *\n * @description\n * Binds the given expression to the value of `<option>` or {@link input[radio] `input[radio]`},\n * so that when the element is selected, the {@link ngModel `ngModel`} of that element is set to\n * the bound value.\n *\n * `ngValue` is useful when dynamically generating lists of radio buttons using\n * {@link ngRepeat `ngRepeat`}, as shown below.\n *\n * Likewise, `ngValue` can be used to generate `<option>` elements for\n * the {@link select `select`} element. In that case however, only strings are supported\n * for the `value `attribute, so the resulting `ngModel` will always be a string.\n * Support for `select` models with non-string values is available via `ngOptions`.\n *\n * @element input\n * @param {string=} ngValue angular expression, whose value will be bound to the `value` attribute\n * of the `input` element\n *\n * @example\n <example name=\"ngValue-directive\" module=\"valueExample\">\n <file name=\"index.html\">\n <script>\n angular.module('valueExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.names = ['pizza', 'unicorns', 'robots'];\n $scope.my = { favorite: 'unicorns' };\n }]);\n </script>\n <form ng-controller=\"ExampleController\">\n <h2>Which is your favorite?</h2>\n <label ng-repeat=\"name in names\" for=\"{{name}}\">\n {{name}}\n <input type=\"radio\"\n ng-model=\"my.favorite\"\n ng-value=\"name\"\n id=\"{{name}}\"\n name=\"favorite\">\n </label>\n <div>You chose {{my.favorite}}</div>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var favorite = element(by.binding('my.favorite'));\n\n it('should initialize to model', function() {\n expect(favorite.getText()).toContain('unicorns');\n });\n it('should bind the values to the inputs', function() {\n element.all(by.model('my.favorite')).get(0).click();\n expect(favorite.getText()).toContain('pizza');\n });\n </file>\n </example>\n */\nvar ngValueDirective = function() {\n return {\n restrict: 'A',\n priority: 100,\n compile: function(tpl, tplAttr) {\n if (CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)) {\n return function ngValueConstantLink(scope, elm, attr) {\n attr.$set('value', scope.$eval(attr.ngValue));\n };\n } else {\n return function ngValueLink(scope, elm, attr) {\n scope.$watch(attr.ngValue, function valueWatchAction(value) {\n attr.$set('value', value);\n });\n };\n }\n }\n };\n};\n\n/**\n * @ngdoc directive\n * @name ngBind\n * @restrict AC\n *\n * @description\n * The `ngBind` attribute tells Angular to replace the text content of the specified HTML element\n * with the value of a given expression, and to update the text content when the value of that\n * expression changes.\n *\n * Typically, you don't use `ngBind` directly, but instead you use the double curly markup like\n * `{{ expression }}` which is similar but less verbose.\n *\n * It is preferable to use `ngBind` instead of `{{ expression }}` if a template is momentarily\n * displayed by the browser in its raw state before Angular compiles it. Since `ngBind` is an\n * element attribute, it makes the bindings invisible to the user while the page is loading.\n *\n * An alternative solution to this problem would be using the\n * {@link ng.directive:ngCloak ngCloak} directive.\n *\n *\n * @element ANY\n * @param {expression} ngBind {@link guide/expression Expression} to evaluate.\n *\n * @example\n * Enter a name in the Live Preview text box; the greeting below the text box changes instantly.\n <example module=\"bindExample\">\n <file name=\"index.html\">\n <script>\n angular.module('bindExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.name = 'Whirled';\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <label>Enter name: <input type=\"text\" ng-model=\"name\"></label><br>\n Hello <span ng-bind=\"name\"></span>!\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-bind', function() {\n var nameInput = element(by.model('name'));\n\n expect(element(by.binding('name')).getText()).toBe('Whirled');\n nameInput.clear();\n nameInput.sendKeys('world');\n expect(element(by.binding('name')).getText()).toBe('world');\n });\n </file>\n </example>\n */\nvar ngBindDirective = ['$compile', function($compile) {\n return {\n restrict: 'AC',\n compile: function ngBindCompile(templateElement) {\n $compile.$$addBindingClass(templateElement);\n return function ngBindLink(scope, element, attr) {\n $compile.$$addBindingInfo(element, attr.ngBind);\n element = element[0];\n scope.$watch(attr.ngBind, function ngBindWatchAction(value) {\n element.textContent = isUndefined(value) ? '' : value;\n });\n };\n }\n };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngBindTemplate\n *\n * @description\n * The `ngBindTemplate` directive specifies that the element\n * text content should be replaced with the interpolation of the template\n * in the `ngBindTemplate` attribute.\n * Unlike `ngBind`, the `ngBindTemplate` can contain multiple `{{` `}}`\n * expressions. This directive is needed since some HTML elements\n * (such as TITLE and OPTION) cannot contain SPAN elements.\n *\n * @element ANY\n * @param {string} ngBindTemplate template of form\n * <tt>{{</tt> <tt>expression</tt> <tt>}}</tt> to eval.\n *\n * @example\n * Try it here: enter text in text box and watch the greeting change.\n <example module=\"bindExample\">\n <file name=\"index.html\">\n <script>\n angular.module('bindExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.salutation = 'Hello';\n $scope.name = 'World';\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <label>Salutation: <input type=\"text\" ng-model=\"salutation\"></label><br>\n <label>Name: <input type=\"text\" ng-model=\"name\"></label><br>\n <pre ng-bind-template=\"{{salutation}} {{name}}!\"></pre>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-bind', function() {\n var salutationElem = element(by.binding('salutation'));\n var salutationInput = element(by.model('salutation'));\n var nameInput = element(by.model('name'));\n\n expect(salutationElem.getText()).toBe('Hello World!');\n\n salutationInput.clear();\n salutationInput.sendKeys('Greetings');\n nameInput.clear();\n nameInput.sendKeys('user');\n\n expect(salutationElem.getText()).toBe('Greetings user!');\n });\n </file>\n </example>\n */\nvar ngBindTemplateDirective = ['$interpolate', '$compile', function($interpolate, $compile) {\n return {\n compile: function ngBindTemplateCompile(templateElement) {\n $compile.$$addBindingClass(templateElement);\n return function ngBindTemplateLink(scope, element, attr) {\n var interpolateFn = $interpolate(element.attr(attr.$attr.ngBindTemplate));\n $compile.$$addBindingInfo(element, interpolateFn.expressions);\n element = element[0];\n attr.$observe('ngBindTemplate', function(value) {\n element.textContent = isUndefined(value) ? '' : value;\n });\n };\n }\n };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngBindHtml\n *\n * @description\n * Evaluates the expression and inserts the resulting HTML into the element in a secure way. By default,\n * the resulting HTML content will be sanitized using the {@link ngSanitize.$sanitize $sanitize} service.\n * To utilize this functionality, ensure that `$sanitize` is available, for example, by including {@link\n * ngSanitize} in your module's dependencies (not in core Angular). In order to use {@link ngSanitize}\n * in your module's dependencies, you need to include \"angular-sanitize.js\" in your application.\n *\n * You may also bypass sanitization for values you know are safe. To do so, bind to\n * an explicitly trusted value via {@link ng.$sce#trustAsHtml $sce.trustAsHtml}. See the example\n * under {@link ng.$sce#show-me-an-example-using-sce- Strict Contextual Escaping (SCE)}.\n *\n * Note: If a `$sanitize` service is unavailable and the bound value isn't explicitly trusted, you\n * will have an exception (instead of an exploit.)\n *\n * @element ANY\n * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.\n *\n * @example\n\n <example module=\"bindHtmlExample\" deps=\"angular-sanitize.js\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <p ng-bind-html=\"myHTML\"></p>\n </div>\n </file>\n\n <file name=\"script.js\">\n angular.module('bindHtmlExample', ['ngSanitize'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.myHTML =\n 'I am an <code>HTML</code>string with ' +\n '<a href=\"#\">links!</a> and other <em>stuff</em>';\n }]);\n </file>\n\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-bind-html', function() {\n expect(element(by.binding('myHTML')).getText()).toBe(\n 'I am an HTMLstring with links! and other stuff');\n });\n </file>\n </example>\n */\nvar ngBindHtmlDirective = ['$sce', '$parse', '$compile', function($sce, $parse, $compile) {\n return {\n restrict: 'A',\n compile: function ngBindHtmlCompile(tElement, tAttrs) {\n var ngBindHtmlGetter = $parse(tAttrs.ngBindHtml);\n var ngBindHtmlWatch = $parse(tAttrs.ngBindHtml, function sceValueOf(val) {\n // Unwrap the value to compare the actual inner safe value, not the wrapper object.\n return $sce.valueOf(val);\n });\n $compile.$$addBindingClass(tElement);\n\n return function ngBindHtmlLink(scope, element, attr) {\n $compile.$$addBindingInfo(element, attr.ngBindHtml);\n\n scope.$watch(ngBindHtmlWatch, function ngBindHtmlWatchAction() {\n // The watched value is the unwrapped value. To avoid re-escaping, use the direct getter.\n var value = ngBindHtmlGetter(scope);\n element.html($sce.getTrustedHtml(value) || '');\n });\n };\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngChange\n *\n * @description\n * Evaluate the given expression when the user changes the input.\n * The expression is evaluated immediately, unlike the JavaScript onchange event\n * which only triggers at the end of a change (usually, when the user leaves the\n * form element or presses the return key).\n *\n * The `ngChange` expression is only evaluated when a change in the input value causes\n * a new value to be committed to the model.\n *\n * It will not be evaluated:\n * * if the value returned from the `$parsers` transformation pipeline has not changed\n * * if the input has continued to be invalid since the model will stay `null`\n * * if the model is changed programmatically and not by a change to the input value\n *\n *\n * Note, this directive requires `ngModel` to be present.\n *\n * @element input\n * @param {expression} ngChange {@link guide/expression Expression} to evaluate upon change\n * in input value.\n *\n * @example\n * <example name=\"ngChange-directive\" module=\"changeExample\">\n * <file name=\"index.html\">\n * <script>\n * angular.module('changeExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.counter = 0;\n * $scope.change = function() {\n * $scope.counter++;\n * };\n * }]);\n * </script>\n * <div ng-controller=\"ExampleController\">\n * <input type=\"checkbox\" ng-model=\"confirmed\" ng-change=\"change()\" id=\"ng-change-example1\" />\n * <input type=\"checkbox\" ng-model=\"confirmed\" id=\"ng-change-example2\" />\n * <label for=\"ng-change-example2\">Confirmed</label><br />\n * <tt>debug = {{confirmed}}</tt><br/>\n * <tt>counter = {{counter}}</tt><br/>\n * </div>\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * var counter = element(by.binding('counter'));\n * var debug = element(by.binding('confirmed'));\n *\n * it('should evaluate the expression if changing from view', function() {\n * expect(counter.getText()).toContain('0');\n *\n * element(by.id('ng-change-example1')).click();\n *\n * expect(counter.getText()).toContain('1');\n * expect(debug.getText()).toContain('true');\n * });\n *\n * it('should not evaluate the expression if changing from model', function() {\n * element(by.id('ng-change-example2')).click();\n\n * expect(counter.getText()).toContain('0');\n * expect(debug.getText()).toContain('true');\n * });\n * </file>\n * </example>\n */\nvar ngChangeDirective = valueFn({\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attr, ctrl) {\n ctrl.$viewChangeListeners.push(function() {\n scope.$eval(attr.ngChange);\n });\n }\n});\n\nfunction classDirective(name, selector) {\n name = 'ngClass' + name;\n return ['$animate', function($animate) {\n return {\n restrict: 'AC',\n link: function(scope, element, attr) {\n var oldVal;\n\n scope.$watch(attr[name], ngClassWatchAction, true);\n\n attr.$observe('class', function(value) {\n ngClassWatchAction(scope.$eval(attr[name]));\n });\n\n\n if (name !== 'ngClass') {\n scope.$watch('$index', function($index, old$index) {\n // jshint bitwise: false\n var mod = $index & 1;\n if (mod !== (old$index & 1)) {\n var classes = arrayClasses(scope.$eval(attr[name]));\n mod === selector ?\n addClasses(classes) :\n removeClasses(classes);\n }\n });\n }\n\n function addClasses(classes) {\n var newClasses = digestClassCounts(classes, 1);\n attr.$addClass(newClasses);\n }\n\n function removeClasses(classes) {\n var newClasses = digestClassCounts(classes, -1);\n attr.$removeClass(newClasses);\n }\n\n function digestClassCounts(classes, count) {\n // Use createMap() to prevent class assumptions involving property\n // names in Object.prototype\n var classCounts = element.data('$classCounts') || createMap();\n var classesToUpdate = [];\n forEach(classes, function(className) {\n if (count > 0 || classCounts[className]) {\n classCounts[className] = (classCounts[className] || 0) + count;\n if (classCounts[className] === +(count > 0)) {\n classesToUpdate.push(className);\n }\n }\n });\n element.data('$classCounts', classCounts);\n return classesToUpdate.join(' ');\n }\n\n function updateClasses(oldClasses, newClasses) {\n var toAdd = arrayDifference(newClasses, oldClasses);\n var toRemove = arrayDifference(oldClasses, newClasses);\n toAdd = digestClassCounts(toAdd, 1);\n toRemove = digestClassCounts(toRemove, -1);\n if (toAdd && toAdd.length) {\n $animate.addClass(element, toAdd);\n }\n if (toRemove && toRemove.length) {\n $animate.removeClass(element, toRemove);\n }\n }\n\n function ngClassWatchAction(newVal) {\n if (selector === true || scope.$index % 2 === selector) {\n var newClasses = arrayClasses(newVal || []);\n if (!oldVal) {\n addClasses(newClasses);\n } else if (!equals(newVal,oldVal)) {\n var oldClasses = arrayClasses(oldVal);\n updateClasses(oldClasses, newClasses);\n }\n }\n if (isArray(newVal)) {\n oldVal = newVal.map(function(v) { return shallowCopy(v); });\n } else {\n oldVal = shallowCopy(newVal);\n }\n }\n }\n };\n\n function arrayDifference(tokens1, tokens2) {\n var values = [];\n\n outer:\n for (var i = 0; i < tokens1.length; i++) {\n var token = tokens1[i];\n for (var j = 0; j < tokens2.length; j++) {\n if (token == tokens2[j]) continue outer;\n }\n values.push(token);\n }\n return values;\n }\n\n function arrayClasses(classVal) {\n var classes = [];\n if (isArray(classVal)) {\n forEach(classVal, function(v) {\n classes = classes.concat(arrayClasses(v));\n });\n return classes;\n } else if (isString(classVal)) {\n return classVal.split(' ');\n } else if (isObject(classVal)) {\n forEach(classVal, function(v, k) {\n if (v) {\n classes = classes.concat(k.split(' '));\n }\n });\n return classes;\n }\n return classVal;\n }\n }];\n}\n\n/**\n * @ngdoc directive\n * @name ngClass\n * @restrict AC\n *\n * @description\n * The `ngClass` directive allows you to dynamically set CSS classes on an HTML element by databinding\n * an expression that represents all classes to be added.\n *\n * The directive operates in three different ways, depending on which of three types the expression\n * evaluates to:\n *\n * 1. If the expression evaluates to a string, the string should be one or more space-delimited class\n * names.\n *\n * 2. If the expression evaluates to an object, then for each key-value pair of the\n * object with a truthy value the corresponding key is used as a class name.\n *\n * 3. If the expression evaluates to an array, each element of the array should either be a string as in\n * type 1 or an object as in type 2. This means that you can mix strings and objects together in an array\n * to give you more control over what CSS classes appear. See the code below for an example of this.\n *\n *\n * The directive won't add duplicate classes if a particular class was already set.\n *\n * When the expression changes, the previously added classes are removed and only then are the\n * new classes added.\n *\n * @animations\n * **add** - happens just before the class is applied to the elements\n *\n * **remove** - happens just before the class is removed from the element\n *\n * @element ANY\n * @param {expression} ngClass {@link guide/expression Expression} to eval. The result\n * of the evaluation can be a string representing space delimited class\n * names, an array, or a map of class names to boolean values. In the case of a map, the\n * names of the properties whose values are truthy will be added as css classes to the\n * element.\n *\n * @example Example that demonstrates basic bindings via ngClass directive.\n <example>\n <file name=\"index.html\">\n <p ng-class=\"{strike: deleted, bold: important, 'has-error': error}\">Map Syntax Example</p>\n <label>\n <input type=\"checkbox\" ng-model=\"deleted\">\n deleted (apply \"strike\" class)\n </label><br>\n <label>\n <input type=\"checkbox\" ng-model=\"important\">\n important (apply \"bold\" class)\n </label><br>\n <label>\n <input type=\"checkbox\" ng-model=\"error\">\n error (apply \"has-error\" class)\n </label>\n <hr>\n <p ng-class=\"style\">Using String Syntax</p>\n <input type=\"text\" ng-model=\"style\"\n placeholder=\"Type: bold strike red\" aria-label=\"Type: bold strike red\">\n <hr>\n <p ng-class=\"[style1, style2, style3]\">Using Array Syntax</p>\n <input ng-model=\"style1\"\n placeholder=\"Type: bold, strike or red\" aria-label=\"Type: bold, strike or red\"><br>\n <input ng-model=\"style2\"\n placeholder=\"Type: bold, strike or red\" aria-label=\"Type: bold, strike or red 2\"><br>\n <input ng-model=\"style3\"\n placeholder=\"Type: bold, strike or red\" aria-label=\"Type: bold, strike or red 3\"><br>\n <hr>\n <p ng-class=\"[style4, {orange: warning}]\">Using Array and Map Syntax</p>\n <input ng-model=\"style4\" placeholder=\"Type: bold, strike\" aria-label=\"Type: bold, strike\"><br>\n <label><input type=\"checkbox\" ng-model=\"warning\"> warning (apply \"orange\" class)</label>\n </file>\n <file name=\"style.css\">\n .strike {\n text-decoration: line-through;\n }\n .bold {\n font-weight: bold;\n }\n .red {\n color: red;\n }\n .has-error {\n color: red;\n background-color: yellow;\n }\n .orange {\n color: orange;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var ps = element.all(by.css('p'));\n\n it('should let you toggle the class', function() {\n\n expect(ps.first().getAttribute('class')).not.toMatch(/bold/);\n expect(ps.first().getAttribute('class')).not.toMatch(/has-error/);\n\n element(by.model('important')).click();\n expect(ps.first().getAttribute('class')).toMatch(/bold/);\n\n element(by.model('error')).click();\n expect(ps.first().getAttribute('class')).toMatch(/has-error/);\n });\n\n it('should let you toggle string example', function() {\n expect(ps.get(1).getAttribute('class')).toBe('');\n element(by.model('style')).clear();\n element(by.model('style')).sendKeys('red');\n expect(ps.get(1).getAttribute('class')).toBe('red');\n });\n\n it('array example should have 3 classes', function() {\n expect(ps.get(2).getAttribute('class')).toBe('');\n element(by.model('style1')).sendKeys('bold');\n element(by.model('style2')).sendKeys('strike');\n element(by.model('style3')).sendKeys('red');\n expect(ps.get(2).getAttribute('class')).toBe('bold strike red');\n });\n\n it('array with map example should have 2 classes', function() {\n expect(ps.last().getAttribute('class')).toBe('');\n element(by.model('style4')).sendKeys('bold');\n element(by.model('warning')).click();\n expect(ps.last().getAttribute('class')).toBe('bold orange');\n });\n </file>\n </example>\n\n ## Animations\n\n The example below demonstrates how to perform animations using ngClass.\n\n <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n <file name=\"index.html\">\n <input id=\"setbtn\" type=\"button\" value=\"set\" ng-click=\"myVar='my-class'\">\n <input id=\"clearbtn\" type=\"button\" value=\"clear\" ng-click=\"myVar=''\">\n <br>\n <span class=\"base-class\" ng-class=\"myVar\">Sample Text</span>\n </file>\n <file name=\"style.css\">\n .base-class {\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n }\n\n .base-class.my-class {\n color: red;\n font-size:3em;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-class', function() {\n expect(element(by.css('.base-class')).getAttribute('class')).not.\n toMatch(/my-class/);\n\n element(by.id('setbtn')).click();\n\n expect(element(by.css('.base-class')).getAttribute('class')).\n toMatch(/my-class/);\n\n element(by.id('clearbtn')).click();\n\n expect(element(by.css('.base-class')).getAttribute('class')).not.\n toMatch(/my-class/);\n });\n </file>\n </example>\n\n\n ## ngClass and pre-existing CSS3 Transitions/Animations\n The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.\n Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder\n any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure\n to view the step by step details of {@link $animate#addClass $animate.addClass} and\n {@link $animate#removeClass $animate.removeClass}.\n */\nvar ngClassDirective = classDirective('', true);\n\n/**\n * @ngdoc directive\n * @name ngClassOdd\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @element ANY\n * @param {expression} ngClassOdd {@link guide/expression Expression} to eval. The result\n * of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n <example>\n <file name=\"index.html\">\n <ol ng-init=\"names=['John', 'Mary', 'Cate', 'Suz']\">\n <li ng-repeat=\"name in names\">\n <span ng-class-odd=\"'odd'\" ng-class-even=\"'even'\">\n {{name}}\n </span>\n </li>\n </ol>\n </file>\n <file name=\"style.css\">\n .odd {\n color: red;\n }\n .even {\n color: blue;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-class-odd and ng-class-even', function() {\n expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n toMatch(/odd/);\n expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n toMatch(/even/);\n });\n </file>\n </example>\n */\nvar ngClassOddDirective = classDirective('Odd', 0);\n\n/**\n * @ngdoc directive\n * @name ngClassEven\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @element ANY\n * @param {expression} ngClassEven {@link guide/expression Expression} to eval. The\n * result of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n <example>\n <file name=\"index.html\">\n <ol ng-init=\"names=['John', 'Mary', 'Cate', 'Suz']\">\n <li ng-repeat=\"name in names\">\n <span ng-class-odd=\"'odd'\" ng-class-even=\"'even'\">\n {{name}} &nbsp; &nbsp; &nbsp;\n </span>\n </li>\n </ol>\n </file>\n <file name=\"style.css\">\n .odd {\n color: red;\n }\n .even {\n color: blue;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-class-odd and ng-class-even', function() {\n expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n toMatch(/odd/);\n expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n toMatch(/even/);\n });\n </file>\n </example>\n */\nvar ngClassEvenDirective = classDirective('Even', 1);\n\n/**\n * @ngdoc directive\n * @name ngCloak\n * @restrict AC\n *\n * @description\n * The `ngCloak` directive is used to prevent the Angular html template from being briefly\n * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this\n * directive to avoid the undesirable flicker effect caused by the html template display.\n *\n * The directive can be applied to the `<body>` element, but the preferred usage is to apply\n * multiple `ngCloak` directives to small portions of the page to permit progressive rendering\n * of the browser view.\n *\n * `ngCloak` works in cooperation with the following css rule embedded within `angular.js` and\n * `angular.min.js`.\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```css\n * [ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {\n * display: none !important;\n * }\n * ```\n *\n * When this css rule is loaded by the browser, all html elements (including their children) that\n * are tagged with the `ngCloak` directive are hidden. When Angular encounters this directive\n * during the compilation of the template it deletes the `ngCloak` element attribute, making\n * the compiled element visible.\n *\n * For the best result, the `angular.js` script must be loaded in the head section of the html\n * document; alternatively, the css rule above must be included in the external stylesheet of the\n * application.\n *\n * @element ANY\n *\n * @example\n <example>\n <file name=\"index.html\">\n <div id=\"template1\" ng-cloak>{{ 'hello' }}</div>\n <div id=\"template2\" class=\"ng-cloak\">{{ 'world' }}</div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should remove the template directive and css class', function() {\n expect($('#template1').getAttribute('ng-cloak')).\n toBeNull();\n expect($('#template2').getAttribute('ng-cloak')).\n toBeNull();\n });\n </file>\n </example>\n *\n */\nvar ngCloakDirective = ngDirective({\n compile: function(element, attr) {\n attr.$set('ngCloak', undefined);\n element.removeClass('ng-cloak');\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngController\n *\n * @description\n * The `ngController` directive attaches a controller class to the view. This is a key aspect of how angular\n * supports the principles behind the Model-View-Controller design pattern.\n *\n * MVC components in angular:\n *\n * * Model — Models are the properties of a scope; scopes are attached to the DOM where scope properties\n * are accessed through bindings.\n * * View — The template (HTML with data bindings) that is rendered into the View.\n * * Controller — The `ngController` directive specifies a Controller class; the class contains business\n * logic behind the application to decorate the scope with functions and values\n *\n * Note that you can also attach controllers to the DOM by declaring it in a route definition\n * via the {@link ngRoute.$route $route} service. A common mistake is to declare the controller\n * again using `ng-controller` in the template itself. This will cause the controller to be attached\n * and executed twice.\n *\n * @element ANY\n * @scope\n * @priority 500\n * @param {expression} ngController Name of a constructor function registered with the current\n * {@link ng.$controllerProvider $controllerProvider} or an {@link guide/expression expression}\n * that on the current scope evaluates to a constructor function.\n *\n * The controller instance can be published into a scope property by specifying\n * `ng-controller=\"as propertyName\"`.\n *\n * If the current `$controllerProvider` is configured to use globals (via\n * {@link ng.$controllerProvider#allowGlobals `$controllerProvider.allowGlobals()` }), this may\n * also be the name of a globally accessible constructor function (not recommended).\n *\n * @example\n * Here is a simple form for editing user contact information. Adding, removing, clearing, and\n * greeting are methods declared on the controller (see source tab). These methods can\n * easily be called from the angular markup. Any changes to the data are automatically reflected\n * in the View without the need for a manual update.\n *\n * Two different declaration styles are included below:\n *\n * * one binds methods and properties directly onto the controller using `this`:\n * `ng-controller=\"SettingsController1 as settings\"`\n * * one injects `$scope` into the controller:\n * `ng-controller=\"SettingsController2\"`\n *\n * The second option is more common in the Angular community, and is generally used in boilerplates\n * and in this guide. However, there are advantages to binding properties directly to the controller\n * and avoiding scope.\n *\n * * Using `controller as` makes it obvious which controller you are accessing in the template when\n * multiple controllers apply to an element.\n * * If you are writing your controllers as classes you have easier access to the properties and\n * methods, which will appear on the scope, from inside the controller code.\n * * Since there is always a `.` in the bindings, you don't have to worry about prototypal\n * inheritance masking primitives.\n *\n * This example demonstrates the `controller as` syntax.\n *\n * <example name=\"ngControllerAs\" module=\"controllerAsExample\">\n * <file name=\"index.html\">\n * <div id=\"ctrl-as-exmpl\" ng-controller=\"SettingsController1 as settings\">\n * <label>Name: <input type=\"text\" ng-model=\"settings.name\"/></label>\n * <button ng-click=\"settings.greet()\">greet</button><br/>\n * Contact:\n * <ul>\n * <li ng-repeat=\"contact in settings.contacts\">\n * <select ng-model=\"contact.type\" aria-label=\"Contact method\" id=\"select_{{$index}}\">\n * <option>phone</option>\n * <option>email</option>\n * </select>\n * <input type=\"text\" ng-model=\"contact.value\" aria-labelledby=\"select_{{$index}}\" />\n * <button ng-click=\"settings.clearContact(contact)\">clear</button>\n * <button ng-click=\"settings.removeContact(contact)\" aria-label=\"Remove\">X</button>\n * </li>\n * <li><button ng-click=\"settings.addContact()\">add</button></li>\n * </ul>\n * </div>\n * </file>\n * <file name=\"app.js\">\n * angular.module('controllerAsExample', [])\n * .controller('SettingsController1', SettingsController1);\n *\n * function SettingsController1() {\n * this.name = \"John Smith\";\n * this.contacts = [\n * {type: 'phone', value: '408 555 1212'},\n * {type: 'email', value: 'john.smith@example.org'} ];\n * }\n *\n * SettingsController1.prototype.greet = function() {\n * alert(this.name);\n * };\n *\n * SettingsController1.prototype.addContact = function() {\n * this.contacts.push({type: 'email', value: 'yourname@example.org'});\n * };\n *\n * SettingsController1.prototype.removeContact = function(contactToRemove) {\n * var index = this.contacts.indexOf(contactToRemove);\n * this.contacts.splice(index, 1);\n * };\n *\n * SettingsController1.prototype.clearContact = function(contact) {\n * contact.type = 'phone';\n * contact.value = '';\n * };\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * it('should check controller as', function() {\n * var container = element(by.id('ctrl-as-exmpl'));\n * expect(container.element(by.model('settings.name'))\n * .getAttribute('value')).toBe('John Smith');\n *\n * var firstRepeat =\n * container.element(by.repeater('contact in settings.contacts').row(0));\n * var secondRepeat =\n * container.element(by.repeater('contact in settings.contacts').row(1));\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('408 555 1212');\n *\n * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('john.smith@example.org');\n *\n * firstRepeat.element(by.buttonText('clear')).click();\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('');\n *\n * container.element(by.buttonText('add')).click();\n *\n * expect(container.element(by.repeater('contact in settings.contacts').row(2))\n * .element(by.model('contact.value'))\n * .getAttribute('value'))\n * .toBe('yourname@example.org');\n * });\n * </file>\n * </example>\n *\n * This example demonstrates the \"attach to `$scope`\" style of controller.\n *\n * <example name=\"ngController\" module=\"controllerExample\">\n * <file name=\"index.html\">\n * <div id=\"ctrl-exmpl\" ng-controller=\"SettingsController2\">\n * <label>Name: <input type=\"text\" ng-model=\"name\"/></label>\n * <button ng-click=\"greet()\">greet</button><br/>\n * Contact:\n * <ul>\n * <li ng-repeat=\"contact in contacts\">\n * <select ng-model=\"contact.type\" id=\"select_{{$index}}\">\n * <option>phone</option>\n * <option>email</option>\n * </select>\n * <input type=\"text\" ng-model=\"contact.value\" aria-labelledby=\"select_{{$index}}\" />\n * <button ng-click=\"clearContact(contact)\">clear</button>\n * <button ng-click=\"removeContact(contact)\">X</button>\n * </li>\n * <li>[ <button ng-click=\"addContact()\">add</button> ]</li>\n * </ul>\n * </div>\n * </file>\n * <file name=\"app.js\">\n * angular.module('controllerExample', [])\n * .controller('SettingsController2', ['$scope', SettingsController2]);\n *\n * function SettingsController2($scope) {\n * $scope.name = \"John Smith\";\n * $scope.contacts = [\n * {type:'phone', value:'408 555 1212'},\n * {type:'email', value:'john.smith@example.org'} ];\n *\n * $scope.greet = function() {\n * alert($scope.name);\n * };\n *\n * $scope.addContact = function() {\n * $scope.contacts.push({type:'email', value:'yourname@example.org'});\n * };\n *\n * $scope.removeContact = function(contactToRemove) {\n * var index = $scope.contacts.indexOf(contactToRemove);\n * $scope.contacts.splice(index, 1);\n * };\n *\n * $scope.clearContact = function(contact) {\n * contact.type = 'phone';\n * contact.value = '';\n * };\n * }\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * it('should check controller', function() {\n * var container = element(by.id('ctrl-exmpl'));\n *\n * expect(container.element(by.model('name'))\n * .getAttribute('value')).toBe('John Smith');\n *\n * var firstRepeat =\n * container.element(by.repeater('contact in contacts').row(0));\n * var secondRepeat =\n * container.element(by.repeater('contact in contacts').row(1));\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('408 555 1212');\n * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('john.smith@example.org');\n *\n * firstRepeat.element(by.buttonText('clear')).click();\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('');\n *\n * container.element(by.buttonText('add')).click();\n *\n * expect(container.element(by.repeater('contact in contacts').row(2))\n * .element(by.model('contact.value'))\n * .getAttribute('value'))\n * .toBe('yourname@example.org');\n * });\n * </file>\n *</example>\n\n */\nvar ngControllerDirective = [function() {\n return {\n restrict: 'A',\n scope: true,\n controller: '@',\n priority: 500\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngCsp\n *\n * @element html\n * @description\n *\n * Angular has some features that can break certain\n * [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) rules.\n *\n * If you intend to implement these rules then you must tell Angular not to use these features.\n *\n * This is necessary when developing things like Google Chrome Extensions or Universal Windows Apps.\n *\n *\n * The following rules affect Angular:\n *\n * * `unsafe-eval`: this rule forbids apps to use `eval` or `Function(string)` generated functions\n * (among other things). Angular makes use of this in the {@link $parse} service to provide a 30%\n * increase in the speed of evaluating Angular expressions.\n *\n * * `unsafe-inline`: this rule forbids apps from inject custom styles into the document. Angular\n * makes use of this to include some CSS rules (e.g. {@link ngCloak} and {@link ngHide}).\n * To make these directives work when a CSP rule is blocking inline styles, you must link to the\n * `angular-csp.css` in your HTML manually.\n *\n * If you do not provide `ngCsp` then Angular tries to autodetect if CSP is blocking unsafe-eval\n * and automatically deactivates this feature in the {@link $parse} service. This autodetection,\n * however, triggers a CSP error to be logged in the console:\n *\n * ```\n * Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of\n * script in the following Content Security Policy directive: \"default-src 'self'\". Note that\n * 'script-src' was not explicitly set, so 'default-src' is used as a fallback.\n * ```\n *\n * This error is harmless but annoying. To prevent the error from showing up, put the `ngCsp`\n * directive on an element of the HTML document that appears before the `<script>` tag that loads\n * the `angular.js` file.\n *\n * *Note: This directive is only available in the `ng-csp` and `data-ng-csp` attribute form.*\n *\n * You can specify which of the CSP related Angular features should be deactivated by providing\n * a value for the `ng-csp` attribute. The options are as follows:\n *\n * * no-inline-style: this stops Angular from injecting CSS styles into the DOM\n *\n * * no-unsafe-eval: this stops Angular from optimising $parse with unsafe eval of strings\n *\n * You can use these values in the following combinations:\n *\n *\n * * No declaration means that Angular will assume that you can do inline styles, but it will do\n * a runtime check for unsafe-eval. E.g. `<body>`. This is backwardly compatible with previous versions\n * of Angular.\n *\n * * A simple `ng-csp` (or `data-ng-csp`) attribute will tell Angular to deactivate both inline\n * styles and unsafe eval. E.g. `<body ng-csp>`. This is backwardly compatible with previous versions\n * of Angular.\n *\n * * Specifying only `no-unsafe-eval` tells Angular that we must not use eval, but that we can inject\n * inline styles. E.g. `<body ng-csp=\"no-unsafe-eval\">`.\n *\n * * Specifying only `no-inline-style` tells Angular that we must not inject styles, but that we can\n * run eval - no automcatic check for unsafe eval will occur. E.g. `<body ng-csp=\"no-inline-style\">`\n *\n * * Specifying both `no-unsafe-eval` and `no-inline-style` tells Angular that we must not inject\n * styles nor use eval, which is the same as an empty: ng-csp.\n * E.g.`<body ng-csp=\"no-inline-style;no-unsafe-eval\">`\n *\n * @example\n * This example shows how to apply the `ngCsp` directive to the `html` tag.\n ```html\n <!doctype html>\n <html ng-app ng-csp>\n ...\n ...\n </html>\n ```\n * @example\n // Note: the suffix `.csp` in the example name triggers\n // csp mode in our http server!\n <example name=\"example.csp\" module=\"cspExample\" ng-csp=\"true\">\n <file name=\"index.html\">\n <div ng-controller=\"MainController as ctrl\">\n <div>\n <button ng-click=\"ctrl.inc()\" id=\"inc\">Increment</button>\n <span id=\"counter\">\n {{ctrl.counter}}\n </span>\n </div>\n\n <div>\n <button ng-click=\"ctrl.evil()\" id=\"evil\">Evil</button>\n <span id=\"evilError\">\n {{ctrl.evilError}}\n </span>\n </div>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('cspExample', [])\n .controller('MainController', function() {\n this.counter = 0;\n this.inc = function() {\n this.counter++;\n };\n this.evil = function() {\n // jshint evil:true\n try {\n eval('1+2');\n } catch (e) {\n this.evilError = e.message;\n }\n };\n });\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var util, webdriver;\n\n var incBtn = element(by.id('inc'));\n var counter = element(by.id('counter'));\n var evilBtn = element(by.id('evil'));\n var evilError = element(by.id('evilError'));\n\n function getAndClearSevereErrors() {\n return browser.manage().logs().get('browser').then(function(browserLog) {\n return browserLog.filter(function(logEntry) {\n return logEntry.level.value > webdriver.logging.Level.WARNING.value;\n });\n });\n }\n\n function clearErrors() {\n getAndClearSevereErrors();\n }\n\n function expectNoErrors() {\n getAndClearSevereErrors().then(function(filteredLog) {\n expect(filteredLog.length).toEqual(0);\n if (filteredLog.length) {\n console.log('browser console errors: ' + util.inspect(filteredLog));\n }\n });\n }\n\n function expectError(regex) {\n getAndClearSevereErrors().then(function(filteredLog) {\n var found = false;\n filteredLog.forEach(function(log) {\n if (log.message.match(regex)) {\n found = true;\n }\n });\n if (!found) {\n throw new Error('expected an error that matches ' + regex);\n }\n });\n }\n\n beforeEach(function() {\n util = require('util');\n webdriver = require('protractor/node_modules/selenium-webdriver');\n });\n\n // For now, we only test on Chrome,\n // as Safari does not load the page with Protractor's injected scripts,\n // and Firefox webdriver always disables content security policy (#6358)\n if (browser.params.browser !== 'chrome') {\n return;\n }\n\n it('should not report errors when the page is loaded', function() {\n // clear errors so we are not dependent on previous tests\n clearErrors();\n // Need to reload the page as the page is already loaded when\n // we come here\n browser.driver.getCurrentUrl().then(function(url) {\n browser.get(url);\n });\n expectNoErrors();\n });\n\n it('should evaluate expressions', function() {\n expect(counter.getText()).toEqual('0');\n incBtn.click();\n expect(counter.getText()).toEqual('1');\n expectNoErrors();\n });\n\n it('should throw and report an error when using \"eval\"', function() {\n evilBtn.click();\n expect(evilError.getText()).toMatch(/Content Security Policy/);\n expectError(/Content Security Policy/);\n });\n </file>\n </example>\n */\n\n// ngCsp is not implemented as a proper directive any more, because we need it be processed while we\n// bootstrap the system (before $parse is instantiated), for this reason we just have\n// the csp() fn that looks for the `ng-csp` attribute anywhere in the current doc\n\n/**\n * @ngdoc directive\n * @name ngClick\n *\n * @description\n * The ngClick directive allows you to specify custom behavior when\n * an element is clicked.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon\n * click. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example>\n <file name=\"index.html\">\n <button ng-click=\"count = count + 1\" ng-init=\"count=0\">\n Increment\n </button>\n <span>\n count: {{count}}\n </span>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-click', function() {\n expect(element(by.binding('count')).getText()).toMatch('0');\n element(by.css('button')).click();\n expect(element(by.binding('count')).getText()).toMatch('1');\n });\n </file>\n </example>\n */\n/*\n * A collection of directives that allows creation of custom event handlers that are defined as\n * angular expressions and are compiled and executed within the current scope.\n */\nvar ngEventDirectives = {};\n\n// For events that might fire synchronously during DOM manipulation\n// we need to execute their event handlers asynchronously using $evalAsync,\n// so that they are not executed in an inconsistent state.\nvar forceAsyncEvents = {\n 'blur': true,\n 'focus': true\n};\nforEach(\n 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),\n function(eventName) {\n var directiveName = directiveNormalize('ng-' + eventName);\n ngEventDirectives[directiveName] = ['$parse', '$rootScope', function($parse, $rootScope) {\n return {\n restrict: 'A',\n compile: function($element, attr) {\n // We expose the powerful $event object on the scope that provides access to the Window,\n // etc. that isn't protected by the fast paths in $parse. We explicitly request better\n // checks at the cost of speed since event handler expressions are not executed as\n // frequently as regular change detection.\n var fn = $parse(attr[directiveName], /* interceptorFn */ null, /* expensiveChecks */ true);\n return function ngEventHandler(scope, element) {\n element.on(eventName, function(event) {\n var callback = function() {\n fn(scope, {$event:event});\n };\n if (forceAsyncEvents[eventName] && $rootScope.$$phase) {\n scope.$evalAsync(callback);\n } else {\n scope.$apply(callback);\n }\n });\n };\n }\n };\n }];\n }\n);\n\n/**\n * @ngdoc directive\n * @name ngDblclick\n *\n * @description\n * The `ngDblclick` directive allows you to specify custom behavior on a dblclick event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon\n * a dblclick. (The Event object is available as `$event`)\n *\n * @example\n <example>\n <file name=\"index.html\">\n <button ng-dblclick=\"count = count + 1\" ng-init=\"count=0\">\n Increment (on double click)\n </button>\n count: {{count}}\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMousedown\n *\n * @description\n * The ngMousedown directive allows you to specify custom behavior on mousedown event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon\n * mousedown. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example>\n <file name=\"index.html\">\n <button ng-mousedown=\"count = count + 1\" ng-init=\"count=0\">\n Increment (on mouse down)\n </button>\n count: {{count}}\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseup\n *\n * @description\n * Specify custom behavior on mouseup event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon\n * mouseup. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example>\n <file name=\"index.html\">\n <button ng-mouseup=\"count = count + 1\" ng-init=\"count=0\">\n Increment (on mouse up)\n </button>\n count: {{count}}\n </file>\n </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngMouseover\n *\n * @description\n * Specify custom behavior on mouseover event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon\n * mouseover. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example>\n <file name=\"index.html\">\n <button ng-mouseover=\"count = count + 1\" ng-init=\"count=0\">\n Increment (when mouse is over)\n </button>\n count: {{count}}\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseenter\n *\n * @description\n * Specify custom behavior on mouseenter event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon\n * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example>\n <file name=\"index.html\">\n <button ng-mouseenter=\"count = count + 1\" ng-init=\"count=0\">\n Increment (when mouse enters)\n </button>\n count: {{count}}\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseleave\n *\n * @description\n * Specify custom behavior on mouseleave event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon\n * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example>\n <file name=\"index.html\">\n <button ng-mouseleave=\"count = count + 1\" ng-init=\"count=0\">\n Increment (when mouse leaves)\n </button>\n count: {{count}}\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMousemove\n *\n * @description\n * Specify custom behavior on mousemove event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon\n * mousemove. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example>\n <file name=\"index.html\">\n <button ng-mousemove=\"count = count + 1\" ng-init=\"count=0\">\n Increment (when mouse moves)\n </button>\n count: {{count}}\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeydown\n *\n * @description\n * Specify custom behavior on keydown event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon\n * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n <example>\n <file name=\"index.html\">\n <input ng-keydown=\"count = count + 1\" ng-init=\"count=0\">\n key down count: {{count}}\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeyup\n *\n * @description\n * Specify custom behavior on keyup event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon\n * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n <example>\n <file name=\"index.html\">\n <p>Typing in the input box below updates the key count</p>\n <input ng-keyup=\"count = count + 1\" ng-init=\"count=0\"> key up count: {{count}}\n\n <p>Typing in the input box below updates the keycode</p>\n <input ng-keyup=\"event=$event\">\n <p>event keyCode: {{ event.keyCode }}</p>\n <p>event altKey: {{ event.altKey }}</p>\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeypress\n *\n * @description\n * Specify custom behavior on keypress event.\n *\n * @element ANY\n * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon\n * keypress. ({@link guide/expression#-event- Event object is available as `$event`}\n * and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n <example>\n <file name=\"index.html\">\n <input ng-keypress=\"count = count + 1\" ng-init=\"count=0\">\n key press count: {{count}}\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngSubmit\n *\n * @description\n * Enables binding angular expressions to onsubmit events.\n *\n * Additionally it prevents the default action (which for form means sending the request to the\n * server and reloading the current page), but only if the form does not contain `action`,\n * `data-action`, or `x-action` attributes.\n *\n * <div class=\"alert alert-warning\">\n * **Warning:** Be careful not to cause \"double-submission\" by using both the `ngClick` and\n * `ngSubmit` handlers together. See the\n * {@link form#submitting-a-form-and-preventing-the-default-action `form` directive documentation}\n * for a detailed discussion of when `ngSubmit` may be triggered.\n * </div>\n *\n * @element form\n * @priority 0\n * @param {expression} ngSubmit {@link guide/expression Expression} to eval.\n * ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example module=\"submitExample\">\n <file name=\"index.html\">\n <script>\n angular.module('submitExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.list = [];\n $scope.text = 'hello';\n $scope.submit = function() {\n if ($scope.text) {\n $scope.list.push(this.text);\n $scope.text = '';\n }\n };\n }]);\n </script>\n <form ng-submit=\"submit()\" ng-controller=\"ExampleController\">\n Enter text and hit enter:\n <input type=\"text\" ng-model=\"text\" name=\"text\" />\n <input type=\"submit\" id=\"submit\" value=\"Submit\" />\n <pre>list={{list}}</pre>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-submit', function() {\n expect(element(by.binding('list')).getText()).toBe('list=[]');\n element(by.css('#submit')).click();\n expect(element(by.binding('list')).getText()).toContain('hello');\n expect(element(by.model('text')).getAttribute('value')).toBe('');\n });\n it('should ignore empty strings', function() {\n expect(element(by.binding('list')).getText()).toBe('list=[]');\n element(by.css('#submit')).click();\n element(by.css('#submit')).click();\n expect(element(by.binding('list')).getText()).toContain('hello');\n });\n </file>\n </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngFocus\n *\n * @description\n * Specify custom behavior on focus event.\n *\n * Note: As the `focus` event is executed synchronously when calling `input.focus()`\n * AngularJS executes the expression using `scope.$evalAsync` if the event is fired\n * during an `$apply` to ensure a consistent state.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon\n * focus. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ngBlur\n *\n * @description\n * Specify custom behavior on blur event.\n *\n * A [blur event](https://developer.mozilla.org/en-US/docs/Web/Events/blur) fires when\n * an element has lost focus.\n *\n * Note: As the `blur` event is executed synchronously also during DOM manipulations\n * (e.g. removing a focussed input),\n * AngularJS executes the expression using `scope.$evalAsync` if the event is fired\n * during an `$apply` to ensure a consistent state.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon\n * blur. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ngCopy\n *\n * @description\n * Specify custom behavior on copy event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon\n * copy. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example>\n <file name=\"index.html\">\n <input ng-copy=\"copied=true\" ng-init=\"copied=false; value='copy me'\" ng-model=\"value\">\n copied: {{copied}}\n </file>\n </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngCut\n *\n * @description\n * Specify custom behavior on cut event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon\n * cut. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example>\n <file name=\"index.html\">\n <input ng-cut=\"cut=true\" ng-init=\"cut=false; value='cut me'\" ng-model=\"value\">\n cut: {{cut}}\n </file>\n </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngPaste\n *\n * @description\n * Specify custom behavior on paste event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon\n * paste. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example>\n <file name=\"index.html\">\n <input ng-paste=\"paste=true\" ng-init=\"paste=false\" placeholder='paste here'>\n pasted: {{paste}}\n </file>\n </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngIf\n * @restrict A\n * @multiElement\n *\n * @description\n * The `ngIf` directive removes or recreates a portion of the DOM tree based on an\n * {expression}. If the expression assigned to `ngIf` evaluates to a false\n * value then the element is removed from the DOM, otherwise a clone of the\n * element is reinserted into the DOM.\n *\n * `ngIf` differs from `ngShow` and `ngHide` in that `ngIf` completely removes and recreates the\n * element in the DOM rather than changing its visibility via the `display` css property. A common\n * case when this difference is significant is when using css selectors that rely on an element's\n * position within the DOM, such as the `:first-child` or `:last-child` pseudo-classes.\n *\n * Note that when an element is removed using `ngIf` its scope is destroyed and a new scope\n * is created when the element is restored. The scope created within `ngIf` inherits from\n * its parent scope using\n * [prototypal inheritance](https://github.com/angular/angular.js/wiki/Understanding-Scopes#javascript-prototypal-inheritance).\n * An important implication of this is if `ngModel` is used within `ngIf` to bind to\n * a javascript primitive defined in the parent scope. In this case any modifications made to the\n * variable within the child scope will override (hide) the value in the parent scope.\n *\n * Also, `ngIf` recreates elements using their compiled state. An example of this behavior\n * is if an element's class attribute is directly modified after it's compiled, using something like\n * jQuery's `.addClass()` method, and the element is later removed. When `ngIf` recreates the element\n * the added class will be lost because the original compiled state is used to regenerate the element.\n *\n * Additionally, you can provide animations via the `ngAnimate` module to animate the `enter`\n * and `leave` effects.\n *\n * @animations\n * enter - happens just after the `ngIf` contents change and a new DOM element is created and injected into the `ngIf` container\n * leave - happens just before the `ngIf` contents are removed from the DOM\n *\n * @element ANY\n * @scope\n * @priority 600\n * @param {expression} ngIf If the {@link guide/expression expression} is falsy then\n * the element is removed from the DOM tree. If it is truthy a copy of the compiled\n * element is added to the DOM tree.\n *\n * @example\n <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n <file name=\"index.html\">\n <label>Click me: <input type=\"checkbox\" ng-model=\"checked\" ng-init=\"checked=true\" /></label><br/>\n Show when checked:\n <span ng-if=\"checked\" class=\"animate-if\">\n This is removed when the checkbox is unchecked.\n </span>\n </file>\n <file name=\"animations.css\">\n .animate-if {\n background:white;\n border:1px solid black;\n padding:10px;\n }\n\n .animate-if.ng-enter, .animate-if.ng-leave {\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n }\n\n .animate-if.ng-enter,\n .animate-if.ng-leave.ng-leave-active {\n opacity:0;\n }\n\n .animate-if.ng-leave,\n .animate-if.ng-enter.ng-enter-active {\n opacity:1;\n }\n </file>\n </example>\n */\nvar ngIfDirective = ['$animate', function($animate) {\n return {\n multiElement: true,\n transclude: 'element',\n priority: 600,\n terminal: true,\n restrict: 'A',\n $$tlb: true,\n link: function($scope, $element, $attr, ctrl, $transclude) {\n var block, childScope, previousElements;\n $scope.$watch($attr.ngIf, function ngIfWatchAction(value) {\n\n if (value) {\n if (!childScope) {\n $transclude(function(clone, newScope) {\n childScope = newScope;\n clone[clone.length++] = document.createComment(' end ngIf: ' + $attr.ngIf + ' ');\n // Note: We only need the first/last node of the cloned nodes.\n // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n // by a directive with templateUrl when its template arrives.\n block = {\n clone: clone\n };\n $animate.enter(clone, $element.parent(), $element);\n });\n }\n } else {\n if (previousElements) {\n previousElements.remove();\n previousElements = null;\n }\n if (childScope) {\n childScope.$destroy();\n childScope = null;\n }\n if (block) {\n previousElements = getBlockNodes(block.clone);\n $animate.leave(previousElements).then(function() {\n previousElements = null;\n });\n block = null;\n }\n }\n });\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngInclude\n * @restrict ECA\n *\n * @description\n * Fetches, compiles and includes an external HTML fragment.\n *\n * By default, the template URL is restricted to the same domain and protocol as the\n * application document. This is done by calling {@link $sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols\n * you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist them} or\n * {@link $sce#trustAsResourceUrl wrap them} as trusted values. Refer to Angular's {@link\n * ng.$sce Strict Contextual Escaping}.\n *\n * In addition, the browser's\n * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n * policy may further restrict whether the template is successfully loaded.\n * For example, `ngInclude` won't work for cross-domain requests on all browsers and for `file://`\n * access on some browsers.\n *\n * @animations\n * enter - animation is used to bring new content into the browser.\n * leave - animation is used to animate existing content away.\n *\n * The enter and leave animation occur concurrently.\n *\n * @scope\n * @priority 400\n *\n * @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant,\n * make sure you wrap it in **single** quotes, e.g. `src=\"'myPartialTemplate.html'\"`.\n * @param {string=} onload Expression to evaluate when a new partial is loaded.\n * <div class=\"alert alert-warning\">\n * **Note:** When using onload on SVG elements in IE11, the browser will try to call\n * a function with the name on the window element, which will usually throw a\n * \"function is undefined\" error. To fix this, you can instead use `data-onload` or a\n * different form that {@link guide/directive#normalization matches} `onload`.\n * </div>\n *\n * @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll\n * $anchorScroll} to scroll the viewport after the content is loaded.\n *\n * - If the attribute is not set, disable scrolling.\n * - If the attribute is set without value, enable scrolling.\n * - Otherwise enable scrolling only if the expression evaluates to truthy value.\n *\n * @example\n <example module=\"includeExample\" deps=\"angular-animate.js\" animations=\"true\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <select ng-model=\"template\" ng-options=\"t.name for t in templates\">\n <option value=\"\">(blank)</option>\n </select>\n url of the template: <code>{{template.url}}</code>\n <hr/>\n <div class=\"slide-animate-container\">\n <div class=\"slide-animate\" ng-include=\"template.url\"></div>\n </div>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('includeExample', ['ngAnimate'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.templates =\n [ { name: 'template1.html', url: 'template1.html'},\n { name: 'template2.html', url: 'template2.html'} ];\n $scope.template = $scope.templates[0];\n }]);\n </file>\n <file name=\"template1.html\">\n Content of template1.html\n </file>\n <file name=\"template2.html\">\n Content of template2.html\n </file>\n <file name=\"animations.css\">\n .slide-animate-container {\n position:relative;\n background:white;\n border:1px solid black;\n height:40px;\n overflow:hidden;\n }\n\n .slide-animate {\n padding:10px;\n }\n\n .slide-animate.ng-enter, .slide-animate.ng-leave {\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n position:absolute;\n top:0;\n left:0;\n right:0;\n bottom:0;\n display:block;\n padding:10px;\n }\n\n .slide-animate.ng-enter {\n top:-50px;\n }\n .slide-animate.ng-enter.ng-enter-active {\n top:0;\n }\n\n .slide-animate.ng-leave {\n top:0;\n }\n .slide-animate.ng-leave.ng-leave-active {\n top:50px;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var templateSelect = element(by.model('template'));\n var includeElem = element(by.css('[ng-include]'));\n\n it('should load template1.html', function() {\n expect(includeElem.getText()).toMatch(/Content of template1.html/);\n });\n\n it('should load template2.html', function() {\n if (browser.params.browser == 'firefox') {\n // Firefox can't handle using selects\n // See https://github.com/angular/protractor/issues/480\n return;\n }\n templateSelect.click();\n templateSelect.all(by.css('option')).get(2).click();\n expect(includeElem.getText()).toMatch(/Content of template2.html/);\n });\n\n it('should change to blank', function() {\n if (browser.params.browser == 'firefox') {\n // Firefox can't handle using selects\n return;\n }\n templateSelect.click();\n templateSelect.all(by.css('option')).get(0).click();\n expect(includeElem.isPresent()).toBe(false);\n });\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentRequested\n * @eventType emit on the scope ngInclude was declared in\n * @description\n * Emitted every time the ngInclude content is requested.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentLoaded\n * @eventType emit on the current ngInclude scope\n * @description\n * Emitted every time the ngInclude content is reloaded.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentError\n * @eventType emit on the scope ngInclude was declared in\n * @description\n * Emitted when a template HTTP request yields an erroneous response (status < 200 || status > 299)\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\nvar ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate',\n function($templateRequest, $anchorScroll, $animate) {\n return {\n restrict: 'ECA',\n priority: 400,\n terminal: true,\n transclude: 'element',\n controller: angular.noop,\n compile: function(element, attr) {\n var srcExp = attr.ngInclude || attr.src,\n onloadExp = attr.onload || '',\n autoScrollExp = attr.autoscroll;\n\n return function(scope, $element, $attr, ctrl, $transclude) {\n var changeCounter = 0,\n currentScope,\n previousElement,\n currentElement;\n\n var cleanupLastIncludeContent = function() {\n if (previousElement) {\n previousElement.remove();\n previousElement = null;\n }\n if (currentScope) {\n currentScope.$destroy();\n currentScope = null;\n }\n if (currentElement) {\n $animate.leave(currentElement).then(function() {\n previousElement = null;\n });\n previousElement = currentElement;\n currentElement = null;\n }\n };\n\n scope.$watch(srcExp, function ngIncludeWatchAction(src) {\n var afterAnimation = function() {\n if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {\n $anchorScroll();\n }\n };\n var thisChangeId = ++changeCounter;\n\n if (src) {\n //set the 2nd param to true to ignore the template request error so that the inner\n //contents and scope can be cleaned up.\n $templateRequest(src, true).then(function(response) {\n if (scope.$$destroyed) return;\n\n if (thisChangeId !== changeCounter) return;\n var newScope = scope.$new();\n ctrl.template = response;\n\n // Note: This will also link all children of ng-include that were contained in the original\n // html. If that content contains controllers, ... they could pollute/change the scope.\n // However, using ng-include on an element with additional content does not make sense...\n // Note: We can't remove them in the cloneAttchFn of $transclude as that\n // function is called before linking the content, which would apply child\n // directives to non existing elements.\n var clone = $transclude(newScope, function(clone) {\n cleanupLastIncludeContent();\n $animate.enter(clone, null, $element).then(afterAnimation);\n });\n\n currentScope = newScope;\n currentElement = clone;\n\n currentScope.$emit('$includeContentLoaded', src);\n scope.$eval(onloadExp);\n }, function() {\n if (scope.$$destroyed) return;\n\n if (thisChangeId === changeCounter) {\n cleanupLastIncludeContent();\n scope.$emit('$includeContentError', src);\n }\n });\n scope.$emit('$includeContentRequested', src);\n } else {\n cleanupLastIncludeContent();\n ctrl.template = null;\n }\n });\n };\n }\n };\n}];\n\n// This directive is called during the $transclude call of the first `ngInclude` directive.\n// It will replace and compile the content of the element with the loaded template.\n// We need this directive so that the element content is already filled when\n// the link function of another directive on the same element as ngInclude\n// is called.\nvar ngIncludeFillContentDirective = ['$compile',\n function($compile) {\n return {\n restrict: 'ECA',\n priority: -400,\n require: 'ngInclude',\n link: function(scope, $element, $attr, ctrl) {\n if (/SVG/.test($element[0].toString())) {\n // WebKit: https://bugs.webkit.org/show_bug.cgi?id=135698 --- SVG elements do not\n // support innerHTML, so detect this here and try to generate the contents\n // specially.\n $element.empty();\n $compile(jqLiteBuildFragment(ctrl.template, document).childNodes)(scope,\n function namespaceAdaptedClone(clone) {\n $element.append(clone);\n }, {futureParentElement: $element});\n return;\n }\n\n $element.html(ctrl.template);\n $compile($element.contents())(scope);\n }\n };\n }];\n\n/**\n * @ngdoc directive\n * @name ngInit\n * @restrict AC\n *\n * @description\n * The `ngInit` directive allows you to evaluate an expression in the\n * current scope.\n *\n * <div class=\"alert alert-danger\">\n * This directive can be abused to add unnecessary amounts of logic into your templates.\n * There are only a few appropriate uses of `ngInit`, such as for aliasing special properties of\n * {@link ng.directive:ngRepeat `ngRepeat`}, as seen in the demo below; and for injecting data via\n * server side scripting. Besides these few cases, you should use {@link guide/controller controllers}\n * rather than `ngInit` to initialize values on a scope.\n * </div>\n *\n * <div class=\"alert alert-warning\">\n * **Note**: If you have assignment in `ngInit` along with a {@link ng.$filter `filter`}, make\n * sure you have parentheses to ensure correct operator precedence:\n * <pre class=\"prettyprint\">\n * `<div ng-init=\"test1 = ($index | toString)\"></div>`\n * </pre>\n * </div>\n *\n * @priority 450\n *\n * @element ANY\n * @param {expression} ngInit {@link guide/expression Expression} to eval.\n *\n * @example\n <example module=\"initExample\">\n <file name=\"index.html\">\n <script>\n angular.module('initExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.list = [['a', 'b'], ['c', 'd']];\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <div ng-repeat=\"innerList in list\" ng-init=\"outerIndex = $index\">\n <div ng-repeat=\"value in innerList\" ng-init=\"innerIndex = $index\">\n <span class=\"example-init\">list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};</span>\n </div>\n </div>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should alias index positions', function() {\n var elements = element.all(by.css('.example-init'));\n expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;');\n expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;');\n expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;');\n expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;');\n });\n </file>\n </example>\n */\nvar ngInitDirective = ngDirective({\n priority: 450,\n compile: function() {\n return {\n pre: function(scope, element, attrs) {\n scope.$eval(attrs.ngInit);\n }\n };\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngList\n *\n * @description\n * Text input that converts between a delimited string and an array of strings. The default\n * delimiter is a comma followed by a space - equivalent to `ng-list=\", \"`. You can specify a custom\n * delimiter as the value of the `ngList` attribute - for example, `ng-list=\" | \"`.\n *\n * The behaviour of the directive is affected by the use of the `ngTrim` attribute.\n * * If `ngTrim` is set to `\"false\"` then whitespace around both the separator and each\n * list item is respected. This implies that the user of the directive is responsible for\n * dealing with whitespace but also allows you to use whitespace as a delimiter, such as a\n * tab or newline character.\n * * Otherwise whitespace around the delimiter is ignored when splitting (although it is respected\n * when joining the list items back together) and whitespace around each list item is stripped\n * before it is added to the model.\n *\n * ### Example with Validation\n *\n * <example name=\"ngList-directive\" module=\"listExample\">\n * <file name=\"app.js\">\n * angular.module('listExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.names = ['morpheus', 'neo', 'trinity'];\n * }]);\n * </file>\n * <file name=\"index.html\">\n * <form name=\"myForm\" ng-controller=\"ExampleController\">\n * <label>List: <input name=\"namesInput\" ng-model=\"names\" ng-list required></label>\n * <span role=\"alert\">\n * <span class=\"error\" ng-show=\"myForm.namesInput.$error.required\">\n * Required!</span>\n * </span>\n * <br>\n * <tt>names = {{names}}</tt><br/>\n * <tt>myForm.namesInput.$valid = {{myForm.namesInput.$valid}}</tt><br/>\n * <tt>myForm.namesInput.$error = {{myForm.namesInput.$error}}</tt><br/>\n * <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n * <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n * </form>\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * var listInput = element(by.model('names'));\n * var names = element(by.exactBinding('names'));\n * var valid = element(by.binding('myForm.namesInput.$valid'));\n * var error = element(by.css('span.error'));\n *\n * it('should initialize to model', function() {\n * expect(names.getText()).toContain('[\"morpheus\",\"neo\",\"trinity\"]');\n * expect(valid.getText()).toContain('true');\n * expect(error.getCssValue('display')).toBe('none');\n * });\n *\n * it('should be invalid if empty', function() {\n * listInput.clear();\n * listInput.sendKeys('');\n *\n * expect(names.getText()).toContain('');\n * expect(valid.getText()).toContain('false');\n * expect(error.getCssValue('display')).not.toBe('none');\n * });\n * </file>\n * </example>\n *\n * ### Example - splitting on newline\n * <example name=\"ngList-directive-newlines\">\n * <file name=\"index.html\">\n * <textarea ng-model=\"list\" ng-list=\"&#10;\" ng-trim=\"false\"></textarea>\n * <pre>{{ list | json }}</pre>\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * it(\"should split the text by newlines\", function() {\n * var listInput = element(by.model('list'));\n * var output = element(by.binding('list | json'));\n * listInput.sendKeys('abc\\ndef\\nghi');\n * expect(output.getText()).toContain('[\\n \"abc\",\\n \"def\",\\n \"ghi\"\\n]');\n * });\n * </file>\n * </example>\n *\n * @element input\n * @param {string=} ngList optional delimiter that should be used to split the value.\n */\nvar ngListDirective = function() {\n return {\n restrict: 'A',\n priority: 100,\n require: 'ngModel',\n link: function(scope, element, attr, ctrl) {\n // We want to control whitespace trimming so we use this convoluted approach\n // to access the ngList attribute, which doesn't pre-trim the attribute\n var ngList = element.attr(attr.$attr.ngList) || ', ';\n var trimValues = attr.ngTrim !== 'false';\n var separator = trimValues ? trim(ngList) : ngList;\n\n var parse = function(viewValue) {\n // If the viewValue is invalid (say required but empty) it will be `undefined`\n if (isUndefined(viewValue)) return;\n\n var list = [];\n\n if (viewValue) {\n forEach(viewValue.split(separator), function(value) {\n if (value) list.push(trimValues ? trim(value) : value);\n });\n }\n\n return list;\n };\n\n ctrl.$parsers.push(parse);\n ctrl.$formatters.push(function(value) {\n if (isArray(value)) {\n return value.join(ngList);\n }\n\n return undefined;\n });\n\n // Override the standard $isEmpty because an empty array means the input is empty.\n ctrl.$isEmpty = function(value) {\n return !value || !value.length;\n };\n }\n };\n};\n\n/* global VALID_CLASS: true,\n INVALID_CLASS: true,\n PRISTINE_CLASS: true,\n DIRTY_CLASS: true,\n UNTOUCHED_CLASS: true,\n TOUCHED_CLASS: true,\n*/\n\nvar VALID_CLASS = 'ng-valid',\n INVALID_CLASS = 'ng-invalid',\n PRISTINE_CLASS = 'ng-pristine',\n DIRTY_CLASS = 'ng-dirty',\n UNTOUCHED_CLASS = 'ng-untouched',\n TOUCHED_CLASS = 'ng-touched',\n PENDING_CLASS = 'ng-pending';\n\nvar ngModelMinErr = minErr('ngModel');\n\n/**\n * @ngdoc type\n * @name ngModel.NgModelController\n *\n * @property {*} $viewValue The actual value from the control's view. For `input` elements, this is a\n * String. See {@link ngModel.NgModelController#$setViewValue} for information about when the $viewValue\n * is set.\n * @property {*} $modelValue The value in the model that the control is bound to.\n * @property {Array.<Function>} $parsers Array of functions to execute, as a pipeline, whenever\n the control reads value from the DOM. The functions are called in array order, each passing\n its return value through to the next. The last return value is forwarded to the\n {@link ngModel.NgModelController#$validators `$validators`} collection.\n\nParsers are used to sanitize / convert the {@link ngModel.NgModelController#$viewValue\n`$viewValue`}.\n\nReturning `undefined` from a parser means a parse error occurred. In that case,\nno {@link ngModel.NgModelController#$validators `$validators`} will run and the `ngModel`\nwill be set to `undefined` unless {@link ngModelOptions `ngModelOptions.allowInvalid`}\nis set to `true`. The parse error is stored in `ngModel.$error.parse`.\n\n *\n * @property {Array.<Function>} $formatters Array of functions to execute, as a pipeline, whenever\n the model value changes. The functions are called in reverse array order, each passing the value through to the\n next. The last return value is used as the actual DOM value.\n Used to format / convert values for display in the control.\n * ```js\n * function formatter(value) {\n * if (value) {\n * return value.toUpperCase();\n * }\n * }\n * ngModel.$formatters.push(formatter);\n * ```\n *\n * @property {Object.<string, function>} $validators A collection of validators that are applied\n * whenever the model value changes. The key value within the object refers to the name of the\n * validator while the function refers to the validation operation. The validation operation is\n * provided with the model value as an argument and must return a true or false value depending\n * on the response of that validation.\n *\n * ```js\n * ngModel.$validators.validCharacters = function(modelValue, viewValue) {\n * var value = modelValue || viewValue;\n * return /[0-9]+/.test(value) &&\n * /[a-z]+/.test(value) &&\n * /[A-Z]+/.test(value) &&\n * /\\W+/.test(value);\n * };\n * ```\n *\n * @property {Object.<string, function>} $asyncValidators A collection of validations that are expected to\n * perform an asynchronous validation (e.g. a HTTP request). The validation function that is provided\n * is expected to return a promise when it is run during the model validation process. Once the promise\n * is delivered then the validation status will be set to true when fulfilled and false when rejected.\n * When the asynchronous validators are triggered, each of the validators will run in parallel and the model\n * value will only be updated once all validators have been fulfilled. As long as an asynchronous validator\n * is unfulfilled, its key will be added to the controllers `$pending` property. Also, all asynchronous validators\n * will only run once all synchronous validators have passed.\n *\n * Please note that if $http is used then it is important that the server returns a success HTTP response code\n * in order to fulfill the validation and a status level of `4xx` in order to reject the validation.\n *\n * ```js\n * ngModel.$asyncValidators.uniqueUsername = function(modelValue, viewValue) {\n * var value = modelValue || viewValue;\n *\n * // Lookup user by username\n * return $http.get('/api/users/' + value).\n * then(function resolved() {\n * //username exists, this means validation fails\n * return $q.reject('exists');\n * }, function rejected() {\n * //username does not exist, therefore this validation passes\n * return true;\n * });\n * };\n * ```\n *\n * @property {Array.<Function>} $viewChangeListeners Array of functions to execute whenever the\n * view value has changed. It is called with no arguments, and its return value is ignored.\n * This can be used in place of additional $watches against the model value.\n *\n * @property {Object} $error An object hash with all failing validator ids as keys.\n * @property {Object} $pending An object hash with all pending validator ids as keys.\n *\n * @property {boolean} $untouched True if control has not lost focus yet.\n * @property {boolean} $touched True if control has lost focus.\n * @property {boolean} $pristine True if user has not interacted with the control yet.\n * @property {boolean} $dirty True if user has already interacted with the control.\n * @property {boolean} $valid True if there is no error.\n * @property {boolean} $invalid True if at least one error on the control.\n * @property {string} $name The name attribute of the control.\n *\n * @description\n *\n * `NgModelController` provides API for the {@link ngModel `ngModel`} directive.\n * The controller contains services for data-binding, validation, CSS updates, and value formatting\n * and parsing. It purposefully does not contain any logic which deals with DOM rendering or\n * listening to DOM events.\n * Such DOM related logic should be provided by other directives which make use of\n * `NgModelController` for data-binding to control elements.\n * Angular provides this DOM logic for most {@link input `input`} elements.\n * At the end of this page you can find a {@link ngModel.NgModelController#custom-control-example\n * custom control example} that uses `ngModelController` to bind to `contenteditable` elements.\n *\n * @example\n * ### Custom Control Example\n * This example shows how to use `NgModelController` with a custom control to achieve\n * data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)\n * collaborate together to achieve the desired result.\n *\n * `contenteditable` is an HTML5 attribute, which tells the browser to let the element\n * contents be edited in place by the user.\n *\n * We are using the {@link ng.service:$sce $sce} service here and include the {@link ngSanitize $sanitize}\n * module to automatically remove \"bad\" content like inline event listener (e.g. `<span onclick=\"...\">`).\n * However, as we are using `$sce` the model can still decide to provide unsafe content if it marks\n * that content using the `$sce` service.\n *\n * <example name=\"NgModelController\" module=\"customControl\" deps=\"angular-sanitize.js\">\n <file name=\"style.css\">\n [contenteditable] {\n border: 1px solid black;\n background-color: white;\n min-height: 20px;\n }\n\n .ng-invalid {\n border: 1px solid red;\n }\n\n </file>\n <file name=\"script.js\">\n angular.module('customControl', ['ngSanitize']).\n directive('contenteditable', ['$sce', function($sce) {\n return {\n restrict: 'A', // only activate on element attribute\n require: '?ngModel', // get a hold of NgModelController\n link: function(scope, element, attrs, ngModel) {\n if (!ngModel) return; // do nothing if no ng-model\n\n // Specify how UI should be updated\n ngModel.$render = function() {\n element.html($sce.getTrustedHtml(ngModel.$viewValue || ''));\n };\n\n // Listen for change events to enable binding\n element.on('blur keyup change', function() {\n scope.$evalAsync(read);\n });\n read(); // initialize\n\n // Write data to the model\n function read() {\n var html = element.html();\n // When we clear the content editable the browser leaves a <br> behind\n // If strip-br attribute is provided then we strip this out\n if ( attrs.stripBr && html == '<br>' ) {\n html = '';\n }\n ngModel.$setViewValue(html);\n }\n }\n };\n }]);\n </file>\n <file name=\"index.html\">\n <form name=\"myForm\">\n <div contenteditable\n name=\"myWidget\" ng-model=\"userContent\"\n strip-br=\"true\"\n required>Change me!</div>\n <span ng-show=\"myForm.myWidget.$error.required\">Required!</span>\n <hr>\n <textarea ng-model=\"userContent\" aria-label=\"Dynamic textarea\"></textarea>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should data-bind and become invalid', function() {\n if (browser.params.browser == 'safari' || browser.params.browser == 'firefox') {\n // SafariDriver can't handle contenteditable\n // and Firefox driver can't clear contenteditables very well\n return;\n }\n var contentEditable = element(by.css('[contenteditable]'));\n var content = 'Change me!';\n\n expect(contentEditable.getText()).toEqual(content);\n\n contentEditable.clear();\n contentEditable.sendKeys(protractor.Key.BACK_SPACE);\n expect(contentEditable.getText()).toEqual('');\n expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/);\n });\n </file>\n * </example>\n *\n *\n */\nvar NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate', '$timeout', '$rootScope', '$q', '$interpolate',\n function($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $rootScope, $q, $interpolate) {\n this.$viewValue = Number.NaN;\n this.$modelValue = Number.NaN;\n this.$$rawModelValue = undefined; // stores the parsed modelValue / model set from scope regardless of validity.\n this.$validators = {};\n this.$asyncValidators = {};\n this.$parsers = [];\n this.$formatters = [];\n this.$viewChangeListeners = [];\n this.$untouched = true;\n this.$touched = false;\n this.$pristine = true;\n this.$dirty = false;\n this.$valid = true;\n this.$invalid = false;\n this.$error = {}; // keep invalid keys here\n this.$$success = {}; // keep valid keys here\n this.$pending = undefined; // keep pending keys here\n this.$name = $interpolate($attr.name || '', false)($scope);\n this.$$parentForm = nullFormCtrl;\n\n var parsedNgModel = $parse($attr.ngModel),\n parsedNgModelAssign = parsedNgModel.assign,\n ngModelGet = parsedNgModel,\n ngModelSet = parsedNgModelAssign,\n pendingDebounce = null,\n parserValid,\n ctrl = this;\n\n this.$$setOptions = function(options) {\n ctrl.$options = options;\n if (options && options.getterSetter) {\n var invokeModelGetter = $parse($attr.ngModel + '()'),\n invokeModelSetter = $parse($attr.ngModel + '($$$p)');\n\n ngModelGet = function($scope) {\n var modelValue = parsedNgModel($scope);\n if (isFunction(modelValue)) {\n modelValue = invokeModelGetter($scope);\n }\n return modelValue;\n };\n ngModelSet = function($scope, newValue) {\n if (isFunction(parsedNgModel($scope))) {\n invokeModelSetter($scope, {$$$p: ctrl.$modelValue});\n } else {\n parsedNgModelAssign($scope, ctrl.$modelValue);\n }\n };\n } else if (!parsedNgModel.assign) {\n throw ngModelMinErr('nonassign', \"Expression '{0}' is non-assignable. Element: {1}\",\n $attr.ngModel, startingTag($element));\n }\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$render\n *\n * @description\n * Called when the view needs to be updated. It is expected that the user of the ng-model\n * directive will implement this method.\n *\n * The `$render()` method is invoked in the following situations:\n *\n * * `$rollbackViewValue()` is called. If we are rolling back the view value to the last\n * committed value then `$render()` is called to update the input control.\n * * The value referenced by `ng-model` is changed programmatically and both the `$modelValue` and\n * the `$viewValue` are different from last time.\n *\n * Since `ng-model` does not do a deep watch, `$render()` is only invoked if the values of\n * `$modelValue` and `$viewValue` are actually different from their previous value. If `$modelValue`\n * or `$viewValue` are objects (rather than a string or number) then `$render()` will not be\n * invoked if you only change a property on the objects.\n */\n this.$render = noop;\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$isEmpty\n *\n * @description\n * This is called when we need to determine if the value of an input is empty.\n *\n * For instance, the required directive does this to work out if the input has data or not.\n *\n * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.\n *\n * You can override this for input directives whose concept of being empty is different from the\n * default. The `checkboxInputType` directive does this because in its case a value of `false`\n * implies empty.\n *\n * @param {*} value The value of the input to check for emptiness.\n * @returns {boolean} True if `value` is \"empty\".\n */\n this.$isEmpty = function(value) {\n return isUndefined(value) || value === '' || value === null || value !== value;\n };\n\n var currentValidationRunId = 0;\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setValidity\n *\n * @description\n * Change the validity state, and notify the form.\n *\n * This method can be called within $parsers/$formatters or a custom validation implementation.\n * However, in most cases it should be sufficient to use the `ngModel.$validators` and\n * `ngModel.$asyncValidators` collections which will call `$setValidity` automatically.\n *\n * @param {string} validationErrorKey Name of the validator. The `validationErrorKey` will be assigned\n * to either `$error[validationErrorKey]` or `$pending[validationErrorKey]`\n * (for unfulfilled `$asyncValidators`), so that it is available for data-binding.\n * The `validationErrorKey` should be in camelCase and will get converted into dash-case\n * for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error`\n * class and can be bound to as `{{someForm.someControl.$error.myError}}` .\n * @param {boolean} isValid Whether the current state is valid (true), invalid (false), pending (undefined),\n * or skipped (null). Pending is used for unfulfilled `$asyncValidators`.\n * Skipped is used by Angular when validators do not run because of parse errors and\n * when `$asyncValidators` do not run because any of the `$validators` failed.\n */\n addSetValidityMethod({\n ctrl: this,\n $element: $element,\n set: function(object, property) {\n object[property] = true;\n },\n unset: function(object, property) {\n delete object[property];\n },\n $animate: $animate\n });\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setPristine\n *\n * @description\n * Sets the control to its pristine state.\n *\n * This method can be called to remove the `ng-dirty` class and set the control to its pristine\n * state (`ng-pristine` class). A model is considered to be pristine when the control\n * has not been changed from when first compiled.\n */\n this.$setPristine = function() {\n ctrl.$dirty = false;\n ctrl.$pristine = true;\n $animate.removeClass($element, DIRTY_CLASS);\n $animate.addClass($element, PRISTINE_CLASS);\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setDirty\n *\n * @description\n * Sets the control to its dirty state.\n *\n * This method can be called to remove the `ng-pristine` class and set the control to its dirty\n * state (`ng-dirty` class). A model is considered to be dirty when the control has been changed\n * from when first compiled.\n */\n this.$setDirty = function() {\n ctrl.$dirty = true;\n ctrl.$pristine = false;\n $animate.removeClass($element, PRISTINE_CLASS);\n $animate.addClass($element, DIRTY_CLASS);\n ctrl.$$parentForm.$setDirty();\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setUntouched\n *\n * @description\n * Sets the control to its untouched state.\n *\n * This method can be called to remove the `ng-touched` class and set the control to its\n * untouched state (`ng-untouched` class). Upon compilation, a model is set as untouched\n * by default, however this function can be used to restore that state if the model has\n * already been touched by the user.\n */\n this.$setUntouched = function() {\n ctrl.$touched = false;\n ctrl.$untouched = true;\n $animate.setClass($element, UNTOUCHED_CLASS, TOUCHED_CLASS);\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setTouched\n *\n * @description\n * Sets the control to its touched state.\n *\n * This method can be called to remove the `ng-untouched` class and set the control to its\n * touched state (`ng-touched` class). A model is considered to be touched when the user has\n * first focused the control element and then shifted focus away from the control (blur event).\n */\n this.$setTouched = function() {\n ctrl.$touched = true;\n ctrl.$untouched = false;\n $animate.setClass($element, TOUCHED_CLASS, UNTOUCHED_CLASS);\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$rollbackViewValue\n *\n * @description\n * Cancel an update and reset the input element's value to prevent an update to the `$modelValue`,\n * which may be caused by a pending debounced event or because the input is waiting for a some\n * future event.\n *\n * If you have an input that uses `ng-model-options` to set up debounced updates or updates that\n * depend on special events such as blur, you can have a situation where there is a period when\n * the `$viewValue` is out of sync with the ngModel's `$modelValue`.\n *\n * In this case, you can use `$rollbackViewValue()` to manually cancel the debounced / future update\n * and reset the input to the last committed view value.\n *\n * It is also possible that you run into difficulties if you try to update the ngModel's `$modelValue`\n * programmatically before these debounced/future events have resolved/occurred, because Angular's\n * dirty checking mechanism is not able to tell whether the model has actually changed or not.\n *\n * The `$rollbackViewValue()` method should be called before programmatically changing the model of an\n * input which may have such events pending. This is important in order to make sure that the\n * input field will be updated with the new model value and any pending operations are cancelled.\n *\n * <example name=\"ng-model-cancel-update\" module=\"cancel-update-example\">\n * <file name=\"app.js\">\n * angular.module('cancel-update-example', [])\n *\n * .controller('CancelUpdateController', ['$scope', function($scope) {\n * $scope.model = {};\n *\n * $scope.setEmpty = function(e, value, rollback) {\n * if (e.keyCode == 27) {\n * e.preventDefault();\n * if (rollback) {\n * $scope.myForm[value].$rollbackViewValue();\n * }\n * $scope.model[value] = '';\n * }\n * };\n * }]);\n * </file>\n * <file name=\"index.html\">\n * <div ng-controller=\"CancelUpdateController\">\n * <p>Both of these inputs are only updated if they are blurred. Hitting escape should\n * empty them. Follow these steps and observe the difference:</p>\n * <ol>\n * <li>Type something in the input. You will see that the model is not yet updated</li>\n * <li>Press the Escape key.\n * <ol>\n * <li> In the first example, nothing happens, because the model is already '', and no\n * update is detected. If you blur the input, the model will be set to the current view.\n * </li>\n * <li> In the second example, the pending update is cancelled, and the input is set back\n * to the last committed view value (''). Blurring the input does nothing.\n * </li>\n * </ol>\n * </li>\n * </ol>\n *\n * <form name=\"myForm\" ng-model-options=\"{ updateOn: 'blur' }\">\n * <div>\n * <p id=\"inputDescription1\">Without $rollbackViewValue():</p>\n * <input name=\"value1\" aria-describedby=\"inputDescription1\" ng-model=\"model.value1\"\n * ng-keydown=\"setEmpty($event, 'value1')\">\n * value1: \"{{ model.value1 }}\"\n * </div>\n *\n * <div>\n * <p id=\"inputDescription2\">With $rollbackViewValue():</p>\n * <input name=\"value2\" aria-describedby=\"inputDescription2\" ng-model=\"model.value2\"\n * ng-keydown=\"setEmpty($event, 'value2', true)\">\n * value2: \"{{ model.value2 }}\"\n * </div>\n * </form>\n * </div>\n * </file>\n <file name=\"style.css\">\n div {\n display: table-cell;\n }\n div:nth-child(1) {\n padding-right: 30px;\n }\n\n </file>\n * </example>\n */\n this.$rollbackViewValue = function() {\n $timeout.cancel(pendingDebounce);\n ctrl.$viewValue = ctrl.$$lastCommittedViewValue;\n ctrl.$render();\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$validate\n *\n * @description\n * Runs each of the registered validators (first synchronous validators and then\n * asynchronous validators).\n * If the validity changes to invalid, the model will be set to `undefined`,\n * unless {@link ngModelOptions `ngModelOptions.allowInvalid`} is `true`.\n * If the validity changes to valid, it will set the model to the last available valid\n * `$modelValue`, i.e. either the last parsed value or the last value set from the scope.\n */\n this.$validate = function() {\n // ignore $validate before model is initialized\n if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {\n return;\n }\n\n var viewValue = ctrl.$$lastCommittedViewValue;\n // Note: we use the $$rawModelValue as $modelValue might have been\n // set to undefined during a view -> model update that found validation\n // errors. We can't parse the view here, since that could change\n // the model although neither viewValue nor the model on the scope changed\n var modelValue = ctrl.$$rawModelValue;\n\n var prevValid = ctrl.$valid;\n var prevModelValue = ctrl.$modelValue;\n\n var allowInvalid = ctrl.$options && ctrl.$options.allowInvalid;\n\n ctrl.$$runValidators(modelValue, viewValue, function(allValid) {\n // If there was no change in validity, don't update the model\n // This prevents changing an invalid modelValue to undefined\n if (!allowInvalid && prevValid !== allValid) {\n // Note: Don't check ctrl.$valid here, as we could have\n // external validators (e.g. calculated on the server),\n // that just call $setValidity and need the model value\n // to calculate their validity.\n ctrl.$modelValue = allValid ? modelValue : undefined;\n\n if (ctrl.$modelValue !== prevModelValue) {\n ctrl.$$writeModelToScope();\n }\n }\n });\n\n };\n\n this.$$runValidators = function(modelValue, viewValue, doneCallback) {\n currentValidationRunId++;\n var localValidationRunId = currentValidationRunId;\n\n // check parser error\n if (!processParseErrors()) {\n validationDone(false);\n return;\n }\n if (!processSyncValidators()) {\n validationDone(false);\n return;\n }\n processAsyncValidators();\n\n function processParseErrors() {\n var errorKey = ctrl.$$parserName || 'parse';\n if (isUndefined(parserValid)) {\n setValidity(errorKey, null);\n } else {\n if (!parserValid) {\n forEach(ctrl.$validators, function(v, name) {\n setValidity(name, null);\n });\n forEach(ctrl.$asyncValidators, function(v, name) {\n setValidity(name, null);\n });\n }\n // Set the parse error last, to prevent unsetting it, should a $validators key == parserName\n setValidity(errorKey, parserValid);\n return parserValid;\n }\n return true;\n }\n\n function processSyncValidators() {\n var syncValidatorsValid = true;\n forEach(ctrl.$validators, function(validator, name) {\n var result = validator(modelValue, viewValue);\n syncValidatorsValid = syncValidatorsValid && result;\n setValidity(name, result);\n });\n if (!syncValidatorsValid) {\n forEach(ctrl.$asyncValidators, function(v, name) {\n setValidity(name, null);\n });\n return false;\n }\n return true;\n }\n\n function processAsyncValidators() {\n var validatorPromises = [];\n var allValid = true;\n forEach(ctrl.$asyncValidators, function(validator, name) {\n var promise = validator(modelValue, viewValue);\n if (!isPromiseLike(promise)) {\n throw ngModelMinErr('nopromise',\n \"Expected asynchronous validator to return a promise but got '{0}' instead.\", promise);\n }\n setValidity(name, undefined);\n validatorPromises.push(promise.then(function() {\n setValidity(name, true);\n }, function(error) {\n allValid = false;\n setValidity(name, false);\n }));\n });\n if (!validatorPromises.length) {\n validationDone(true);\n } else {\n $q.all(validatorPromises).then(function() {\n validationDone(allValid);\n }, noop);\n }\n }\n\n function setValidity(name, isValid) {\n if (localValidationRunId === currentValidationRunId) {\n ctrl.$setValidity(name, isValid);\n }\n }\n\n function validationDone(allValid) {\n if (localValidationRunId === currentValidationRunId) {\n\n doneCallback(allValid);\n }\n }\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$commitViewValue\n *\n * @description\n * Commit a pending update to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. this method is rarely needed as `NgModelController`\n * usually handles calling this in response to input events.\n */\n this.$commitViewValue = function() {\n var viewValue = ctrl.$viewValue;\n\n $timeout.cancel(pendingDebounce);\n\n // If the view value has not changed then we should just exit, except in the case where there is\n // a native validator on the element. In this case the validation state may have changed even though\n // the viewValue has stayed empty.\n if (ctrl.$$lastCommittedViewValue === viewValue && (viewValue !== '' || !ctrl.$$hasNativeValidators)) {\n return;\n }\n ctrl.$$lastCommittedViewValue = viewValue;\n\n // change to dirty\n if (ctrl.$pristine) {\n this.$setDirty();\n }\n this.$$parseAndValidate();\n };\n\n this.$$parseAndValidate = function() {\n var viewValue = ctrl.$$lastCommittedViewValue;\n var modelValue = viewValue;\n parserValid = isUndefined(modelValue) ? undefined : true;\n\n if (parserValid) {\n for (var i = 0; i < ctrl.$parsers.length; i++) {\n modelValue = ctrl.$parsers[i](modelValue);\n if (isUndefined(modelValue)) {\n parserValid = false;\n break;\n }\n }\n }\n if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {\n // ctrl.$modelValue has not been touched yet...\n ctrl.$modelValue = ngModelGet($scope);\n }\n var prevModelValue = ctrl.$modelValue;\n var allowInvalid = ctrl.$options && ctrl.$options.allowInvalid;\n ctrl.$$rawModelValue = modelValue;\n\n if (allowInvalid) {\n ctrl.$modelValue = modelValue;\n writeToModelIfNeeded();\n }\n\n // Pass the $$lastCommittedViewValue here, because the cached viewValue might be out of date.\n // This can happen if e.g. $setViewValue is called from inside a parser\n ctrl.$$runValidators(modelValue, ctrl.$$lastCommittedViewValue, function(allValid) {\n if (!allowInvalid) {\n // Note: Don't check ctrl.$valid here, as we could have\n // external validators (e.g. calculated on the server),\n // that just call $setValidity and need the model value\n // to calculate their validity.\n ctrl.$modelValue = allValid ? modelValue : undefined;\n writeToModelIfNeeded();\n }\n });\n\n function writeToModelIfNeeded() {\n if (ctrl.$modelValue !== prevModelValue) {\n ctrl.$$writeModelToScope();\n }\n }\n };\n\n this.$$writeModelToScope = function() {\n ngModelSet($scope, ctrl.$modelValue);\n forEach(ctrl.$viewChangeListeners, function(listener) {\n try {\n listener();\n } catch (e) {\n $exceptionHandler(e);\n }\n });\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setViewValue\n *\n * @description\n * Update the view value.\n *\n * This method should be called when a control wants to change the view value; typically,\n * this is done from within a DOM event handler. For example, the {@link ng.directive:input input}\n * directive calls it when the value of the input changes and {@link ng.directive:select select}\n * calls it when an option is selected.\n *\n * When `$setViewValue` is called, the new `value` will be staged for committing through the `$parsers`\n * and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged\n * value sent directly for processing, finally to be applied to `$modelValue` and then the\n * **expression** specified in the `ng-model` attribute. Lastly, all the registered change listeners,\n * in the `$viewChangeListeners` list, are called.\n *\n * In case the {@link ng.directive:ngModelOptions ngModelOptions} directive is used with `updateOn`\n * and the `default` trigger is not listed, all those actions will remain pending until one of the\n * `updateOn` events is triggered on the DOM element.\n * All these actions will be debounced if the {@link ng.directive:ngModelOptions ngModelOptions}\n * directive is used with a custom debounce for this particular event.\n * Note that a `$digest` is only triggered once the `updateOn` events are fired, or if `debounce`\n * is specified, once the timer runs out.\n *\n * When used with standard inputs, the view value will always be a string (which is in some cases\n * parsed into another type, such as a `Date` object for `input[date]`.)\n * However, custom controls might also pass objects to this method. In this case, we should make\n * a copy of the object before passing it to `$setViewValue`. This is because `ngModel` does not\n * perform a deep watch of objects, it only looks for a change of identity. If you only change\n * the property of the object then ngModel will not realise that the object has changed and\n * will not invoke the `$parsers` and `$validators` pipelines. For this reason, you should\n * not change properties of the copy once it has been passed to `$setViewValue`.\n * Otherwise you may cause the model value on the scope to change incorrectly.\n *\n * <div class=\"alert alert-info\">\n * In any case, the value passed to the method should always reflect the current value\n * of the control. For example, if you are calling `$setViewValue` for an input element,\n * you should pass the input DOM value. Otherwise, the control and the scope model become\n * out of sync. It's also important to note that `$setViewValue` does not call `$render` or change\n * the control's DOM value in any way. If we want to change the control's DOM value\n * programmatically, we should update the `ngModel` scope expression. Its new value will be\n * picked up by the model controller, which will run it through the `$formatters`, `$render` it\n * to update the DOM, and finally call `$validate` on it.\n * </div>\n *\n * @param {*} value value from the view.\n * @param {string} trigger Event that triggered the update.\n */\n this.$setViewValue = function(value, trigger) {\n ctrl.$viewValue = value;\n if (!ctrl.$options || ctrl.$options.updateOnDefault) {\n ctrl.$$debounceViewValueCommit(trigger);\n }\n };\n\n this.$$debounceViewValueCommit = function(trigger) {\n var debounceDelay = 0,\n options = ctrl.$options,\n debounce;\n\n if (options && isDefined(options.debounce)) {\n debounce = options.debounce;\n if (isNumber(debounce)) {\n debounceDelay = debounce;\n } else if (isNumber(debounce[trigger])) {\n debounceDelay = debounce[trigger];\n } else if (isNumber(debounce['default'])) {\n debounceDelay = debounce['default'];\n }\n }\n\n $timeout.cancel(pendingDebounce);\n if (debounceDelay) {\n pendingDebounce = $timeout(function() {\n ctrl.$commitViewValue();\n }, debounceDelay);\n } else if ($rootScope.$$phase) {\n ctrl.$commitViewValue();\n } else {\n $scope.$apply(function() {\n ctrl.$commitViewValue();\n });\n }\n };\n\n // model -> value\n // Note: we cannot use a normal scope.$watch as we want to detect the following:\n // 1. scope value is 'a'\n // 2. user enters 'b'\n // 3. ng-change kicks in and reverts scope value to 'a'\n // -> scope value did not change since the last digest as\n // ng-change executes in apply phase\n // 4. view should be changed back to 'a'\n $scope.$watch(function ngModelWatch() {\n var modelValue = ngModelGet($scope);\n\n // if scope model value and ngModel value are out of sync\n // TODO(perf): why not move this to the action fn?\n if (modelValue !== ctrl.$modelValue &&\n // checks for NaN is needed to allow setting the model to NaN when there's an asyncValidator\n (ctrl.$modelValue === ctrl.$modelValue || modelValue === modelValue)\n ) {\n ctrl.$modelValue = ctrl.$$rawModelValue = modelValue;\n parserValid = undefined;\n\n var formatters = ctrl.$formatters,\n idx = formatters.length;\n\n var viewValue = modelValue;\n while (idx--) {\n viewValue = formatters[idx](viewValue);\n }\n if (ctrl.$viewValue !== viewValue) {\n ctrl.$viewValue = ctrl.$$lastCommittedViewValue = viewValue;\n ctrl.$render();\n\n ctrl.$$runValidators(modelValue, viewValue, noop);\n }\n }\n\n return modelValue;\n });\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngModel\n *\n * @element input\n * @priority 1\n *\n * @description\n * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a\n * property on the scope using {@link ngModel.NgModelController NgModelController},\n * which is created and exposed by this directive.\n *\n * `ngModel` is responsible for:\n *\n * - Binding the view into the model, which other directives such as `input`, `textarea` or `select`\n * require.\n * - Providing validation behavior (i.e. required, number, email, url).\n * - Keeping the state of the control (valid/invalid, dirty/pristine, touched/untouched, validation errors).\n * - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`, `ng-touched`, `ng-untouched`) including animations.\n * - Registering the control with its parent {@link ng.directive:form form}.\n *\n * Note: `ngModel` will try to bind to the property given by evaluating the expression on the\n * current scope. If the property doesn't already exist on this scope, it will be created\n * implicitly and added to the scope.\n *\n * For best practices on using `ngModel`, see:\n *\n * - [Understanding Scopes](https://github.com/angular/angular.js/wiki/Understanding-Scopes)\n *\n * For basic examples, how to use `ngModel`, see:\n *\n * - {@link ng.directive:input input}\n * - {@link input[text] text}\n * - {@link input[checkbox] checkbox}\n * - {@link input[radio] radio}\n * - {@link input[number] number}\n * - {@link input[email] email}\n * - {@link input[url] url}\n * - {@link input[date] date}\n * - {@link input[datetime-local] datetime-local}\n * - {@link input[time] time}\n * - {@link input[month] month}\n * - {@link input[week] week}\n * - {@link ng.directive:select select}\n * - {@link ng.directive:textarea textarea}\n *\n * # Complex Models (objects or collections)\n *\n * By default, `ngModel` watches the model by reference, not value. This is important to know when\n * binding inputs to models that are objects (e.g. `Date`) or collections (e.g. arrays). If only properties of the\n * object or collection change, `ngModel` will not be notified and so the input will not be re-rendered.\n *\n * The model must be assigned an entirely new object or collection before a re-rendering will occur.\n *\n * Some directives have options that will cause them to use a custom `$watchCollection` on the model expression\n * - for example, `ngOptions` will do so when a `track by` clause is included in the comprehension expression or\n * if the select is given the `multiple` attribute.\n *\n * The `$watchCollection()` method only does a shallow comparison, meaning that changing properties deeper than the\n * first level of the object (or only changing the properties of an item in the collection if it's an array) will still\n * not trigger a re-rendering of the model.\n *\n * # CSS classes\n * The following CSS classes are added and removed on the associated input/select/textarea element\n * depending on the validity of the model.\n *\n * - `ng-valid`: the model is valid\n * - `ng-invalid`: the model is invalid\n * - `ng-valid-[key]`: for each valid key added by `$setValidity`\n * - `ng-invalid-[key]`: for each invalid key added by `$setValidity`\n * - `ng-pristine`: the control hasn't been interacted with yet\n * - `ng-dirty`: the control has been interacted with\n * - `ng-touched`: the control has been blurred\n * - `ng-untouched`: the control hasn't been blurred\n * - `ng-pending`: any `$asyncValidators` are unfulfilled\n *\n * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n *\n * ## Animation Hooks\n *\n * Animations within models are triggered when any of the associated CSS classes are added and removed\n * on the input element which is attached to the model. These classes are: `.ng-pristine`, `.ng-dirty`,\n * `.ng-invalid` and `.ng-valid` as well as any other validations that are performed on the model itself.\n * The animations that are triggered within ngModel are similar to how they work in ngClass and\n * animations can be hooked into using CSS transitions, keyframes as well as JS animations.\n *\n * The following example shows a simple way to utilize CSS transitions to style an input element\n * that has been rendered as invalid after it has been validated:\n *\n * <pre>\n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-input {\n * transition:0.5s linear all;\n * background: white;\n * }\n * .my-input.ng-invalid {\n * background: red;\n * color:white;\n * }\n * </pre>\n *\n * @example\n * <example deps=\"angular-animate.js\" animations=\"true\" fixBase=\"true\" module=\"inputExample\">\n <file name=\"index.html\">\n <script>\n angular.module('inputExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.val = '1';\n }]);\n </script>\n <style>\n .my-input {\n transition:all linear 0.5s;\n background: transparent;\n }\n .my-input.ng-invalid {\n color:white;\n background: red;\n }\n </style>\n <p id=\"inputDescription\">\n Update input to see transitions when valid/invalid.\n Integer is a valid value.\n </p>\n <form name=\"testForm\" ng-controller=\"ExampleController\">\n <input ng-model=\"val\" ng-pattern=\"/^\\d+$/\" name=\"anim\" class=\"my-input\"\n aria-describedby=\"inputDescription\" />\n </form>\n </file>\n * </example>\n *\n * ## Binding to a getter/setter\n *\n * Sometimes it's helpful to bind `ngModel` to a getter/setter function. A getter/setter is a\n * function that returns a representation of the model when called with zero arguments, and sets\n * the internal state of a model when called with an argument. It's sometimes useful to use this\n * for models that have an internal representation that's different from what the model exposes\n * to the view.\n *\n * <div class=\"alert alert-success\">\n * **Best Practice:** It's best to keep getters fast because Angular is likely to call them more\n * frequently than other parts of your code.\n * </div>\n *\n * You use this behavior by adding `ng-model-options=\"{ getterSetter: true }\"` to an element that\n * has `ng-model` attached to it. You can also add `ng-model-options=\"{ getterSetter: true }\"` to\n * a `<form>`, which will enable this behavior for all `<input>`s within it. See\n * {@link ng.directive:ngModelOptions `ngModelOptions`} for more.\n *\n * The following example shows how to use `ngModel` with a getter/setter:\n *\n * @example\n * <example name=\"ngModel-getter-setter\" module=\"getterSetterExample\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <form name=\"userForm\">\n <label>Name:\n <input type=\"text\" name=\"userName\"\n ng-model=\"user.name\"\n ng-model-options=\"{ getterSetter: true }\" />\n </label>\n </form>\n <pre>user.name = <span ng-bind=\"user.name()\"></span></pre>\n </div>\n </file>\n <file name=\"app.js\">\n angular.module('getterSetterExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n var _name = 'Brian';\n $scope.user = {\n name: function(newName) {\n // Note that newName can be undefined for two reasons:\n // 1. Because it is called as a getter and thus called with no arguments\n // 2. Because the property should actually be set to undefined. This happens e.g. if the\n // input is invalid\n return arguments.length ? (_name = newName) : _name;\n }\n };\n }]);\n </file>\n * </example>\n */\nvar ngModelDirective = ['$rootScope', function($rootScope) {\n return {\n restrict: 'A',\n require: ['ngModel', '^?form', '^?ngModelOptions'],\n controller: NgModelController,\n // Prelink needs to run before any input directive\n // so that we can set the NgModelOptions in NgModelController\n // before anyone else uses it.\n priority: 1,\n compile: function ngModelCompile(element) {\n // Setup initial state of the control\n element.addClass(PRISTINE_CLASS).addClass(UNTOUCHED_CLASS).addClass(VALID_CLASS);\n\n return {\n pre: function ngModelPreLink(scope, element, attr, ctrls) {\n var modelCtrl = ctrls[0],\n formCtrl = ctrls[1] || modelCtrl.$$parentForm;\n\n modelCtrl.$$setOptions(ctrls[2] && ctrls[2].$options);\n\n // notify others, especially parent forms\n formCtrl.$addControl(modelCtrl);\n\n attr.$observe('name', function(newValue) {\n if (modelCtrl.$name !== newValue) {\n modelCtrl.$$parentForm.$$renameControl(modelCtrl, newValue);\n }\n });\n\n scope.$on('$destroy', function() {\n modelCtrl.$$parentForm.$removeControl(modelCtrl);\n });\n },\n post: function ngModelPostLink(scope, element, attr, ctrls) {\n var modelCtrl = ctrls[0];\n if (modelCtrl.$options && modelCtrl.$options.updateOn) {\n element.on(modelCtrl.$options.updateOn, function(ev) {\n modelCtrl.$$debounceViewValueCommit(ev && ev.type);\n });\n }\n\n element.on('blur', function(ev) {\n if (modelCtrl.$touched) return;\n\n if ($rootScope.$$phase) {\n scope.$evalAsync(modelCtrl.$setTouched);\n } else {\n scope.$apply(modelCtrl.$setTouched);\n }\n });\n }\n };\n }\n };\n}];\n\nvar DEFAULT_REGEXP = /(\\s+|^)default(\\s+|$)/;\n\n/**\n * @ngdoc directive\n * @name ngModelOptions\n *\n * @description\n * Allows tuning how model updates are done. Using `ngModelOptions` you can specify a custom list of\n * events that will trigger a model update and/or a debouncing delay so that the actual update only\n * takes place when a timer expires; this timer will be reset after another change takes place.\n *\n * Given the nature of `ngModelOptions`, the value displayed inside input fields in the view might\n * be different from the value in the actual model. This means that if you update the model you\n * should also invoke {@link ngModel.NgModelController `$rollbackViewValue`} on the relevant input field in\n * order to make sure it is synchronized with the model and that any debounced action is canceled.\n *\n * The easiest way to reference the control's {@link ngModel.NgModelController `$rollbackViewValue`}\n * method is by making sure the input is placed inside a form that has a `name` attribute. This is\n * important because `form` controllers are published to the related scope under the name in their\n * `name` attribute.\n *\n * Any pending changes will take place immediately when an enclosing form is submitted via the\n * `submit` event. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`\n * to have access to the updated model.\n *\n * `ngModelOptions` has an effect on the element it's declared on and its descendants.\n *\n * @param {Object} ngModelOptions options to apply to the current model. Valid keys are:\n * - `updateOn`: string specifying which event should the input be bound to. You can set several\n * events using an space delimited list. There is a special event called `default` that\n * matches the default events belonging of the control.\n * - `debounce`: integer value which contains the debounce model update value in milliseconds. A\n * value of 0 triggers an immediate update. If an object is supplied instead, you can specify a\n * custom value for each event. For example:\n * `ng-model-options=\"{ updateOn: 'default blur', debounce: { 'default': 500, 'blur': 0 } }\"`\n * - `allowInvalid`: boolean value which indicates that the model can be set with values that did\n * not validate correctly instead of the default behavior of setting the model to undefined.\n * - `getterSetter`: boolean value which determines whether or not to treat functions bound to\n `ngModel` as getters/setters.\n * - `timezone`: Defines the timezone to be used to read/write the `Date` instance in the model for\n * `<input type=\"date\">`, `<input type=\"time\">`, ... . It understands UTC/GMT and the\n * continental US time zone abbreviations, but for general use, use a time zone offset, for\n * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian)\n * If not specified, the timezone of the browser will be used.\n *\n * @example\n\n The following example shows how to override immediate updates. Changes on the inputs within the\n form will update the model only when the control loses focus (blur event). If `escape` key is\n pressed while the input field is focused, the value is reset to the value in the current model.\n\n <example name=\"ngModelOptions-directive-blur\" module=\"optionsExample\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <form name=\"userForm\">\n <label>Name:\n <input type=\"text\" name=\"userName\"\n ng-model=\"user.name\"\n ng-model-options=\"{ updateOn: 'blur' }\"\n ng-keyup=\"cancel($event)\" />\n </label><br />\n <label>Other data:\n <input type=\"text\" ng-model=\"user.data\" />\n </label><br />\n </form>\n <pre>user.name = <span ng-bind=\"user.name\"></span></pre>\n <pre>user.data = <span ng-bind=\"user.data\"></span></pre>\n </div>\n </file>\n <file name=\"app.js\">\n angular.module('optionsExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.user = { name: 'John', data: '' };\n\n $scope.cancel = function(e) {\n if (e.keyCode == 27) {\n $scope.userForm.userName.$rollbackViewValue();\n }\n };\n }]);\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var model = element(by.binding('user.name'));\n var input = element(by.model('user.name'));\n var other = element(by.model('user.data'));\n\n it('should allow custom events', function() {\n input.sendKeys(' Doe');\n input.click();\n expect(model.getText()).toEqual('John');\n other.click();\n expect(model.getText()).toEqual('John Doe');\n });\n\n it('should $rollbackViewValue when model changes', function() {\n input.sendKeys(' Doe');\n expect(input.getAttribute('value')).toEqual('John Doe');\n input.sendKeys(protractor.Key.ESCAPE);\n expect(input.getAttribute('value')).toEqual('John');\n other.click();\n expect(model.getText()).toEqual('John');\n });\n </file>\n </example>\n\n This one shows how to debounce model changes. Model will be updated only 1 sec after last change.\n If the `Clear` button is pressed, any debounced action is canceled and the value becomes empty.\n\n <example name=\"ngModelOptions-directive-debounce\" module=\"optionsExample\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <form name=\"userForm\">\n <label>Name:\n <input type=\"text\" name=\"userName\"\n ng-model=\"user.name\"\n ng-model-options=\"{ debounce: 1000 }\" />\n </label>\n <button ng-click=\"userForm.userName.$rollbackViewValue(); user.name=''\">Clear</button>\n <br />\n </form>\n <pre>user.name = <span ng-bind=\"user.name\"></span></pre>\n </div>\n </file>\n <file name=\"app.js\">\n angular.module('optionsExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.user = { name: 'Igor' };\n }]);\n </file>\n </example>\n\n This one shows how to bind to getter/setters:\n\n <example name=\"ngModelOptions-directive-getter-setter\" module=\"getterSetterExample\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <form name=\"userForm\">\n <label>Name:\n <input type=\"text\" name=\"userName\"\n ng-model=\"user.name\"\n ng-model-options=\"{ getterSetter: true }\" />\n </label>\n </form>\n <pre>user.name = <span ng-bind=\"user.name()\"></span></pre>\n </div>\n </file>\n <file name=\"app.js\">\n angular.module('getterSetterExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n var _name = 'Brian';\n $scope.user = {\n name: function(newName) {\n // Note that newName can be undefined for two reasons:\n // 1. Because it is called as a getter and thus called with no arguments\n // 2. Because the property should actually be set to undefined. This happens e.g. if the\n // input is invalid\n return arguments.length ? (_name = newName) : _name;\n }\n };\n }]);\n </file>\n </example>\n */\nvar ngModelOptionsDirective = function() {\n return {\n restrict: 'A',\n controller: ['$scope', '$attrs', function($scope, $attrs) {\n var that = this;\n this.$options = copy($scope.$eval($attrs.ngModelOptions));\n // Allow adding/overriding bound events\n if (isDefined(this.$options.updateOn)) {\n this.$options.updateOnDefault = false;\n // extract \"default\" pseudo-event from list of events that can trigger a model update\n this.$options.updateOn = trim(this.$options.updateOn.replace(DEFAULT_REGEXP, function() {\n that.$options.updateOnDefault = true;\n return ' ';\n }));\n } else {\n this.$options.updateOnDefault = true;\n }\n }]\n };\n};\n\n\n\n// helper methods\nfunction addSetValidityMethod(context) {\n var ctrl = context.ctrl,\n $element = context.$element,\n classCache = {},\n set = context.set,\n unset = context.unset,\n $animate = context.$animate;\n\n classCache[INVALID_CLASS] = !(classCache[VALID_CLASS] = $element.hasClass(VALID_CLASS));\n\n ctrl.$setValidity = setValidity;\n\n function setValidity(validationErrorKey, state, controller) {\n if (isUndefined(state)) {\n createAndSet('$pending', validationErrorKey, controller);\n } else {\n unsetAndCleanup('$pending', validationErrorKey, controller);\n }\n if (!isBoolean(state)) {\n unset(ctrl.$error, validationErrorKey, controller);\n unset(ctrl.$$success, validationErrorKey, controller);\n } else {\n if (state) {\n unset(ctrl.$error, validationErrorKey, controller);\n set(ctrl.$$success, validationErrorKey, controller);\n } else {\n set(ctrl.$error, validationErrorKey, controller);\n unset(ctrl.$$success, validationErrorKey, controller);\n }\n }\n if (ctrl.$pending) {\n cachedToggleClass(PENDING_CLASS, true);\n ctrl.$valid = ctrl.$invalid = undefined;\n toggleValidationCss('', null);\n } else {\n cachedToggleClass(PENDING_CLASS, false);\n ctrl.$valid = isObjectEmpty(ctrl.$error);\n ctrl.$invalid = !ctrl.$valid;\n toggleValidationCss('', ctrl.$valid);\n }\n\n // re-read the state as the set/unset methods could have\n // combined state in ctrl.$error[validationError] (used for forms),\n // where setting/unsetting only increments/decrements the value,\n // and does not replace it.\n var combinedState;\n if (ctrl.$pending && ctrl.$pending[validationErrorKey]) {\n combinedState = undefined;\n } else if (ctrl.$error[validationErrorKey]) {\n combinedState = false;\n } else if (ctrl.$$success[validationErrorKey]) {\n combinedState = true;\n } else {\n combinedState = null;\n }\n\n toggleValidationCss(validationErrorKey, combinedState);\n ctrl.$$parentForm.$setValidity(validationErrorKey, combinedState, ctrl);\n }\n\n function createAndSet(name, value, controller) {\n if (!ctrl[name]) {\n ctrl[name] = {};\n }\n set(ctrl[name], value, controller);\n }\n\n function unsetAndCleanup(name, value, controller) {\n if (ctrl[name]) {\n unset(ctrl[name], value, controller);\n }\n if (isObjectEmpty(ctrl[name])) {\n ctrl[name] = undefined;\n }\n }\n\n function cachedToggleClass(className, switchValue) {\n if (switchValue && !classCache[className]) {\n $animate.addClass($element, className);\n classCache[className] = true;\n } else if (!switchValue && classCache[className]) {\n $animate.removeClass($element, className);\n classCache[className] = false;\n }\n }\n\n function toggleValidationCss(validationErrorKey, isValid) {\n validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';\n\n cachedToggleClass(VALID_CLASS + validationErrorKey, isValid === true);\n cachedToggleClass(INVALID_CLASS + validationErrorKey, isValid === false);\n }\n}\n\nfunction isObjectEmpty(obj) {\n if (obj) {\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n return false;\n }\n }\n }\n return true;\n}\n\n/**\n * @ngdoc directive\n * @name ngNonBindable\n * @restrict AC\n * @priority 1000\n *\n * @description\n * The `ngNonBindable` directive tells Angular not to compile or bind the contents of the current\n * DOM element. This is useful if the element contains what appears to be Angular directives and\n * bindings but which should be ignored by Angular. This could be the case if you have a site that\n * displays snippets of code, for instance.\n *\n * @element ANY\n *\n * @example\n * In this example there are two locations where a simple interpolation binding (`{{}}`) is present,\n * but the one wrapped in `ngNonBindable` is left alone.\n *\n * @example\n <example>\n <file name=\"index.html\">\n <div>Normal: {{1 + 2}}</div>\n <div ng-non-bindable>Ignored: {{1 + 2}}</div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-non-bindable', function() {\n expect(element(by.binding('1 + 2')).getText()).toContain('3');\n expect(element.all(by.css('div')).last().getText()).toMatch(/1 \\+ 2/);\n });\n </file>\n </example>\n */\nvar ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });\n\n/* global jqLiteRemove */\n\nvar ngOptionsMinErr = minErr('ngOptions');\n\n/**\n * @ngdoc directive\n * @name ngOptions\n * @restrict A\n *\n * @description\n *\n * The `ngOptions` attribute can be used to dynamically generate a list of `<option>`\n * elements for the `<select>` element using the array or object obtained by evaluating the\n * `ngOptions` comprehension expression.\n *\n * In many cases, `ngRepeat` can be used on `<option>` elements instead of `ngOptions` to achieve a\n * similar result. However, `ngOptions` provides some benefits such as reducing memory and\n * increasing speed by not creating a new scope for each repeated instance, as well as providing\n * more flexibility in how the `<select>`'s model is assigned via the `select` **`as`** part of the\n * comprehension expression. `ngOptions` should be used when the `<select>` model needs to be bound\n * to a non-string value. This is because an option element can only be bound to string values at\n * present.\n *\n * When an item in the `<select>` menu is selected, the array element or object property\n * represented by the selected option will be bound to the model identified by the `ngModel`\n * directive.\n *\n * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can\n * be nested into the `<select>` element. This element will then represent the `null` or \"not selected\"\n * option. See example below for demonstration.\n *\n * ## Complex Models (objects or collections)\n *\n * By default, `ngModel` watches the model by reference, not value. This is important to know when\n * binding the select to a model that is an object or a collection.\n *\n * One issue occurs if you want to preselect an option. For example, if you set\n * the model to an object that is equal to an object in your collection, `ngOptions` won't be able to set the selection,\n * because the objects are not identical. So by default, you should always reference the item in your collection\n * for preselections, e.g.: `$scope.selected = $scope.collection[3]`.\n *\n * Another solution is to use a `track by` clause, because then `ngOptions` will track the identity\n * of the item not by reference, but by the result of the `track by` expression. For example, if your\n * collection items have an id property, you would `track by item.id`.\n *\n * A different issue with objects or collections is that ngModel won't detect if an object property or\n * a collection item changes. For that reason, `ngOptions` additionally watches the model using\n * `$watchCollection`, when the expression contains a `track by` clause or the the select has the `multiple` attribute.\n * This allows ngOptions to trigger a re-rendering of the options even if the actual object/collection\n * has not changed identity, but only a property on the object or an item in the collection changes.\n *\n * Note that `$watchCollection` does a shallow comparison of the properties of the object (or the items in the collection\n * if the model is an array). This means that changing a property deeper than the first level inside the\n * object/collection will not trigger a re-rendering.\n *\n * ## `select` **`as`**\n *\n * Using `select` **`as`** will bind the result of the `select` expression to the model, but\n * the value of the `<select>` and `<option>` html elements will be either the index (for array data sources)\n * or property name (for object data sources) of the value within the collection. If a **`track by`** expression\n * is used, the result of that expression will be set as the value of the `option` and `select` elements.\n *\n *\n * ### `select` **`as`** and **`track by`**\n *\n * <div class=\"alert alert-warning\">\n * Be careful when using `select` **`as`** and **`track by`** in the same expression.\n * </div>\n *\n * Given this array of items on the $scope:\n *\n * ```js\n * $scope.items = [{\n * id: 1,\n * label: 'aLabel',\n * subItem: { name: 'aSubItem' }\n * }, {\n * id: 2,\n * label: 'bLabel',\n * subItem: { name: 'bSubItem' }\n * }];\n * ```\n *\n * This will work:\n *\n * ```html\n * <select ng-options=\"item as item.label for item in items track by item.id\" ng-model=\"selected\"></select>\n * ```\n * ```js\n * $scope.selected = $scope.items[0];\n * ```\n *\n * but this will not work:\n *\n * ```html\n * <select ng-options=\"item.subItem as item.label for item in items track by item.id\" ng-model=\"selected\"></select>\n * ```\n * ```js\n * $scope.selected = $scope.items[0].subItem;\n * ```\n *\n * In both examples, the **`track by`** expression is applied successfully to each `item` in the\n * `items` array. Because the selected option has been set programmatically in the controller, the\n * **`track by`** expression is also applied to the `ngModel` value. In the first example, the\n * `ngModel` value is `items[0]` and the **`track by`** expression evaluates to `items[0].id` with\n * no issue. In the second example, the `ngModel` value is `items[0].subItem` and the **`track by`**\n * expression evaluates to `items[0].subItem.id` (which is undefined). As a result, the model value\n * is not matched against any `<option>` and the `<select>` appears as having no selected value.\n *\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required The control is considered valid only if value is entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {comprehension_expression=} ngOptions in one of the following forms:\n *\n * * for array data sources:\n * * `label` **`for`** `value` **`in`** `array`\n * * `select` **`as`** `label` **`for`** `value` **`in`** `array`\n * * `label` **`group by`** `group` **`for`** `value` **`in`** `array`\n * * `label` **`disable when`** `disable` **`for`** `value` **`in`** `array`\n * * `label` **`group by`** `group` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`\n * * `label` **`disable when`** `disable` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`\n * * `label` **`for`** `value` **`in`** `array` | orderBy:`orderexpr` **`track by`** `trackexpr`\n * (for including a filter with `track by`)\n * * for object data sources:\n * * `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n * * `select` **`as`** `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n * * `label` **`group by`** `group` **`for (`**`key`**`,`** `value`**`) in`** `object`\n * * `label` **`disable when`** `disable` **`for (`**`key`**`,`** `value`**`) in`** `object`\n * * `select` **`as`** `label` **`group by`** `group`\n * **`for` `(`**`key`**`,`** `value`**`) in`** `object`\n * * `select` **`as`** `label` **`disable when`** `disable`\n * **`for` `(`**`key`**`,`** `value`**`) in`** `object`\n *\n * Where:\n *\n * * `array` / `object`: an expression which evaluates to an array / object to iterate over.\n * * `value`: local variable which will refer to each item in the `array` or each property value\n * of `object` during iteration.\n * * `key`: local variable which will refer to a property name in `object` during iteration.\n * * `label`: The result of this expression will be the label for `<option>` element. The\n * `expression` will most likely refer to the `value` variable (e.g. `value.propertyName`).\n * * `select`: The result of this expression will be bound to the model of the parent `<select>`\n * element. If not specified, `select` expression will default to `value`.\n * * `group`: The result of this expression will be used to group options using the `<optgroup>`\n * DOM element.\n * * `disable`: The result of this expression will be used to disable the rendered `<option>`\n * element. Return `true` to disable.\n * * `trackexpr`: Used when working with an array of objects. The result of this expression will be\n * used to identify the objects in the array. The `trackexpr` will most likely refer to the\n * `value` variable (e.g. `value.propertyName`). With this the selection is preserved\n * even when the options are recreated (e.g. reloaded from the server).\n *\n * @example\n <example module=\"selectExample\">\n <file name=\"index.html\">\n <script>\n angular.module('selectExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.colors = [\n {name:'black', shade:'dark'},\n {name:'white', shade:'light', notAnOption: true},\n {name:'red', shade:'dark'},\n {name:'blue', shade:'dark', notAnOption: true},\n {name:'yellow', shade:'light', notAnOption: false}\n ];\n $scope.myColor = $scope.colors[2]; // red\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <ul>\n <li ng-repeat=\"color in colors\">\n <label>Name: <input ng-model=\"color.name\"></label>\n <label><input type=\"checkbox\" ng-model=\"color.notAnOption\"> Disabled?</label>\n <button ng-click=\"colors.splice($index, 1)\" aria-label=\"Remove\">X</button>\n </li>\n <li>\n <button ng-click=\"colors.push({})\">add</button>\n </li>\n </ul>\n <hr/>\n <label>Color (null not allowed):\n <select ng-model=\"myColor\" ng-options=\"color.name for color in colors\"></select>\n </label><br/>\n <label>Color (null allowed):\n <span class=\"nullable\">\n <select ng-model=\"myColor\" ng-options=\"color.name for color in colors\">\n <option value=\"\">-- choose color --</option>\n </select>\n </span></label><br/>\n\n <label>Color grouped by shade:\n <select ng-model=\"myColor\" ng-options=\"color.name group by color.shade for color in colors\">\n </select>\n </label><br/>\n\n <label>Color grouped by shade, with some disabled:\n <select ng-model=\"myColor\"\n ng-options=\"color.name group by color.shade disable when color.notAnOption for color in colors\">\n </select>\n </label><br/>\n\n\n\n Select <button ng-click=\"myColor = { name:'not in list', shade: 'other' }\">bogus</button>.\n <br/>\n <hr/>\n Currently selected: {{ {selected_color:myColor} }}\n <div style=\"border:solid 1px black; height:20px\"\n ng-style=\"{'background-color':myColor.name}\">\n </div>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-options', function() {\n expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red');\n element.all(by.model('myColor')).first().click();\n element.all(by.css('select[ng-model=\"myColor\"] option')).first().click();\n expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black');\n element(by.css('.nullable select[ng-model=\"myColor\"]')).click();\n element.all(by.css('.nullable select[ng-model=\"myColor\"] option')).first().click();\n expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null');\n });\n </file>\n </example>\n */\n\n// jshint maxlen: false\n// //00001111111111000000000002222222222000000000000000000000333333333300000000000000000000000004444444444400000000000005555555555555550000000006666666666666660000000777777777777777000000000000000888888888800000000000000000009999999999\nvar NG_OPTIONS_REGEXP = /^\\s*([\\s\\S]+?)(?:\\s+as\\s+([\\s\\S]+?))?(?:\\s+group\\s+by\\s+([\\s\\S]+?))?(?:\\s+disable\\s+when\\s+([\\s\\S]+?))?\\s+for\\s+(?:([\\$\\w][\\$\\w]*)|(?:\\(\\s*([\\$\\w][\\$\\w]*)\\s*,\\s*([\\$\\w][\\$\\w]*)\\s*\\)))\\s+in\\s+([\\s\\S]+?)(?:\\s+track\\s+by\\s+([\\s\\S]+?))?$/;\n // 1: value expression (valueFn)\n // 2: label expression (displayFn)\n // 3: group by expression (groupByFn)\n // 4: disable when expression (disableWhenFn)\n // 5: array item variable name\n // 6: object item key variable name\n // 7: object item value variable name\n // 8: collection expression\n // 9: track by expression\n// jshint maxlen: 100\n\n\nvar ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) {\n\n function parseOptionsExpression(optionsExp, selectElement, scope) {\n\n var match = optionsExp.match(NG_OPTIONS_REGEXP);\n if (!(match)) {\n throw ngOptionsMinErr('iexp',\n \"Expected expression in form of \" +\n \"'_select_ (as _label_)? for (_key_,)?_value_ in _collection_'\" +\n \" but got '{0}'. Element: {1}\",\n optionsExp, startingTag(selectElement));\n }\n\n // Extract the parts from the ngOptions expression\n\n // The variable name for the value of the item in the collection\n var valueName = match[5] || match[7];\n // The variable name for the key of the item in the collection\n var keyName = match[6];\n\n // An expression that generates the viewValue for an option if there is a label expression\n var selectAs = / as /.test(match[0]) && match[1];\n // An expression that is used to track the id of each object in the options collection\n var trackBy = match[9];\n // An expression that generates the viewValue for an option if there is no label expression\n var valueFn = $parse(match[2] ? match[1] : valueName);\n var selectAsFn = selectAs && $parse(selectAs);\n var viewValueFn = selectAsFn || valueFn;\n var trackByFn = trackBy && $parse(trackBy);\n\n // Get the value by which we are going to track the option\n // if we have a trackFn then use that (passing scope and locals)\n // otherwise just hash the given viewValue\n var getTrackByValueFn = trackBy ?\n function(value, locals) { return trackByFn(scope, locals); } :\n function getHashOfValue(value) { return hashKey(value); };\n var getTrackByValue = function(value, key) {\n return getTrackByValueFn(value, getLocals(value, key));\n };\n\n var displayFn = $parse(match[2] || match[1]);\n var groupByFn = $parse(match[3] || '');\n var disableWhenFn = $parse(match[4] || '');\n var valuesFn = $parse(match[8]);\n\n var locals = {};\n var getLocals = keyName ? function(value, key) {\n locals[keyName] = key;\n locals[valueName] = value;\n return locals;\n } : function(value) {\n locals[valueName] = value;\n return locals;\n };\n\n\n function Option(selectValue, viewValue, label, group, disabled) {\n this.selectValue = selectValue;\n this.viewValue = viewValue;\n this.label = label;\n this.group = group;\n this.disabled = disabled;\n }\n\n function getOptionValuesKeys(optionValues) {\n var optionValuesKeys;\n\n if (!keyName && isArrayLike(optionValues)) {\n optionValuesKeys = optionValues;\n } else {\n // if object, extract keys, in enumeration order, unsorted\n optionValuesKeys = [];\n for (var itemKey in optionValues) {\n if (optionValues.hasOwnProperty(itemKey) && itemKey.charAt(0) !== '$') {\n optionValuesKeys.push(itemKey);\n }\n }\n }\n return optionValuesKeys;\n }\n\n return {\n trackBy: trackBy,\n getTrackByValue: getTrackByValue,\n getWatchables: $parse(valuesFn, function(optionValues) {\n // Create a collection of things that we would like to watch (watchedArray)\n // so that they can all be watched using a single $watchCollection\n // that only runs the handler once if anything changes\n var watchedArray = [];\n optionValues = optionValues || [];\n\n var optionValuesKeys = getOptionValuesKeys(optionValues);\n var optionValuesLength = optionValuesKeys.length;\n for (var index = 0; index < optionValuesLength; index++) {\n var key = (optionValues === optionValuesKeys) ? index : optionValuesKeys[index];\n var value = optionValues[key];\n\n var locals = getLocals(optionValues[key], key);\n var selectValue = getTrackByValueFn(optionValues[key], locals);\n watchedArray.push(selectValue);\n\n // Only need to watch the displayFn if there is a specific label expression\n if (match[2] || match[1]) {\n var label = displayFn(scope, locals);\n watchedArray.push(label);\n }\n\n // Only need to watch the disableWhenFn if there is a specific disable expression\n if (match[4]) {\n var disableWhen = disableWhenFn(scope, locals);\n watchedArray.push(disableWhen);\n }\n }\n return watchedArray;\n }),\n\n getOptions: function() {\n\n var optionItems = [];\n var selectValueMap = {};\n\n // The option values were already computed in the `getWatchables` fn,\n // which must have been called to trigger `getOptions`\n var optionValues = valuesFn(scope) || [];\n var optionValuesKeys = getOptionValuesKeys(optionValues);\n var optionValuesLength = optionValuesKeys.length;\n\n for (var index = 0; index < optionValuesLength; index++) {\n var key = (optionValues === optionValuesKeys) ? index : optionValuesKeys[index];\n var value = optionValues[key];\n var locals = getLocals(value, key);\n var viewValue = viewValueFn(scope, locals);\n var selectValue = getTrackByValueFn(viewValue, locals);\n var label = displayFn(scope, locals);\n var group = groupByFn(scope, locals);\n var disabled = disableWhenFn(scope, locals);\n var optionItem = new Option(selectValue, viewValue, label, group, disabled);\n\n optionItems.push(optionItem);\n selectValueMap[selectValue] = optionItem;\n }\n\n return {\n items: optionItems,\n selectValueMap: selectValueMap,\n getOptionFromViewValue: function(value) {\n return selectValueMap[getTrackByValue(value)];\n },\n getViewValueFromOption: function(option) {\n // If the viewValue could be an object that may be mutated by the application,\n // we need to make a copy and not return the reference to the value on the option.\n return trackBy ? angular.copy(option.viewValue) : option.viewValue;\n }\n };\n }\n };\n }\n\n\n // we can't just jqLite('<option>') since jqLite is not smart enough\n // to create it in <select> and IE barfs otherwise.\n var optionTemplate = document.createElement('option'),\n optGroupTemplate = document.createElement('optgroup');\n\n\n function ngOptionsPostLink(scope, selectElement, attr, ctrls) {\n\n // if ngModel is not defined, we don't need to do anything\n var ngModelCtrl = ctrls[1];\n if (!ngModelCtrl) return;\n\n var selectCtrl = ctrls[0];\n var multiple = attr.multiple;\n\n // The emptyOption allows the application developer to provide their own custom \"empty\"\n // option when the viewValue does not match any of the option values.\n var emptyOption;\n for (var i = 0, children = selectElement.children(), ii = children.length; i < ii; i++) {\n if (children[i].value === '') {\n emptyOption = children.eq(i);\n break;\n }\n }\n\n var providedEmptyOption = !!emptyOption;\n\n var unknownOption = jqLite(optionTemplate.cloneNode(false));\n unknownOption.val('?');\n\n var options;\n var ngOptions = parseOptionsExpression(attr.ngOptions, selectElement, scope);\n\n\n var renderEmptyOption = function() {\n if (!providedEmptyOption) {\n selectElement.prepend(emptyOption);\n }\n selectElement.val('');\n emptyOption.prop('selected', true); // needed for IE\n emptyOption.attr('selected', true);\n };\n\n var removeEmptyOption = function() {\n if (!providedEmptyOption) {\n emptyOption.remove();\n }\n };\n\n\n var renderUnknownOption = function() {\n selectElement.prepend(unknownOption);\n selectElement.val('?');\n unknownOption.prop('selected', true); // needed for IE\n unknownOption.attr('selected', true);\n };\n\n var removeUnknownOption = function() {\n unknownOption.remove();\n };\n\n // Update the controller methods for multiple selectable options\n if (!multiple) {\n\n selectCtrl.writeValue = function writeNgOptionsValue(value) {\n var option = options.getOptionFromViewValue(value);\n\n if (option && !option.disabled) {\n // Don't update the option when it is already selected.\n // For example, the browser will select the first option by default. In that case,\n // most properties are set automatically - except the `selected` attribute, which we\n // set always\n\n if (selectElement[0].value !== option.selectValue) {\n removeUnknownOption();\n removeEmptyOption();\n\n selectElement[0].value = option.selectValue;\n option.element.selected = true;\n }\n\n option.element.setAttribute('selected', 'selected');\n } else {\n if (value === null || providedEmptyOption) {\n removeUnknownOption();\n renderEmptyOption();\n } else {\n removeEmptyOption();\n renderUnknownOption();\n }\n }\n };\n\n selectCtrl.readValue = function readNgOptionsValue() {\n\n var selectedOption = options.selectValueMap[selectElement.val()];\n\n if (selectedOption && !selectedOption.disabled) {\n removeEmptyOption();\n removeUnknownOption();\n return options.getViewValueFromOption(selectedOption);\n }\n return null;\n };\n\n // If we are using `track by` then we must watch the tracked value on the model\n // since ngModel only watches for object identity change\n if (ngOptions.trackBy) {\n scope.$watch(\n function() { return ngOptions.getTrackByValue(ngModelCtrl.$viewValue); },\n function() { ngModelCtrl.$render(); }\n );\n }\n\n } else {\n\n ngModelCtrl.$isEmpty = function(value) {\n return !value || value.length === 0;\n };\n\n\n selectCtrl.writeValue = function writeNgOptionsMultiple(value) {\n options.items.forEach(function(option) {\n option.element.selected = false;\n });\n\n if (value) {\n value.forEach(function(item) {\n var option = options.getOptionFromViewValue(item);\n if (option && !option.disabled) option.element.selected = true;\n });\n }\n };\n\n\n selectCtrl.readValue = function readNgOptionsMultiple() {\n var selectedValues = selectElement.val() || [],\n selections = [];\n\n forEach(selectedValues, function(value) {\n var option = options.selectValueMap[value];\n if (option && !option.disabled) selections.push(options.getViewValueFromOption(option));\n });\n\n return selections;\n };\n\n // If we are using `track by` then we must watch these tracked values on the model\n // since ngModel only watches for object identity change\n if (ngOptions.trackBy) {\n\n scope.$watchCollection(function() {\n if (isArray(ngModelCtrl.$viewValue)) {\n return ngModelCtrl.$viewValue.map(function(value) {\n return ngOptions.getTrackByValue(value);\n });\n }\n }, function() {\n ngModelCtrl.$render();\n });\n\n }\n }\n\n\n if (providedEmptyOption) {\n\n // we need to remove it before calling selectElement.empty() because otherwise IE will\n // remove the label from the element. wtf?\n emptyOption.remove();\n\n // compile the element since there might be bindings in it\n $compile(emptyOption)(scope);\n\n // remove the class, which is added automatically because we recompile the element and it\n // becomes the compilation root\n emptyOption.removeClass('ng-scope');\n } else {\n emptyOption = jqLite(optionTemplate.cloneNode(false));\n }\n\n // We need to do this here to ensure that the options object is defined\n // when we first hit it in writeNgOptionsValue\n updateOptions();\n\n // We will re-render the option elements if the option values or labels change\n scope.$watchCollection(ngOptions.getWatchables, updateOptions);\n\n // ------------------------------------------------------------------ //\n\n\n function updateOptionElement(option, element) {\n option.element = element;\n element.disabled = option.disabled;\n // NOTE: The label must be set before the value, otherwise IE10/11/EDGE create unresponsive\n // selects in certain circumstances when multiple selects are next to each other and display\n // the option list in listbox style, i.e. the select is [multiple], or specifies a [size].\n // See https://github.com/angular/angular.js/issues/11314 for more info.\n // This is unfortunately untestable with unit / e2e tests\n if (option.label !== element.label) {\n element.label = option.label;\n element.textContent = option.label;\n }\n if (option.value !== element.value) element.value = option.selectValue;\n }\n\n function addOrReuseElement(parent, current, type, templateElement) {\n var element;\n // Check whether we can reuse the next element\n if (current && lowercase(current.nodeName) === type) {\n // The next element is the right type so reuse it\n element = current;\n } else {\n // The next element is not the right type so create a new one\n element = templateElement.cloneNode(false);\n if (!current) {\n // There are no more elements so just append it to the select\n parent.appendChild(element);\n } else {\n // The next element is not a group so insert the new one\n parent.insertBefore(element, current);\n }\n }\n return element;\n }\n\n\n function removeExcessElements(current) {\n var next;\n while (current) {\n next = current.nextSibling;\n jqLiteRemove(current);\n current = next;\n }\n }\n\n\n function skipEmptyAndUnknownOptions(current) {\n var emptyOption_ = emptyOption && emptyOption[0];\n var unknownOption_ = unknownOption && unknownOption[0];\n\n // We cannot rely on the extracted empty option being the same as the compiled empty option,\n // because the compiled empty option might have been replaced by a comment because\n // it had an \"element\" transclusion directive on it (such as ngIf)\n if (emptyOption_ || unknownOption_) {\n while (current &&\n (current === emptyOption_ ||\n current === unknownOption_ ||\n current.nodeType === NODE_TYPE_COMMENT ||\n (nodeName_(current) === 'option' && current.value === ''))) {\n current = current.nextSibling;\n }\n }\n return current;\n }\n\n\n function updateOptions() {\n\n var previousValue = options && selectCtrl.readValue();\n\n options = ngOptions.getOptions();\n\n var groupMap = {};\n var currentElement = selectElement[0].firstChild;\n\n // Ensure that the empty option is always there if it was explicitly provided\n if (providedEmptyOption) {\n selectElement.prepend(emptyOption);\n }\n\n currentElement = skipEmptyAndUnknownOptions(currentElement);\n\n options.items.forEach(function updateOption(option) {\n var group;\n var groupElement;\n var optionElement;\n\n if (option.group) {\n\n // This option is to live in a group\n // See if we have already created this group\n group = groupMap[option.group];\n\n if (!group) {\n\n // We have not already created this group\n groupElement = addOrReuseElement(selectElement[0],\n currentElement,\n 'optgroup',\n optGroupTemplate);\n // Move to the next element\n currentElement = groupElement.nextSibling;\n\n // Update the label on the group element\n groupElement.label = option.group;\n\n // Store it for use later\n group = groupMap[option.group] = {\n groupElement: groupElement,\n currentOptionElement: groupElement.firstChild\n };\n\n }\n\n // So now we have a group for this option we add the option to the group\n optionElement = addOrReuseElement(group.groupElement,\n group.currentOptionElement,\n 'option',\n optionTemplate);\n updateOptionElement(option, optionElement);\n // Move to the next element\n group.currentOptionElement = optionElement.nextSibling;\n\n } else {\n\n // This option is not in a group\n optionElement = addOrReuseElement(selectElement[0],\n currentElement,\n 'option',\n optionTemplate);\n updateOptionElement(option, optionElement);\n // Move to the next element\n currentElement = optionElement.nextSibling;\n }\n });\n\n\n // Now remove all excess options and group\n Object.keys(groupMap).forEach(function(key) {\n removeExcessElements(groupMap[key].currentOptionElement);\n });\n removeExcessElements(currentElement);\n\n ngModelCtrl.$render();\n\n // Check to see if the value has changed due to the update to the options\n if (!ngModelCtrl.$isEmpty(previousValue)) {\n var nextValue = selectCtrl.readValue();\n var isNotPrimitive = ngOptions.trackBy || multiple;\n if (isNotPrimitive ? !equals(previousValue, nextValue) : previousValue !== nextValue) {\n ngModelCtrl.$setViewValue(nextValue);\n ngModelCtrl.$render();\n }\n }\n\n }\n }\n\n return {\n restrict: 'A',\n terminal: true,\n require: ['select', '?ngModel'],\n link: {\n pre: function ngOptionsPreLink(scope, selectElement, attr, ctrls) {\n // Deactivate the SelectController.register method to prevent\n // option directives from accidentally registering themselves\n // (and unwanted $destroy handlers etc.)\n ctrls[0].registerOption = noop;\n },\n post: ngOptionsPostLink\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngPluralize\n * @restrict EA\n *\n * @description\n * `ngPluralize` is a directive that displays messages according to en-US localization rules.\n * These rules are bundled with angular.js, but can be overridden\n * (see {@link guide/i18n Angular i18n} dev guide). You configure ngPluralize directive\n * by specifying the mappings between\n * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)\n * and the strings to be displayed.\n *\n * # Plural categories and explicit number rules\n * There are two\n * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)\n * in Angular's default en-US locale: \"one\" and \"other\".\n *\n * While a plural category may match many numbers (for example, in en-US locale, \"other\" can match\n * any number that is not 1), an explicit number rule can only match one number. For example, the\n * explicit number rule for \"3\" matches the number 3. There are examples of plural categories\n * and explicit number rules throughout the rest of this documentation.\n *\n * # Configuring ngPluralize\n * You configure ngPluralize by providing 2 attributes: `count` and `when`.\n * You can also provide an optional attribute, `offset`.\n *\n * The value of the `count` attribute can be either a string or an {@link guide/expression\n * Angular expression}; these are evaluated on the current scope for its bound value.\n *\n * The `when` attribute specifies the mappings between plural categories and the actual\n * string to be displayed. The value of the attribute should be a JSON object.\n *\n * The following example shows how to configure ngPluralize:\n *\n * ```html\n * <ng-pluralize count=\"personCount\"\n when=\"{'0': 'Nobody is viewing.',\n * 'one': '1 person is viewing.',\n * 'other': '{} people are viewing.'}\">\n * </ng-pluralize>\n *```\n *\n * In the example, `\"0: Nobody is viewing.\"` is an explicit number rule. If you did not\n * specify this rule, 0 would be matched to the \"other\" category and \"0 people are viewing\"\n * would be shown instead of \"Nobody is viewing\". You can specify an explicit number rule for\n * other numbers, for example 12, so that instead of showing \"12 people are viewing\", you can\n * show \"a dozen people are viewing\".\n *\n * You can use a set of closed braces (`{}`) as a placeholder for the number that you want substituted\n * into pluralized strings. In the previous example, Angular will replace `{}` with\n * <span ng-non-bindable>`{{personCount}}`</span>. The closed braces `{}` is a placeholder\n * for <span ng-non-bindable>{{numberExpression}}</span>.\n *\n * If no rule is defined for a category, then an empty string is displayed and a warning is generated.\n * Note that some locales define more categories than `one` and `other`. For example, fr-fr defines `few` and `many`.\n *\n * # Configuring ngPluralize with offset\n * The `offset` attribute allows further customization of pluralized text, which can result in\n * a better user experience. For example, instead of the message \"4 people are viewing this document\",\n * you might display \"John, Kate and 2 others are viewing this document\".\n * The offset attribute allows you to offset a number by any desired value.\n * Let's take a look at an example:\n *\n * ```html\n * <ng-pluralize count=\"personCount\" offset=2\n * when=\"{'0': 'Nobody is viewing.',\n * '1': '{{person1}} is viewing.',\n * '2': '{{person1}} and {{person2}} are viewing.',\n * 'one': '{{person1}}, {{person2}} and one other person are viewing.',\n * 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}\">\n * </ng-pluralize>\n * ```\n *\n * Notice that we are still using two plural categories(one, other), but we added\n * three explicit number rules 0, 1 and 2.\n * When one person, perhaps John, views the document, \"John is viewing\" will be shown.\n * When three people view the document, no explicit number rule is found, so\n * an offset of 2 is taken off 3, and Angular uses 1 to decide the plural category.\n * In this case, plural category 'one' is matched and \"John, Mary and one other person are viewing\"\n * is shown.\n *\n * Note that when you specify offsets, you must provide explicit number rules for\n * numbers from 0 up to and including the offset. If you use an offset of 3, for example,\n * you must provide explicit number rules for 0, 1, 2 and 3. You must also provide plural strings for\n * plural categories \"one\" and \"other\".\n *\n * @param {string|expression} count The variable to be bound to.\n * @param {string} when The mapping between plural category to its corresponding strings.\n * @param {number=} offset Offset to deduct from the total number.\n *\n * @example\n <example module=\"pluralizeExample\">\n <file name=\"index.html\">\n <script>\n angular.module('pluralizeExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.person1 = 'Igor';\n $scope.person2 = 'Misko';\n $scope.personCount = 1;\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <label>Person 1:<input type=\"text\" ng-model=\"person1\" value=\"Igor\" /></label><br/>\n <label>Person 2:<input type=\"text\" ng-model=\"person2\" value=\"Misko\" /></label><br/>\n <label>Number of People:<input type=\"text\" ng-model=\"personCount\" value=\"1\" /></label><br/>\n\n <!--- Example with simple pluralization rules for en locale --->\n Without Offset:\n <ng-pluralize count=\"personCount\"\n when=\"{'0': 'Nobody is viewing.',\n 'one': '1 person is viewing.',\n 'other': '{} people are viewing.'}\">\n </ng-pluralize><br>\n\n <!--- Example with offset --->\n With Offset(2):\n <ng-pluralize count=\"personCount\" offset=2\n when=\"{'0': 'Nobody is viewing.',\n '1': '{{person1}} is viewing.',\n '2': '{{person1}} and {{person2}} are viewing.',\n 'one': '{{person1}}, {{person2}} and one other person are viewing.',\n 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}\">\n </ng-pluralize>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should show correct pluralized string', function() {\n var withoutOffset = element.all(by.css('ng-pluralize')).get(0);\n var withOffset = element.all(by.css('ng-pluralize')).get(1);\n var countInput = element(by.model('personCount'));\n\n expect(withoutOffset.getText()).toEqual('1 person is viewing.');\n expect(withOffset.getText()).toEqual('Igor is viewing.');\n\n countInput.clear();\n countInput.sendKeys('0');\n\n expect(withoutOffset.getText()).toEqual('Nobody is viewing.');\n expect(withOffset.getText()).toEqual('Nobody is viewing.');\n\n countInput.clear();\n countInput.sendKeys('2');\n\n expect(withoutOffset.getText()).toEqual('2 people are viewing.');\n expect(withOffset.getText()).toEqual('Igor and Misko are viewing.');\n\n countInput.clear();\n countInput.sendKeys('3');\n\n expect(withoutOffset.getText()).toEqual('3 people are viewing.');\n expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.');\n\n countInput.clear();\n countInput.sendKeys('4');\n\n expect(withoutOffset.getText()).toEqual('4 people are viewing.');\n expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.');\n });\n it('should show data-bound names', function() {\n var withOffset = element.all(by.css('ng-pluralize')).get(1);\n var personCount = element(by.model('personCount'));\n var person1 = element(by.model('person1'));\n var person2 = element(by.model('person2'));\n personCount.clear();\n personCount.sendKeys('4');\n person1.clear();\n person1.sendKeys('Di');\n person2.clear();\n person2.sendKeys('Vojta');\n expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.');\n });\n </file>\n </example>\n */\nvar ngPluralizeDirective = ['$locale', '$interpolate', '$log', function($locale, $interpolate, $log) {\n var BRACE = /{}/g,\n IS_WHEN = /^when(Minus)?(.+)$/;\n\n return {\n link: function(scope, element, attr) {\n var numberExp = attr.count,\n whenExp = attr.$attr.when && element.attr(attr.$attr.when), // we have {{}} in attrs\n offset = attr.offset || 0,\n whens = scope.$eval(whenExp) || {},\n whensExpFns = {},\n startSymbol = $interpolate.startSymbol(),\n endSymbol = $interpolate.endSymbol(),\n braceReplacement = startSymbol + numberExp + '-' + offset + endSymbol,\n watchRemover = angular.noop,\n lastCount;\n\n forEach(attr, function(expression, attributeName) {\n var tmpMatch = IS_WHEN.exec(attributeName);\n if (tmpMatch) {\n var whenKey = (tmpMatch[1] ? '-' : '') + lowercase(tmpMatch[2]);\n whens[whenKey] = element.attr(attr.$attr[attributeName]);\n }\n });\n forEach(whens, function(expression, key) {\n whensExpFns[key] = $interpolate(expression.replace(BRACE, braceReplacement));\n\n });\n\n scope.$watch(numberExp, function ngPluralizeWatchAction(newVal) {\n var count = parseFloat(newVal);\n var countIsNaN = isNaN(count);\n\n if (!countIsNaN && !(count in whens)) {\n // If an explicit number rule such as 1, 2, 3... is defined, just use it.\n // Otherwise, check it against pluralization rules in $locale service.\n count = $locale.pluralCat(count - offset);\n }\n\n // If both `count` and `lastCount` are NaN, we don't need to re-register a watch.\n // In JS `NaN !== NaN`, so we have to exlicitly check.\n if ((count !== lastCount) && !(countIsNaN && isNumber(lastCount) && isNaN(lastCount))) {\n watchRemover();\n var whenExpFn = whensExpFns[count];\n if (isUndefined(whenExpFn)) {\n if (newVal != null) {\n $log.debug(\"ngPluralize: no rule defined for '\" + count + \"' in \" + whenExp);\n }\n watchRemover = noop;\n updateElementText();\n } else {\n watchRemover = scope.$watch(whenExpFn, updateElementText);\n }\n lastCount = count;\n }\n });\n\n function updateElementText(newText) {\n element.text(newText || '');\n }\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngRepeat\n * @multiElement\n *\n * @description\n * The `ngRepeat` directive instantiates a template once per item from a collection. Each template\n * instance gets its own scope, where the given loop variable is set to the current collection item,\n * and `$index` is set to the item index or key.\n *\n * Special properties are exposed on the local scope of each template instance, including:\n *\n * | Variable | Type | Details |\n * |-----------|-----------------|-----------------------------------------------------------------------------|\n * | `$index` | {@type number} | iterator offset of the repeated element (0..length-1) |\n * | `$first` | {@type boolean} | true if the repeated element is first in the iterator. |\n * | `$middle` | {@type boolean} | true if the repeated element is between the first and last in the iterator. |\n * | `$last` | {@type boolean} | true if the repeated element is last in the iterator. |\n * | `$even` | {@type boolean} | true if the iterator position `$index` is even (otherwise false). |\n * | `$odd` | {@type boolean} | true if the iterator position `$index` is odd (otherwise false). |\n *\n * <div class=\"alert alert-info\">\n * Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}.\n * This may be useful when, for instance, nesting ngRepeats.\n * </div>\n *\n *\n * # Iterating over object properties\n *\n * It is possible to get `ngRepeat` to iterate over the properties of an object using the following\n * syntax:\n *\n * ```js\n * <div ng-repeat=\"(key, value) in myObj\"> ... </div>\n * ```\n *\n * You need to be aware that the JavaScript specification does not define the order of keys\n * returned for an object. (To mitigate this in Angular 1.3 the `ngRepeat` directive\n * used to sort the keys alphabetically.)\n *\n * Version 1.4 removed the alphabetic sorting. We now rely on the order returned by the browser\n * when running `for key in myObj`. It seems that browsers generally follow the strategy of providing\n * keys in the order in which they were defined, although there are exceptions when keys are deleted\n * and reinstated. See the [MDN page on `delete` for more info](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete#Cross-browser_notes).\n *\n * If this is not desired, the recommended workaround is to convert your object into an array\n * that is sorted into the order that you prefer before providing it to `ngRepeat`. You could\n * do this with a filter such as [toArrayFilter](http://ngmodules.org/modules/angular-toArrayFilter)\n * or implement a `$watch` on the object yourself.\n *\n *\n * # Tracking and Duplicates\n *\n * `ngRepeat` uses {@link $rootScope.Scope#$watchCollection $watchCollection} to detect changes in\n * the collection. When a change happens, ngRepeat then makes the corresponding changes to the DOM:\n *\n * * When an item is added, a new instance of the template is added to the DOM.\n * * When an item is removed, its template instance is removed from the DOM.\n * * When items are reordered, their respective templates are reordered in the DOM.\n *\n * To minimize creation of DOM elements, `ngRepeat` uses a function\n * to \"keep track\" of all items in the collection and their corresponding DOM elements.\n * For example, if an item is added to the collection, ngRepeat will know that all other items\n * already have DOM elements, and will not re-render them.\n *\n * The default tracking function (which tracks items by their identity) does not allow\n * duplicate items in arrays. This is because when there are duplicates, it is not possible\n * to maintain a one-to-one mapping between collection items and DOM elements.\n *\n * If you do need to repeat duplicate items, you can substitute the default tracking behavior\n * with your own using the `track by` expression.\n *\n * For example, you may track items by the index of each item in the collection, using the\n * special scope property `$index`:\n * ```html\n * <div ng-repeat=\"n in [42, 42, 43, 43] track by $index\">\n * {{n}}\n * </div>\n * ```\n *\n * You may also use arbitrary expressions in `track by`, including references to custom functions\n * on the scope:\n * ```html\n * <div ng-repeat=\"n in [42, 42, 43, 43] track by myTrackingFunction(n)\">\n * {{n}}\n * </div>\n * ```\n *\n * <div class=\"alert alert-success\">\n * If you are working with objects that have an identifier property, you should track\n * by the identifier instead of the whole object. Should you reload your data later, `ngRepeat`\n * will not have to rebuild the DOM elements for items it has already rendered, even if the\n * JavaScript objects in the collection have been substituted for new ones. For large collections,\n * this signifincantly improves rendering performance. If you don't have a unique identifier,\n * `track by $index` can also provide a performance boost.\n * </div>\n * ```html\n * <div ng-repeat=\"model in collection track by model.id\">\n * {{model.name}}\n * </div>\n * ```\n *\n * When no `track by` expression is provided, it is equivalent to tracking by the built-in\n * `$id` function, which tracks items by their identity:\n * ```html\n * <div ng-repeat=\"obj in collection track by $id(obj)\">\n * {{obj.prop}}\n * </div>\n * ```\n *\n * <div class=\"alert alert-warning\">\n * **Note:** `track by` must always be the last expression:\n * </div>\n * ```\n * <div ng-repeat=\"model in collection | orderBy: 'id' as filtered_result track by model.id\">\n * {{model.name}}\n * </div>\n * ```\n *\n * # Special repeat start and end points\n * To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending\n * the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.\n * The **ng-repeat-start** directive works the same as **ng-repeat**, but will repeat all the HTML code (including the tag it's defined on)\n * up to and including the ending HTML tag where **ng-repeat-end** is placed.\n *\n * The example below makes use of this feature:\n * ```html\n * <header ng-repeat-start=\"item in items\">\n * Header {{ item }}\n * </header>\n * <div class=\"body\">\n * Body {{ item }}\n * </div>\n * <footer ng-repeat-end>\n * Footer {{ item }}\n * </footer>\n * ```\n *\n * And with an input of {@type ['A','B']} for the items variable in the example above, the output will evaluate to:\n * ```html\n * <header>\n * Header A\n * </header>\n * <div class=\"body\">\n * Body A\n * </div>\n * <footer>\n * Footer A\n * </footer>\n * <header>\n * Header B\n * </header>\n * <div class=\"body\">\n * Body B\n * </div>\n * <footer>\n * Footer B\n * </footer>\n * ```\n *\n * The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such\n * as **data-ng-repeat-start**, **x-ng-repeat-start** and **ng:repeat-start**).\n *\n * @animations\n * **.enter** - when a new item is added to the list or when an item is revealed after a filter\n *\n * **.leave** - when an item is removed from the list or when an item is filtered out\n *\n * **.move** - when an adjacent item is filtered out causing a reorder or when the item contents are reordered\n *\n * @element ANY\n * @scope\n * @priority 1000\n * @param {repeat_expression} ngRepeat The expression indicating how to enumerate a collection. These\n * formats are currently supported:\n *\n * * `variable in expression` where variable is the user defined loop variable and `expression`\n * is a scope expression giving the collection to enumerate.\n *\n * For example: `album in artist.albums`.\n *\n * * `(key, value) in expression` where `key` and `value` can be any user defined identifiers,\n * and `expression` is the scope expression giving the collection to enumerate.\n *\n * For example: `(name, age) in {'adam':10, 'amalie':12}`.\n *\n * * `variable in expression track by tracking_expression` You can also provide an optional tracking expression\n * which can be used to associate the objects in the collection with the DOM elements. If no tracking expression\n * is specified, ng-repeat associates elements by identity. It is an error to have\n * more than one tracking expression value resolve to the same key. (This would mean that two distinct objects are\n * mapped to the same DOM element, which is not possible.)\n *\n * Note that the tracking expression must come last, after any filters, and the alias expression.\n *\n * For example: `item in items` is equivalent to `item in items track by $id(item)`. This implies that the DOM elements\n * will be associated by item identity in the array.\n *\n * For example: `item in items track by $id(item)`. A built in `$id()` function can be used to assign a unique\n * `$$hashKey` property to each item in the array. This property is then used as a key to associated DOM elements\n * with the corresponding item in the array by identity. Moving the same object in array would move the DOM\n * element in the same way in the DOM.\n *\n * For example: `item in items track by item.id` is a typical pattern when the items come from the database. In this\n * case the object identity does not matter. Two objects are considered equivalent as long as their `id`\n * property is same.\n *\n * For example: `item in items | filter:searchText track by item.id` is a pattern that might be used to apply a filter\n * to items in conjunction with a tracking expression.\n *\n * * `variable in expression as alias_expression` You can also provide an optional alias expression which will then store the\n * intermediate results of the repeater after the filters have been applied. Typically this is used to render a special message\n * when a filter is active on the repeater, but the filtered result set is empty.\n *\n * For example: `item in items | filter:x as results` will store the fragment of the repeated items as `results`, but only after\n * the items have been processed through the filter.\n *\n * Please note that `as [variable name] is not an operator but rather a part of ngRepeat micro-syntax so it can be used only at the end\n * (and not as operator, inside an expression).\n *\n * For example: `item in items | filter : x | orderBy : order | limitTo : limit as results` .\n *\n * @example\n * This example initializes the scope to a list of names and\n * then uses `ngRepeat` to display every person:\n <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n <file name=\"index.html\">\n <div ng-init=\"friends = [\n {name:'John', age:25, gender:'boy'},\n {name:'Jessie', age:30, gender:'girl'},\n {name:'Johanna', age:28, gender:'girl'},\n {name:'Joy', age:15, gender:'girl'},\n {name:'Mary', age:28, gender:'girl'},\n {name:'Peter', age:95, gender:'boy'},\n {name:'Sebastian', age:50, gender:'boy'},\n {name:'Erika', age:27, gender:'girl'},\n {name:'Patrick', age:40, gender:'boy'},\n {name:'Samantha', age:60, gender:'girl'}\n ]\">\n I have {{friends.length}} friends. They are:\n <input type=\"search\" ng-model=\"q\" placeholder=\"filter friends...\" aria-label=\"filter friends\" />\n <ul class=\"example-animate-container\">\n <li class=\"animate-repeat\" ng-repeat=\"friend in friends | filter:q as results\">\n [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.\n </li>\n <li class=\"animate-repeat\" ng-if=\"results.length == 0\">\n <strong>No results found...</strong>\n </li>\n </ul>\n </div>\n </file>\n <file name=\"animations.css\">\n .example-animate-container {\n background:white;\n border:1px solid black;\n list-style:none;\n margin:0;\n padding:0 10px;\n }\n\n .animate-repeat {\n line-height:40px;\n list-style:none;\n box-sizing:border-box;\n }\n\n .animate-repeat.ng-move,\n .animate-repeat.ng-enter,\n .animate-repeat.ng-leave {\n transition:all linear 0.5s;\n }\n\n .animate-repeat.ng-leave.ng-leave-active,\n .animate-repeat.ng-move,\n .animate-repeat.ng-enter {\n opacity:0;\n max-height:0;\n }\n\n .animate-repeat.ng-leave,\n .animate-repeat.ng-move.ng-move-active,\n .animate-repeat.ng-enter.ng-enter-active {\n opacity:1;\n max-height:40px;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var friends = element.all(by.repeater('friend in friends'));\n\n it('should render initial data set', function() {\n expect(friends.count()).toBe(10);\n expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.');\n expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.');\n expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.');\n expect(element(by.binding('friends.length')).getText())\n .toMatch(\"I have 10 friends. They are:\");\n });\n\n it('should update repeater when filter predicate changes', function() {\n expect(friends.count()).toBe(10);\n\n element(by.model('q')).sendKeys('ma');\n\n expect(friends.count()).toBe(2);\n expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.');\n expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.');\n });\n </file>\n </example>\n */\nvar ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {\n var NG_REMOVED = '$$NG_REMOVED';\n var ngRepeatMinErr = minErr('ngRepeat');\n\n var updateScope = function(scope, index, valueIdentifier, value, keyIdentifier, key, arrayLength) {\n // TODO(perf): generate setters to shave off ~40ms or 1-1.5%\n scope[valueIdentifier] = value;\n if (keyIdentifier) scope[keyIdentifier] = key;\n scope.$index = index;\n scope.$first = (index === 0);\n scope.$last = (index === (arrayLength - 1));\n scope.$middle = !(scope.$first || scope.$last);\n // jshint bitwise: false\n scope.$odd = !(scope.$even = (index&1) === 0);\n // jshint bitwise: true\n };\n\n var getBlockStart = function(block) {\n return block.clone[0];\n };\n\n var getBlockEnd = function(block) {\n return block.clone[block.clone.length - 1];\n };\n\n\n return {\n restrict: 'A',\n multiElement: true,\n transclude: 'element',\n priority: 1000,\n terminal: true,\n $$tlb: true,\n compile: function ngRepeatCompile($element, $attr) {\n var expression = $attr.ngRepeat;\n var ngRepeatEndComment = document.createComment(' end ngRepeat: ' + expression + ' ');\n\n var match = expression.match(/^\\s*([\\s\\S]+?)\\s+in\\s+([\\s\\S]+?)(?:\\s+as\\s+([\\s\\S]+?))?(?:\\s+track\\s+by\\s+([\\s\\S]+?))?\\s*$/);\n\n if (!match) {\n throw ngRepeatMinErr('iexp', \"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.\",\n expression);\n }\n\n var lhs = match[1];\n var rhs = match[2];\n var aliasAs = match[3];\n var trackByExp = match[4];\n\n match = lhs.match(/^(?:(\\s*[\\$\\w]+)|\\(\\s*([\\$\\w]+)\\s*,\\s*([\\$\\w]+)\\s*\\))$/);\n\n if (!match) {\n throw ngRepeatMinErr('iidexp', \"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.\",\n lhs);\n }\n var valueIdentifier = match[3] || match[1];\n var keyIdentifier = match[2];\n\n if (aliasAs && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs) ||\n /^(null|undefined|this|\\$index|\\$first|\\$middle|\\$last|\\$even|\\$odd|\\$parent|\\$root|\\$id)$/.test(aliasAs))) {\n throw ngRepeatMinErr('badident', \"alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.\",\n aliasAs);\n }\n\n var trackByExpGetter, trackByIdExpFn, trackByIdArrayFn, trackByIdObjFn;\n var hashFnLocals = {$id: hashKey};\n\n if (trackByExp) {\n trackByExpGetter = $parse(trackByExp);\n } else {\n trackByIdArrayFn = function(key, value) {\n return hashKey(value);\n };\n trackByIdObjFn = function(key) {\n return key;\n };\n }\n\n return function ngRepeatLink($scope, $element, $attr, ctrl, $transclude) {\n\n if (trackByExpGetter) {\n trackByIdExpFn = function(key, value, index) {\n // assign key, value, and $index to the locals so that they can be used in hash functions\n if (keyIdentifier) hashFnLocals[keyIdentifier] = key;\n hashFnLocals[valueIdentifier] = value;\n hashFnLocals.$index = index;\n return trackByExpGetter($scope, hashFnLocals);\n };\n }\n\n // Store a list of elements from previous run. This is a hash where key is the item from the\n // iterator, and the value is objects with following properties.\n // - scope: bound scope\n // - element: previous element.\n // - index: position\n //\n // We are using no-proto object so that we don't need to guard against inherited props via\n // hasOwnProperty.\n var lastBlockMap = createMap();\n\n //watch props\n $scope.$watchCollection(rhs, function ngRepeatAction(collection) {\n var index, length,\n previousNode = $element[0], // node that cloned nodes should be inserted after\n // initialized to the comment node anchor\n nextNode,\n // Same as lastBlockMap but it has the current state. It will become the\n // lastBlockMap on the next iteration.\n nextBlockMap = createMap(),\n collectionLength,\n key, value, // key/value of iteration\n trackById,\n trackByIdFn,\n collectionKeys,\n block, // last object information {scope, element, id}\n nextBlockOrder,\n elementsToRemove;\n\n if (aliasAs) {\n $scope[aliasAs] = collection;\n }\n\n if (isArrayLike(collection)) {\n collectionKeys = collection;\n trackByIdFn = trackByIdExpFn || trackByIdArrayFn;\n } else {\n trackByIdFn = trackByIdExpFn || trackByIdObjFn;\n // if object, extract keys, in enumeration order, unsorted\n collectionKeys = [];\n for (var itemKey in collection) {\n if (hasOwnProperty.call(collection, itemKey) && itemKey.charAt(0) !== '$') {\n collectionKeys.push(itemKey);\n }\n }\n }\n\n collectionLength = collectionKeys.length;\n nextBlockOrder = new Array(collectionLength);\n\n // locate existing items\n for (index = 0; index < collectionLength; index++) {\n key = (collection === collectionKeys) ? index : collectionKeys[index];\n value = collection[key];\n trackById = trackByIdFn(key, value, index);\n if (lastBlockMap[trackById]) {\n // found previously seen block\n block = lastBlockMap[trackById];\n delete lastBlockMap[trackById];\n nextBlockMap[trackById] = block;\n nextBlockOrder[index] = block;\n } else if (nextBlockMap[trackById]) {\n // if collision detected. restore lastBlockMap and throw an error\n forEach(nextBlockOrder, function(block) {\n if (block && block.scope) lastBlockMap[block.id] = block;\n });\n throw ngRepeatMinErr('dupes',\n \"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}\",\n expression, trackById, value);\n } else {\n // new never before seen block\n nextBlockOrder[index] = {id: trackById, scope: undefined, clone: undefined};\n nextBlockMap[trackById] = true;\n }\n }\n\n // remove leftover items\n for (var blockKey in lastBlockMap) {\n block = lastBlockMap[blockKey];\n elementsToRemove = getBlockNodes(block.clone);\n $animate.leave(elementsToRemove);\n if (elementsToRemove[0].parentNode) {\n // if the element was not removed yet because of pending animation, mark it as deleted\n // so that we can ignore it later\n for (index = 0, length = elementsToRemove.length; index < length; index++) {\n elementsToRemove[index][NG_REMOVED] = true;\n }\n }\n block.scope.$destroy();\n }\n\n // we are not using forEach for perf reasons (trying to avoid #call)\n for (index = 0; index < collectionLength; index++) {\n key = (collection === collectionKeys) ? index : collectionKeys[index];\n value = collection[key];\n block = nextBlockOrder[index];\n\n if (block.scope) {\n // if we have already seen this object, then we need to reuse the\n // associated scope/element\n\n nextNode = previousNode;\n\n // skip nodes that are already pending removal via leave animation\n do {\n nextNode = nextNode.nextSibling;\n } while (nextNode && nextNode[NG_REMOVED]);\n\n if (getBlockStart(block) != nextNode) {\n // existing item which got moved\n $animate.move(getBlockNodes(block.clone), null, previousNode);\n }\n previousNode = getBlockEnd(block);\n updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);\n } else {\n // new item which we don't know about\n $transclude(function ngRepeatTransclude(clone, scope) {\n block.scope = scope;\n // http://jsperf.com/clone-vs-createcomment\n var endNode = ngRepeatEndComment.cloneNode(false);\n clone[clone.length++] = endNode;\n\n $animate.enter(clone, null, previousNode);\n previousNode = endNode;\n // Note: We only need the first/last node of the cloned nodes.\n // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n // by a directive with templateUrl when its template arrives.\n block.clone = clone;\n nextBlockMap[block.id] = block;\n updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);\n });\n }\n }\n lastBlockMap = nextBlockMap;\n });\n };\n }\n };\n}];\n\nvar NG_HIDE_CLASS = 'ng-hide';\nvar NG_HIDE_IN_PROGRESS_CLASS = 'ng-hide-animate';\n/**\n * @ngdoc directive\n * @name ngShow\n * @multiElement\n *\n * @description\n * The `ngShow` directive shows or hides the given HTML element based on the expression\n * provided to the `ngShow` attribute. The element is shown or hidden by removing or adding\n * the `.ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n * in AngularJS and sets the display style to none (using an !important flag).\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```html\n * <!-- when $scope.myValue is truthy (element is visible) -->\n * <div ng-show=\"myValue\"></div>\n *\n * <!-- when $scope.myValue is falsy (element is hidden) -->\n * <div ng-show=\"myValue\" class=\"ng-hide\"></div>\n * ```\n *\n * When the `ngShow` expression evaluates to a falsy value then the `.ng-hide` CSS class is added to the class\n * attribute on the element causing it to become hidden. When truthy, the `.ng-hide` CSS class is removed\n * from the element causing the element not to appear hidden.\n *\n * ## Why is !important used?\n *\n * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector\n * can be easily overridden by heavier selectors. For example, something as simple\n * as changing the display style on a HTML list item would make hidden elements appear visible.\n * This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n *\n * ### Overriding `.ng-hide`\n *\n * By default, the `.ng-hide` class will style the element with `display: none!important`. If you wish to change\n * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`\n * class CSS. Note that the selector that needs to be used is actually `.ng-hide:not(.ng-hide-animate)` to cope\n * with extra animation classes that can be added.\n *\n * ```css\n * .ng-hide:not(.ng-hide-animate) {\n * /&#42; this is just another form of hiding an element &#42;/\n * display: block!important;\n * position: absolute;\n * top: -9999px;\n * left: -9999px;\n * }\n * ```\n *\n * By default you don't need to override in CSS anything and the animations will work around the display style.\n *\n * ## A note about animations with `ngShow`\n *\n * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n * is true and false. This system works like the animation system present with ngClass except that\n * you must also include the !important flag to override the display property\n * so that you can perform an animation when the element is hidden during the time of the animation.\n *\n * ```css\n * //\n * //a working example can be found at the bottom of this page\n * //\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n * /&#42; this is required as of 1.3x to properly\n * apply all styling in a show/hide animation &#42;/\n * transition: 0s linear all;\n * }\n *\n * .my-element.ng-hide-add-active,\n * .my-element.ng-hide-remove-active {\n * /&#42; the transition is defined in the active class &#42;/\n * transition: 1s linear all;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * ```\n *\n * Keep in mind that, as of AngularJS version 1.3.0-beta.11, there is no need to change the display\n * property to block during animation states--ngAnimate will handle the style toggling automatically for you.\n *\n * @animations\n * addClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a truthy value and the just before contents are set to visible\n * removeClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a non truthy value and just before the contents are set to hidden\n *\n * @element ANY\n * @param {expression} ngShow If the {@link guide/expression expression} is truthy\n * then the element is shown or hidden respectively.\n *\n * @example\n <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n <file name=\"index.html\">\n Click me: <input type=\"checkbox\" ng-model=\"checked\" aria-label=\"Toggle ngHide\"><br/>\n <div>\n Show:\n <div class=\"check-element animate-show\" ng-show=\"checked\">\n <span class=\"glyphicon glyphicon-thumbs-up\"></span> I show up when your checkbox is checked.\n </div>\n </div>\n <div>\n Hide:\n <div class=\"check-element animate-show\" ng-hide=\"checked\">\n <span class=\"glyphicon glyphicon-thumbs-down\"></span> I hide when your checkbox is checked.\n </div>\n </div>\n </file>\n <file name=\"glyphicons.css\">\n @import url(../../components/bootstrap-3.1.1/css/bootstrap.css);\n </file>\n <file name=\"animations.css\">\n .animate-show {\n line-height: 20px;\n opacity: 1;\n padding: 10px;\n border: 1px solid black;\n background: white;\n }\n\n .animate-show.ng-hide-add, .animate-show.ng-hide-remove {\n transition: all linear 0.5s;\n }\n\n .animate-show.ng-hide {\n line-height: 0;\n opacity: 0;\n padding: 0 10px;\n }\n\n .check-element {\n padding: 10px;\n border: 1px solid black;\n background: white;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));\n var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));\n\n it('should check ng-show / ng-hide', function() {\n expect(thumbsUp.isDisplayed()).toBeFalsy();\n expect(thumbsDown.isDisplayed()).toBeTruthy();\n\n element(by.model('checked')).click();\n\n expect(thumbsUp.isDisplayed()).toBeTruthy();\n expect(thumbsDown.isDisplayed()).toBeFalsy();\n });\n </file>\n </example>\n */\nvar ngShowDirective = ['$animate', function($animate) {\n return {\n restrict: 'A',\n multiElement: true,\n link: function(scope, element, attr) {\n scope.$watch(attr.ngShow, function ngShowWatchAction(value) {\n // we're adding a temporary, animation-specific class for ng-hide since this way\n // we can control when the element is actually displayed on screen without having\n // to have a global/greedy CSS selector that breaks when other animations are run.\n // Read: https://github.com/angular/angular.js/issues/9103#issuecomment-58335845\n $animate[value ? 'removeClass' : 'addClass'](element, NG_HIDE_CLASS, {\n tempClasses: NG_HIDE_IN_PROGRESS_CLASS\n });\n });\n }\n };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngHide\n * @multiElement\n *\n * @description\n * The `ngHide` directive shows or hides the given HTML element based on the expression\n * provided to the `ngHide` attribute. The element is shown or hidden by removing or adding\n * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n * in AngularJS and sets the display style to none (using an !important flag).\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```html\n * <!-- when $scope.myValue is truthy (element is hidden) -->\n * <div ng-hide=\"myValue\" class=\"ng-hide\"></div>\n *\n * <!-- when $scope.myValue is falsy (element is visible) -->\n * <div ng-hide=\"myValue\"></div>\n * ```\n *\n * When the `ngHide` expression evaluates to a truthy value then the `.ng-hide` CSS class is added to the class\n * attribute on the element causing it to become hidden. When falsy, the `.ng-hide` CSS class is removed\n * from the element causing the element not to appear hidden.\n *\n * ## Why is !important used?\n *\n * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector\n * can be easily overridden by heavier selectors. For example, something as simple\n * as changing the display style on a HTML list item would make hidden elements appear visible.\n * This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n *\n * ### Overriding `.ng-hide`\n *\n * By default, the `.ng-hide` class will style the element with `display: none!important`. If you wish to change\n * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`\n * class in CSS:\n *\n * ```css\n * .ng-hide {\n * /&#42; this is just another form of hiding an element &#42;/\n * display: block!important;\n * position: absolute;\n * top: -9999px;\n * left: -9999px;\n * }\n * ```\n *\n * By default you don't need to override in CSS anything and the animations will work around the display style.\n *\n * ## A note about animations with `ngHide`\n *\n * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n * is true and false. This system works like the animation system present with ngClass, except that the `.ng-hide`\n * CSS class is added and removed for you instead of your own CSS class.\n *\n * ```css\n * //\n * //a working example can be found at the bottom of this page\n * //\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n * transition: 0.5s linear all;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * ```\n *\n * Keep in mind that, as of AngularJS version 1.3.0-beta.11, there is no need to change the display\n * property to block during animation states--ngAnimate will handle the style toggling automatically for you.\n *\n * @animations\n * removeClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a truthy value and just before the contents are set to hidden\n * addClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a non truthy value and just before the contents are set to visible\n *\n * @element ANY\n * @param {expression} ngHide If the {@link guide/expression expression} is truthy then\n * the element is shown or hidden respectively.\n *\n * @example\n <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n <file name=\"index.html\">\n Click me: <input type=\"checkbox\" ng-model=\"checked\" aria-label=\"Toggle ngShow\"><br/>\n <div>\n Show:\n <div class=\"check-element animate-hide\" ng-show=\"checked\">\n <span class=\"glyphicon glyphicon-thumbs-up\"></span> I show up when your checkbox is checked.\n </div>\n </div>\n <div>\n Hide:\n <div class=\"check-element animate-hide\" ng-hide=\"checked\">\n <span class=\"glyphicon glyphicon-thumbs-down\"></span> I hide when your checkbox is checked.\n </div>\n </div>\n </file>\n <file name=\"glyphicons.css\">\n @import url(../../components/bootstrap-3.1.1/css/bootstrap.css);\n </file>\n <file name=\"animations.css\">\n .animate-hide {\n transition: all linear 0.5s;\n line-height: 20px;\n opacity: 1;\n padding: 10px;\n border: 1px solid black;\n background: white;\n }\n\n .animate-hide.ng-hide {\n line-height: 0;\n opacity: 0;\n padding: 0 10px;\n }\n\n .check-element {\n padding: 10px;\n border: 1px solid black;\n background: white;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));\n var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));\n\n it('should check ng-show / ng-hide', function() {\n expect(thumbsUp.isDisplayed()).toBeFalsy();\n expect(thumbsDown.isDisplayed()).toBeTruthy();\n\n element(by.model('checked')).click();\n\n expect(thumbsUp.isDisplayed()).toBeTruthy();\n expect(thumbsDown.isDisplayed()).toBeFalsy();\n });\n </file>\n </example>\n */\nvar ngHideDirective = ['$animate', function($animate) {\n return {\n restrict: 'A',\n multiElement: true,\n link: function(scope, element, attr) {\n scope.$watch(attr.ngHide, function ngHideWatchAction(value) {\n // The comment inside of the ngShowDirective explains why we add and\n // remove a temporary class for the show/hide animation\n $animate[value ? 'addClass' : 'removeClass'](element,NG_HIDE_CLASS, {\n tempClasses: NG_HIDE_IN_PROGRESS_CLASS\n });\n });\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngStyle\n * @restrict AC\n *\n * @description\n * The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.\n *\n * @element ANY\n * @param {expression} ngStyle\n *\n * {@link guide/expression Expression} which evals to an\n * object whose keys are CSS style names and values are corresponding values for those CSS\n * keys.\n *\n * Since some CSS style names are not valid keys for an object, they must be quoted.\n * See the 'background-color' style in the example below.\n *\n * @example\n <example>\n <file name=\"index.html\">\n <input type=\"button\" value=\"set color\" ng-click=\"myStyle={color:'red'}\">\n <input type=\"button\" value=\"set background\" ng-click=\"myStyle={'background-color':'blue'}\">\n <input type=\"button\" value=\"clear\" ng-click=\"myStyle={}\">\n <br/>\n <span ng-style=\"myStyle\">Sample Text</span>\n <pre>myStyle={{myStyle}}</pre>\n </file>\n <file name=\"style.css\">\n span {\n color: black;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var colorSpan = element(by.css('span'));\n\n it('should check ng-style', function() {\n expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n element(by.css('input[value=\\'set color\\']')).click();\n expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)');\n element(by.css('input[value=clear]')).click();\n expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n });\n </file>\n </example>\n */\nvar ngStyleDirective = ngDirective(function(scope, element, attr) {\n scope.$watch(attr.ngStyle, function ngStyleWatchAction(newStyles, oldStyles) {\n if (oldStyles && (newStyles !== oldStyles)) {\n forEach(oldStyles, function(val, style) { element.css(style, '');});\n }\n if (newStyles) element.css(newStyles);\n }, true);\n});\n\n/**\n * @ngdoc directive\n * @name ngSwitch\n * @restrict EA\n *\n * @description\n * The `ngSwitch` directive is used to conditionally swap DOM structure on your template based on a scope expression.\n * Elements within `ngSwitch` but without `ngSwitchWhen` or `ngSwitchDefault` directives will be preserved at the location\n * as specified in the template.\n *\n * The directive itself works similar to ngInclude, however, instead of downloading template code (or loading it\n * from the template cache), `ngSwitch` simply chooses one of the nested elements and makes it visible based on which element\n * matches the value obtained from the evaluated expression. In other words, you define a container element\n * (where you place the directive), place an expression on the **`on=\"...\"` attribute**\n * (or the **`ng-switch=\"...\"` attribute**), define any inner elements inside of the directive and place\n * a when attribute per element. The when attribute is used to inform ngSwitch which element to display when the on\n * expression is evaluated. If a matching expression is not found via a when attribute then an element with the default\n * attribute is displayed.\n *\n * <div class=\"alert alert-info\">\n * Be aware that the attribute values to match against cannot be expressions. They are interpreted\n * as literal string values to match against.\n * For example, **`ng-switch-when=\"someVal\"`** will match against the string `\"someVal\"` not against the\n * value of the expression `$scope.someVal`.\n * </div>\n\n * @animations\n * enter - happens after the ngSwitch contents change and the matched child element is placed inside the container\n * leave - happens just after the ngSwitch contents change and just before the former contents are removed from the DOM\n *\n * @usage\n *\n * ```\n * <ANY ng-switch=\"expression\">\n * <ANY ng-switch-when=\"matchValue1\">...</ANY>\n * <ANY ng-switch-when=\"matchValue2\">...</ANY>\n * <ANY ng-switch-default>...</ANY>\n * </ANY>\n * ```\n *\n *\n * @scope\n * @priority 1200\n * @param {*} ngSwitch|on expression to match against <code>ng-switch-when</code>.\n * On child elements add:\n *\n * * `ngSwitchWhen`: the case statement to match against. If match then this\n * case will be displayed. If the same match appears multiple times, all the\n * elements will be displayed.\n * * `ngSwitchDefault`: the default case when no other case match. If there\n * are multiple default cases, all of them will be displayed when no other\n * case match.\n *\n *\n * @example\n <example module=\"switchExample\" deps=\"angular-animate.js\" animations=\"true\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <select ng-model=\"selection\" ng-options=\"item for item in items\">\n </select>\n <code>selection={{selection}}</code>\n <hr/>\n <div class=\"animate-switch-container\"\n ng-switch on=\"selection\">\n <div class=\"animate-switch\" ng-switch-when=\"settings\">Settings Div</div>\n <div class=\"animate-switch\" ng-switch-when=\"home\">Home Span</div>\n <div class=\"animate-switch\" ng-switch-default>default</div>\n </div>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('switchExample', ['ngAnimate'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.items = ['settings', 'home', 'other'];\n $scope.selection = $scope.items[0];\n }]);\n </file>\n <file name=\"animations.css\">\n .animate-switch-container {\n position:relative;\n background:white;\n border:1px solid black;\n height:40px;\n overflow:hidden;\n }\n\n .animate-switch {\n padding:10px;\n }\n\n .animate-switch.ng-animate {\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n position:absolute;\n top:0;\n left:0;\n right:0;\n bottom:0;\n }\n\n .animate-switch.ng-leave.ng-leave-active,\n .animate-switch.ng-enter {\n top:-50px;\n }\n .animate-switch.ng-leave,\n .animate-switch.ng-enter.ng-enter-active {\n top:0;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var switchElem = element(by.css('[ng-switch]'));\n var select = element(by.model('selection'));\n\n it('should start in settings', function() {\n expect(switchElem.getText()).toMatch(/Settings Div/);\n });\n it('should change to home', function() {\n select.all(by.css('option')).get(1).click();\n expect(switchElem.getText()).toMatch(/Home Span/);\n });\n it('should select default', function() {\n select.all(by.css('option')).get(2).click();\n expect(switchElem.getText()).toMatch(/default/);\n });\n </file>\n </example>\n */\nvar ngSwitchDirective = ['$animate', function($animate) {\n return {\n require: 'ngSwitch',\n\n // asks for $scope to fool the BC controller module\n controller: ['$scope', function ngSwitchController() {\n this.cases = {};\n }],\n link: function(scope, element, attr, ngSwitchController) {\n var watchExpr = attr.ngSwitch || attr.on,\n selectedTranscludes = [],\n selectedElements = [],\n previousLeaveAnimations = [],\n selectedScopes = [];\n\n var spliceFactory = function(array, index) {\n return function() { array.splice(index, 1); };\n };\n\n scope.$watch(watchExpr, function ngSwitchWatchAction(value) {\n var i, ii;\n for (i = 0, ii = previousLeaveAnimations.length; i < ii; ++i) {\n $animate.cancel(previousLeaveAnimations[i]);\n }\n previousLeaveAnimations.length = 0;\n\n for (i = 0, ii = selectedScopes.length; i < ii; ++i) {\n var selected = getBlockNodes(selectedElements[i].clone);\n selectedScopes[i].$destroy();\n var promise = previousLeaveAnimations[i] = $animate.leave(selected);\n promise.then(spliceFactory(previousLeaveAnimations, i));\n }\n\n selectedElements.length = 0;\n selectedScopes.length = 0;\n\n if ((selectedTranscludes = ngSwitchController.cases['!' + value] || ngSwitchController.cases['?'])) {\n forEach(selectedTranscludes, function(selectedTransclude) {\n selectedTransclude.transclude(function(caseElement, selectedScope) {\n selectedScopes.push(selectedScope);\n var anchor = selectedTransclude.element;\n caseElement[caseElement.length++] = document.createComment(' end ngSwitchWhen: ');\n var block = { clone: caseElement };\n\n selectedElements.push(block);\n $animate.enter(caseElement, anchor.parent(), anchor);\n });\n });\n }\n });\n }\n };\n}];\n\nvar ngSwitchWhenDirective = ngDirective({\n transclude: 'element',\n priority: 1200,\n require: '^ngSwitch',\n multiElement: true,\n link: function(scope, element, attrs, ctrl, $transclude) {\n ctrl.cases['!' + attrs.ngSwitchWhen] = (ctrl.cases['!' + attrs.ngSwitchWhen] || []);\n ctrl.cases['!' + attrs.ngSwitchWhen].push({ transclude: $transclude, element: element });\n }\n});\n\nvar ngSwitchDefaultDirective = ngDirective({\n transclude: 'element',\n priority: 1200,\n require: '^ngSwitch',\n multiElement: true,\n link: function(scope, element, attr, ctrl, $transclude) {\n ctrl.cases['?'] = (ctrl.cases['?'] || []);\n ctrl.cases['?'].push({ transclude: $transclude, element: element });\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngTransclude\n * @restrict EAC\n *\n * @description\n * Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.\n *\n * Any existing content of the element that this directive is placed on will be removed before the transcluded content is inserted.\n *\n * @element ANY\n *\n * @example\n <example module=\"transcludeExample\">\n <file name=\"index.html\">\n <script>\n angular.module('transcludeExample', [])\n .directive('pane', function(){\n return {\n restrict: 'E',\n transclude: true,\n scope: { title:'@' },\n template: '<div style=\"border: 1px solid black;\">' +\n '<div style=\"background-color: gray\">{{title}}</div>' +\n '<ng-transclude></ng-transclude>' +\n '</div>'\n };\n })\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.title = 'Lorem Ipsum';\n $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...';\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <input ng-model=\"title\" aria-label=\"title\"> <br/>\n <textarea ng-model=\"text\" aria-label=\"text\"></textarea> <br/>\n <pane title=\"{{title}}\">{{text}}</pane>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should have transcluded', function() {\n var titleElement = element(by.model('title'));\n titleElement.clear();\n titleElement.sendKeys('TITLE');\n var textElement = element(by.model('text'));\n textElement.clear();\n textElement.sendKeys('TEXT');\n expect(element(by.binding('title')).getText()).toEqual('TITLE');\n expect(element(by.binding('text')).getText()).toEqual('TEXT');\n });\n </file>\n </example>\n *\n */\nvar ngTranscludeDirective = ngDirective({\n restrict: 'EAC',\n link: function($scope, $element, $attrs, controller, $transclude) {\n if (!$transclude) {\n throw minErr('ngTransclude')('orphan',\n 'Illegal use of ngTransclude directive in the template! ' +\n 'No parent directive that requires a transclusion found. ' +\n 'Element: {0}',\n startingTag($element));\n }\n\n $transclude(function(clone) {\n $element.empty();\n $element.append(clone);\n });\n }\n});\n\n/**\n * @ngdoc directive\n * @name script\n * @restrict E\n *\n * @description\n * Load the content of a `<script>` element into {@link ng.$templateCache `$templateCache`}, so that the\n * template can be used by {@link ng.directive:ngInclude `ngInclude`},\n * {@link ngRoute.directive:ngView `ngView`}, or {@link guide/directive directives}. The type of the\n * `<script>` element must be specified as `text/ng-template`, and a cache name for the template must be\n * assigned through the element's `id`, which can then be used as a directive's `templateUrl`.\n *\n * @param {string} type Must be set to `'text/ng-template'`.\n * @param {string} id Cache name of the template.\n *\n * @example\n <example>\n <file name=\"index.html\">\n <script type=\"text/ng-template\" id=\"/tpl.html\">\n Content of the template.\n </script>\n\n <a ng-click=\"currentTpl='/tpl.html'\" id=\"tpl-link\">Load inlined template</a>\n <div id=\"tpl-content\" ng-include src=\"currentTpl\"></div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should load template defined inside script tag', function() {\n element(by.css('#tpl-link')).click();\n expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/);\n });\n </file>\n </example>\n */\nvar scriptDirective = ['$templateCache', function($templateCache) {\n return {\n restrict: 'E',\n terminal: true,\n compile: function(element, attr) {\n if (attr.type == 'text/ng-template') {\n var templateUrl = attr.id,\n text = element[0].text;\n\n $templateCache.put(templateUrl, text);\n }\n }\n };\n}];\n\nvar noopNgModelController = { $setViewValue: noop, $render: noop };\n\nfunction chromeHack(optionElement) {\n // Workaround for https://code.google.com/p/chromium/issues/detail?id=381459\n // Adding an <option selected=\"selected\"> element to a <select required=\"required\"> should\n // automatically select the new element\n if (optionElement[0].hasAttribute('selected')) {\n optionElement[0].selected = true;\n }\n}\n\n/**\n * @ngdoc type\n * @name select.SelectController\n * @description\n * The controller for the `<select>` directive. This provides support for reading\n * and writing the selected value(s) of the control and also coordinates dynamically\n * added `<option>` elements, perhaps by an `ngRepeat` directive.\n */\nvar SelectController =\n ['$element', '$scope', '$attrs', function($element, $scope, $attrs) {\n\n var self = this,\n optionsMap = new HashMap();\n\n // If the ngModel doesn't get provided then provide a dummy noop version to prevent errors\n self.ngModelCtrl = noopNgModelController;\n\n // The \"unknown\" option is one that is prepended to the list if the viewValue\n // does not match any of the options. When it is rendered the value of the unknown\n // option is '? XXX ?' where XXX is the hashKey of the value that is not known.\n //\n // We can't just jqLite('<option>') since jqLite is not smart enough\n // to create it in <select> and IE barfs otherwise.\n self.unknownOption = jqLite(document.createElement('option'));\n self.renderUnknownOption = function(val) {\n var unknownVal = '? ' + hashKey(val) + ' ?';\n self.unknownOption.val(unknownVal);\n $element.prepend(self.unknownOption);\n $element.val(unknownVal);\n };\n\n $scope.$on('$destroy', function() {\n // disable unknown option so that we don't do work when the whole select is being destroyed\n self.renderUnknownOption = noop;\n });\n\n self.removeUnknownOption = function() {\n if (self.unknownOption.parent()) self.unknownOption.remove();\n };\n\n\n // Read the value of the select control, the implementation of this changes depending\n // upon whether the select can have multiple values and whether ngOptions is at work.\n self.readValue = function readSingleValue() {\n self.removeUnknownOption();\n return $element.val();\n };\n\n\n // Write the value to the select control, the implementation of this changes depending\n // upon whether the select can have multiple values and whether ngOptions is at work.\n self.writeValue = function writeSingleValue(value) {\n if (self.hasOption(value)) {\n self.removeUnknownOption();\n $element.val(value);\n if (value === '') self.emptyOption.prop('selected', true); // to make IE9 happy\n } else {\n if (value == null && self.emptyOption) {\n self.removeUnknownOption();\n $element.val('');\n } else {\n self.renderUnknownOption(value);\n }\n }\n };\n\n\n // Tell the select control that an option, with the given value, has been added\n self.addOption = function(value, element) {\n // Skip comment nodes, as they only pollute the `optionsMap`\n if (element[0].nodeType === NODE_TYPE_COMMENT) return;\n\n assertNotHasOwnProperty(value, '\"option value\"');\n if (value === '') {\n self.emptyOption = element;\n }\n var count = optionsMap.get(value) || 0;\n optionsMap.put(value, count + 1);\n self.ngModelCtrl.$render();\n chromeHack(element);\n };\n\n // Tell the select control that an option, with the given value, has been removed\n self.removeOption = function(value) {\n var count = optionsMap.get(value);\n if (count) {\n if (count === 1) {\n optionsMap.remove(value);\n if (value === '') {\n self.emptyOption = undefined;\n }\n } else {\n optionsMap.put(value, count - 1);\n }\n }\n };\n\n // Check whether the select control has an option matching the given value\n self.hasOption = function(value) {\n return !!optionsMap.get(value);\n };\n\n\n self.registerOption = function(optionScope, optionElement, optionAttrs, interpolateValueFn, interpolateTextFn) {\n\n if (interpolateValueFn) {\n // The value attribute is interpolated\n var oldVal;\n optionAttrs.$observe('value', function valueAttributeObserveAction(newVal) {\n if (isDefined(oldVal)) {\n self.removeOption(oldVal);\n }\n oldVal = newVal;\n self.addOption(newVal, optionElement);\n });\n } else if (interpolateTextFn) {\n // The text content is interpolated\n optionScope.$watch(interpolateTextFn, function interpolateWatchAction(newVal, oldVal) {\n optionAttrs.$set('value', newVal);\n if (oldVal !== newVal) {\n self.removeOption(oldVal);\n }\n self.addOption(newVal, optionElement);\n });\n } else {\n // The value attribute is static\n self.addOption(optionAttrs.value, optionElement);\n }\n\n optionElement.on('$destroy', function() {\n self.removeOption(optionAttrs.value);\n self.ngModelCtrl.$render();\n });\n };\n}];\n\n/**\n * @ngdoc directive\n * @name select\n * @restrict E\n *\n * @description\n * HTML `SELECT` element with angular data-binding.\n *\n * The `select` directive is used together with {@link ngModel `ngModel`} to provide data-binding\n * between the scope and the `<select>` control (including setting default values).\n * It also handles dynamic `<option>` elements, which can be added using the {@link ngRepeat `ngRepeat}` or\n * {@link ngOptions `ngOptions`} directives.\n *\n * When an item in the `<select>` menu is selected, the value of the selected option will be bound\n * to the model identified by the `ngModel` directive. With static or repeated options, this is\n * the content of the `value` attribute or the textContent of the `<option>`, if the value attribute is missing.\n * If you want dynamic value attributes, you can use interpolation inside the value attribute.\n *\n * <div class=\"alert alert-warning\">\n * Note that the value of a `select` directive used without `ngOptions` is always a string.\n * When the model needs to be bound to a non-string value, you must either explictly convert it\n * using a directive (see example below) or use `ngOptions` to specify the set of options.\n * This is because an option element can only be bound to string values at present.\n * </div>\n *\n * If the viewValue of `ngModel` does not match any of the options, then the control\n * will automatically add an \"unknown\" option, which it then removes when the mismatch is resolved.\n *\n * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can\n * be nested into the `<select>` element. This element will then represent the `null` or \"not selected\"\n * option. See example below for demonstration.\n *\n * <div class=\"alert alert-info\">\n * In many cases, `ngRepeat` can be used on `<option>` elements instead of {@link ng.directive:ngOptions\n * ngOptions} to achieve a similar result. However, `ngOptions` provides some benefits, such as\n * more flexibility in how the `<select>`'s model is assigned via the `select` **`as`** part of the\n * comprehension expression, and additionally in reducing memory and increasing speed by not creating\n * a new scope for each repeated instance.\n * </div>\n *\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} multiple Allows multiple options to be selected. The selected values will be\n * bound to the model as an array.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds required attribute and required validation constraint to\n * the element when the ngRequired expression evaluates to true. Use ngRequired instead of required\n * when you want to data-bind to the required attribute.\n * @param {string=} ngChange Angular expression to be executed when selected option(s) changes due to user\n * interaction with the select element.\n * @param {string=} ngOptions sets the options that the select is populated with and defines what is\n * set on the model on selection. See {@link ngOptions `ngOptions`}.\n *\n * @example\n * ### Simple `select` elements with static options\n *\n * <example name=\"static-select\" module=\"staticSelect\">\n * <file name=\"index.html\">\n * <div ng-controller=\"ExampleController\">\n * <form name=\"myForm\">\n * <label for=\"singleSelect\"> Single select: </label><br>\n * <select name=\"singleSelect\" ng-model=\"data.singleSelect\">\n * <option value=\"option-1\">Option 1</option>\n * <option value=\"option-2\">Option 2</option>\n * </select><br>\n *\n * <label for=\"singleSelect\"> Single select with \"not selected\" option and dynamic option values: </label><br>\n * <select name=\"singleSelect\" id=\"singleSelect\" ng-model=\"data.singleSelect\">\n * <option value=\"\">---Please select---</option> <!-- not selected / blank option -->\n * <option value=\"{{data.option1}}\">Option 1</option> <!-- interpolation -->\n * <option value=\"option-2\">Option 2</option>\n * </select><br>\n * <button ng-click=\"forceUnknownOption()\">Force unknown option</button><br>\n * <tt>singleSelect = {{data.singleSelect}}</tt>\n *\n * <hr>\n * <label for=\"multipleSelect\"> Multiple select: </label><br>\n * <select name=\"multipleSelect\" id=\"multipleSelect\" ng-model=\"data.multipleSelect\" multiple>\n * <option value=\"option-1\">Option 1</option>\n * <option value=\"option-2\">Option 2</option>\n * <option value=\"option-3\">Option 3</option>\n * </select><br>\n * <tt>multipleSelect = {{data.multipleSelect}}</tt><br/>\n * </form>\n * </div>\n * </file>\n * <file name=\"app.js\">\n * angular.module('staticSelect', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.data = {\n * singleSelect: null,\n * multipleSelect: [],\n * option1: 'option-1',\n * };\n *\n * $scope.forceUnknownOption = function() {\n * $scope.data.singleSelect = 'nonsense';\n * };\n * }]);\n * </file>\n *</example>\n *\n * ### Using `ngRepeat` to generate `select` options\n * <example name=\"ngrepeat-select\" module=\"ngrepeatSelect\">\n * <file name=\"index.html\">\n * <div ng-controller=\"ExampleController\">\n * <form name=\"myForm\">\n * <label for=\"repeatSelect\"> Repeat select: </label>\n * <select name=\"repeatSelect\" id=\"repeatSelect\" ng-model=\"data.repeatSelect\">\n * <option ng-repeat=\"option in data.availableOptions\" value=\"{{option.id}}\">{{option.name}}</option>\n * </select>\n * </form>\n * <hr>\n * <tt>repeatSelect = {{data.repeatSelect}}</tt><br/>\n * </div>\n * </file>\n * <file name=\"app.js\">\n * angular.module('ngrepeatSelect', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.data = {\n * repeatSelect: null,\n * availableOptions: [\n * {id: '1', name: 'Option A'},\n * {id: '2', name: 'Option B'},\n * {id: '3', name: 'Option C'}\n * ],\n * };\n * }]);\n * </file>\n *</example>\n *\n *\n * ### Using `select` with `ngOptions` and setting a default value\n * See the {@link ngOptions ngOptions documentation} for more `ngOptions` usage examples.\n *\n * <example name=\"select-with-default-values\" module=\"defaultValueSelect\">\n * <file name=\"index.html\">\n * <div ng-controller=\"ExampleController\">\n * <form name=\"myForm\">\n * <label for=\"mySelect\">Make a choice:</label>\n * <select name=\"mySelect\" id=\"mySelect\"\n * ng-options=\"option.name for option in data.availableOptions track by option.id\"\n * ng-model=\"data.selectedOption\"></select>\n * </form>\n * <hr>\n * <tt>option = {{data.selectedOption}}</tt><br/>\n * </div>\n * </file>\n * <file name=\"app.js\">\n * angular.module('defaultValueSelect', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.data = {\n * availableOptions: [\n * {id: '1', name: 'Option A'},\n * {id: '2', name: 'Option B'},\n * {id: '3', name: 'Option C'}\n * ],\n * selectedOption: {id: '3', name: 'Option C'} //This sets the default value of the select in the ui\n * };\n * }]);\n * </file>\n *</example>\n *\n *\n * ### Binding `select` to a non-string value via `ngModel` parsing / formatting\n *\n * <example name=\"select-with-non-string-options\" module=\"nonStringSelect\">\n * <file name=\"index.html\">\n * <select ng-model=\"model.id\" convert-to-number>\n * <option value=\"0\">Zero</option>\n * <option value=\"1\">One</option>\n * <option value=\"2\">Two</option>\n * </select>\n * {{ model }}\n * </file>\n * <file name=\"app.js\">\n * angular.module('nonStringSelect', [])\n * .run(function($rootScope) {\n * $rootScope.model = { id: 2 };\n * })\n * .directive('convertToNumber', function() {\n * return {\n * require: 'ngModel',\n * link: function(scope, element, attrs, ngModel) {\n * ngModel.$parsers.push(function(val) {\n * return parseInt(val, 10);\n * });\n * ngModel.$formatters.push(function(val) {\n * return '' + val;\n * });\n * }\n * };\n * });\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * it('should initialize to model', function() {\n * var select = element(by.css('select'));\n * expect(element(by.model('model.id')).$('option:checked').getText()).toEqual('Two');\n * });\n * </file>\n * </example>\n *\n */\nvar selectDirective = function() {\n\n return {\n restrict: 'E',\n require: ['select', '?ngModel'],\n controller: SelectController,\n priority: 1,\n link: {\n pre: selectPreLink,\n post: selectPostLink\n }\n };\n\n function selectPreLink(scope, element, attr, ctrls) {\n\n // if ngModel is not defined, we don't need to do anything\n var ngModelCtrl = ctrls[1];\n if (!ngModelCtrl) return;\n\n var selectCtrl = ctrls[0];\n\n selectCtrl.ngModelCtrl = ngModelCtrl;\n\n // When the selected item(s) changes we delegate getting the value of the select control\n // to the `readValue` method, which can be changed if the select can have multiple\n // selected values or if the options are being generated by `ngOptions`\n element.on('change', function() {\n scope.$apply(function() {\n ngModelCtrl.$setViewValue(selectCtrl.readValue());\n });\n });\n\n // If the select allows multiple values then we need to modify how we read and write\n // values from and to the control; also what it means for the value to be empty and\n // we have to add an extra watch since ngModel doesn't work well with arrays - it\n // doesn't trigger rendering if only an item in the array changes.\n if (attr.multiple) {\n\n // Read value now needs to check each option to see if it is selected\n selectCtrl.readValue = function readMultipleValue() {\n var array = [];\n forEach(element.find('option'), function(option) {\n if (option.selected) {\n array.push(option.value);\n }\n });\n return array;\n };\n\n // Write value now needs to set the selected property of each matching option\n selectCtrl.writeValue = function writeMultipleValue(value) {\n var items = new HashMap(value);\n forEach(element.find('option'), function(option) {\n option.selected = isDefined(items.get(option.value));\n });\n };\n\n // we have to do it on each watch since ngModel watches reference, but\n // we need to work of an array, so we need to see if anything was inserted/removed\n var lastView, lastViewRef = NaN;\n scope.$watch(function selectMultipleWatch() {\n if (lastViewRef === ngModelCtrl.$viewValue && !equals(lastView, ngModelCtrl.$viewValue)) {\n lastView = shallowCopy(ngModelCtrl.$viewValue);\n ngModelCtrl.$render();\n }\n lastViewRef = ngModelCtrl.$viewValue;\n });\n\n // If we are a multiple select then value is now a collection\n // so the meaning of $isEmpty changes\n ngModelCtrl.$isEmpty = function(value) {\n return !value || value.length === 0;\n };\n\n }\n }\n\n function selectPostLink(scope, element, attrs, ctrls) {\n // if ngModel is not defined, we don't need to do anything\n var ngModelCtrl = ctrls[1];\n if (!ngModelCtrl) return;\n\n var selectCtrl = ctrls[0];\n\n // We delegate rendering to the `writeValue` method, which can be changed\n // if the select can have multiple selected values or if the options are being\n // generated by `ngOptions`.\n // This must be done in the postLink fn to prevent $render to be called before\n // all nodes have been linked correctly.\n ngModelCtrl.$render = function() {\n selectCtrl.writeValue(ngModelCtrl.$viewValue);\n };\n }\n};\n\n\n// The option directive is purely designed to communicate the existence (or lack of)\n// of dynamically created (and destroyed) option elements to their containing select\n// directive via its controller.\nvar optionDirective = ['$interpolate', function($interpolate) {\n return {\n restrict: 'E',\n priority: 100,\n compile: function(element, attr) {\n if (isDefined(attr.value)) {\n // If the value attribute is defined, check if it contains an interpolation\n var interpolateValueFn = $interpolate(attr.value, true);\n } else {\n // If the value attribute is not defined then we fall back to the\n // text content of the option element, which may be interpolated\n var interpolateTextFn = $interpolate(element.text(), true);\n if (!interpolateTextFn) {\n attr.$set('value', element.text());\n }\n }\n\n return function(scope, element, attr) {\n // This is an optimization over using ^^ since we don't want to have to search\n // all the way to the root of the DOM for every single option element\n var selectCtrlName = '$selectController',\n parent = element.parent(),\n selectCtrl = parent.data(selectCtrlName) ||\n parent.parent().data(selectCtrlName); // in case we are in optgroup\n\n if (selectCtrl) {\n selectCtrl.registerOption(scope, element, attr, interpolateValueFn, interpolateTextFn);\n }\n };\n }\n };\n}];\n\nvar styleDirective = valueFn({\n restrict: 'E',\n terminal: false\n});\n\n/**\n * @ngdoc directive\n * @name ngRequired\n * @restrict A\n *\n * @description\n *\n * ngRequired adds the required {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n * It is most often used for {@link input `input`} and {@link select `select`} controls, but can also be\n * applied to custom controls.\n *\n * The directive sets the `required` attribute on the element if the Angular expression inside\n * `ngRequired` evaluates to true. A special directive for setting `required` is necessary because we\n * cannot use interpolation inside `required`. See the {@link guide/interpolation interpolation guide}\n * for more info.\n *\n * The validator will set the `required` error key to true if the `required` attribute is set and\n * calling {@link ngModel.NgModelController#$isEmpty `NgModelController.$isEmpty`} with the\n * {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} returns `true`. For example, the\n * `$isEmpty()` implementation for `input[text]` checks the length of the `$viewValue`. When developing\n * custom controls, `$isEmpty()` can be overwritten to account for a $viewValue that is not string-based.\n *\n * @example\n * <example name=\"ngRequiredDirective\" module=\"ngRequiredExample\">\n * <file name=\"index.html\">\n * <script>\n * angular.module('ngRequiredExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.required = true;\n * }]);\n * </script>\n * <div ng-controller=\"ExampleController\">\n * <form name=\"form\">\n * <label for=\"required\">Toggle required: </label>\n * <input type=\"checkbox\" ng-model=\"required\" id=\"required\" />\n * <br>\n * <label for=\"input\">This input must be filled if `required` is true: </label>\n * <input type=\"text\" ng-model=\"model\" id=\"input\" name=\"input\" ng-required=\"required\" /><br>\n * <hr>\n * required error set? = <code>{{form.input.$error.required}}</code><br>\n * model = <code>{{model}}</code>\n * </form>\n * </div>\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n var required = element(by.binding('form.input.$error.required'));\n var model = element(by.binding('model'));\n var input = element(by.id('input'));\n\n it('should set the required error', function() {\n expect(required.getText()).toContain('true');\n\n input.sendKeys('123');\n expect(required.getText()).not.toContain('true');\n expect(model.getText()).toContain('123');\n });\n * </file>\n * </example>\n */\nvar requiredDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n attr.required = true; // force truthy in case we are on non input element\n\n ctrl.$validators.required = function(modelValue, viewValue) {\n return !attr.required || !ctrl.$isEmpty(viewValue);\n };\n\n attr.$observe('required', function() {\n ctrl.$validate();\n });\n }\n };\n};\n\n/**\n * @ngdoc directive\n * @name ngPattern\n *\n * @description\n *\n * ngPattern adds the pattern {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.\n *\n * The validator sets the `pattern` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`}\n * does not match a RegExp which is obtained by evaluating the Angular expression given in the\n * `ngPattern` attribute value:\n * * If the expression evaluates to a RegExp object, then this is used directly.\n * * If the expression evaluates to a string, then it will be converted to a RegExp after wrapping it\n * in `^` and `$` characters. For instance, `\"abc\"` will be converted to `new RegExp('^abc$')`.\n *\n * <div class=\"alert alert-info\">\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * </div>\n *\n * <div class=\"alert alert-info\">\n * **Note:** This directive is also added when the plain `pattern` attribute is used, with two\n * differences:\n * <ol>\n * <li>\n * `ngPattern` does not set the `pattern` attribute and therefore HTML5 constraint validation is\n * not available.\n * </li>\n * <li>\n * The `ngPattern` attribute must be an expression, while the `pattern` value must be\n * interpolated.\n * </li>\n * </ol>\n * </div>\n *\n * @example\n * <example name=\"ngPatternDirective\" module=\"ngPatternExample\">\n * <file name=\"index.html\">\n * <script>\n * angular.module('ngPatternExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.regex = '\\\\d+';\n * }]);\n * </script>\n * <div ng-controller=\"ExampleController\">\n * <form name=\"form\">\n * <label for=\"regex\">Set a pattern (regex string): </label>\n * <input type=\"text\" ng-model=\"regex\" id=\"regex\" />\n * <br>\n * <label for=\"input\">This input is restricted by the current pattern: </label>\n * <input type=\"text\" ng-model=\"model\" id=\"input\" name=\"input\" ng-pattern=\"regex\" /><br>\n * <hr>\n * input valid? = <code>{{form.input.$valid}}</code><br>\n * model = <code>{{model}}</code>\n * </form>\n * </div>\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n var model = element(by.binding('model'));\n var input = element(by.id('input'));\n\n it('should validate the input with the default pattern', function() {\n input.sendKeys('aaa');\n expect(model.getText()).not.toContain('aaa');\n\n input.clear().then(function() {\n input.sendKeys('123');\n expect(model.getText()).toContain('123');\n });\n });\n * </file>\n * </example>\n */\nvar patternDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var regexp, patternExp = attr.ngPattern || attr.pattern;\n attr.$observe('pattern', function(regex) {\n if (isString(regex) && regex.length > 0) {\n regex = new RegExp('^' + regex + '$');\n }\n\n if (regex && !regex.test) {\n throw minErr('ngPattern')('noregexp',\n 'Expected {0} to be a RegExp but was {1}. Element: {2}', patternExp,\n regex, startingTag(elm));\n }\n\n regexp = regex || undefined;\n ctrl.$validate();\n });\n\n ctrl.$validators.pattern = function(modelValue, viewValue) {\n // HTML5 pattern constraint validates the input value, so we validate the viewValue\n return ctrl.$isEmpty(viewValue) || isUndefined(regexp) || regexp.test(viewValue);\n };\n }\n };\n};\n\n/**\n * @ngdoc directive\n * @name ngMaxlength\n *\n * @description\n *\n * ngMaxlength adds the maxlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.\n *\n * The validator sets the `maxlength` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`}\n * is longer than the integer obtained by evaluating the Angular expression given in the\n * `ngMaxlength` attribute value.\n *\n * <div class=\"alert alert-info\">\n * **Note:** This directive is also added when the plain `maxlength` attribute is used, with two\n * differences:\n * <ol>\n * <li>\n * `ngMaxlength` does not set the `maxlength` attribute and therefore HTML5 constraint\n * validation is not available.\n * </li>\n * <li>\n * The `ngMaxlength` attribute must be an expression, while the `maxlength` value must be\n * interpolated.\n * </li>\n * </ol>\n * </div>\n *\n * @example\n * <example name=\"ngMaxlengthDirective\" module=\"ngMaxlengthExample\">\n * <file name=\"index.html\">\n * <script>\n * angular.module('ngMaxlengthExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.maxlength = 5;\n * }]);\n * </script>\n * <div ng-controller=\"ExampleController\">\n * <form name=\"form\">\n * <label for=\"maxlength\">Set a maxlength: </label>\n * <input type=\"number\" ng-model=\"maxlength\" id=\"maxlength\" />\n * <br>\n * <label for=\"input\">This input is restricted by the current maxlength: </label>\n * <input type=\"text\" ng-model=\"model\" id=\"input\" name=\"input\" ng-maxlength=\"maxlength\" /><br>\n * <hr>\n * input valid? = <code>{{form.input.$valid}}</code><br>\n * model = <code>{{model}}</code>\n * </form>\n * </div>\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n var model = element(by.binding('model'));\n var input = element(by.id('input'));\n\n it('should validate the input with the default maxlength', function() {\n input.sendKeys('abcdef');\n expect(model.getText()).not.toContain('abcdef');\n\n input.clear().then(function() {\n input.sendKeys('abcde');\n expect(model.getText()).toContain('abcde');\n });\n });\n * </file>\n * </example>\n */\nvar maxlengthDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var maxlength = -1;\n attr.$observe('maxlength', function(value) {\n var intVal = toInt(value);\n maxlength = isNaN(intVal) ? -1 : intVal;\n ctrl.$validate();\n });\n ctrl.$validators.maxlength = function(modelValue, viewValue) {\n return (maxlength < 0) || ctrl.$isEmpty(viewValue) || (viewValue.length <= maxlength);\n };\n }\n };\n};\n\n/**\n * @ngdoc directive\n * @name ngMinlength\n *\n * @description\n *\n * ngMinlength adds the minlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.\n *\n * The validator sets the `minlength` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`}\n * is shorter than the integer obtained by evaluating the Angular expression given in the\n * `ngMinlength` attribute value.\n *\n * <div class=\"alert alert-info\">\n * **Note:** This directive is also added when the plain `minlength` attribute is used, with two\n * differences:\n * <ol>\n * <li>\n * `ngMinlength` does not set the `minlength` attribute and therefore HTML5 constraint\n * validation is not available.\n * </li>\n * <li>\n * The `ngMinlength` value must be an expression, while the `minlength` value must be\n * interpolated.\n * </li>\n * </ol>\n * </div>\n *\n * @example\n * <example name=\"ngMinlengthDirective\" module=\"ngMinlengthExample\">\n * <file name=\"index.html\">\n * <script>\n * angular.module('ngMinlengthExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.minlength = 3;\n * }]);\n * </script>\n * <div ng-controller=\"ExampleController\">\n * <form name=\"form\">\n * <label for=\"minlength\">Set a minlength: </label>\n * <input type=\"number\" ng-model=\"minlength\" id=\"minlength\" />\n * <br>\n * <label for=\"input\">This input is restricted by the current minlength: </label>\n * <input type=\"text\" ng-model=\"model\" id=\"input\" name=\"input\" ng-minlength=\"minlength\" /><br>\n * <hr>\n * input valid? = <code>{{form.input.$valid}}</code><br>\n * model = <code>{{model}}</code>\n * </form>\n * </div>\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n var model = element(by.binding('model'));\n var input = element(by.id('input'));\n\n it('should validate the input with the default minlength', function() {\n input.sendKeys('ab');\n expect(model.getText()).not.toContain('ab');\n\n input.sendKeys('abc');\n expect(model.getText()).toContain('abc');\n });\n * </file>\n * </example>\n */\nvar minlengthDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var minlength = 0;\n attr.$observe('minlength', function(value) {\n minlength = toInt(value) || 0;\n ctrl.$validate();\n });\n ctrl.$validators.minlength = function(modelValue, viewValue) {\n return ctrl.$isEmpty(viewValue) || viewValue.length >= minlength;\n };\n }\n };\n};\n\nif (window.angular.bootstrap) {\n //AngularJS is already loaded, so we can return here...\n if (window.console) {\n console.log('WARNING: Tried to load angular more than once.');\n }\n return;\n}\n\n//try to bind to jquery now so that one can write jqLite(document).ready()\n//but we will rebind on bootstrap again.\nbindJQuery();\n\npublishExternalAPI(angular);\n\nangular.module(\"ngLocale\", [], [\"$provide\", function($provide) {\nvar PLURAL_CATEGORY = {ZERO: \"zero\", ONE: \"one\", TWO: \"two\", FEW: \"few\", MANY: \"many\", OTHER: \"other\"};\nfunction getDecimals(n) {\n n = n + '';\n var i = n.indexOf('.');\n return (i == -1) ? 0 : n.length - i - 1;\n}\n\nfunction getVF(n, opt_precision) {\n var v = opt_precision;\n\n if (undefined === v) {\n v = Math.min(getDecimals(n), 3);\n }\n\n var base = Math.pow(10, v);\n var f = ((n * base) | 0) % base;\n return {v: v, f: f};\n}\n\n$provide.value(\"$locale\", {\n \"DATETIME_FORMATS\": {\n \"AMPMS\": [\n \"AM\",\n \"PM\"\n ],\n \"DAY\": [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\"\n ],\n \"ERANAMES\": [\n \"Before Christ\",\n \"Anno Domini\"\n ],\n \"ERAS\": [\n \"BC\",\n \"AD\"\n ],\n \"FIRSTDAYOFWEEK\": 6,\n \"MONTH\": [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n ],\n \"SHORTDAY\": [\n \"Sun\",\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\",\n \"Sat\"\n ],\n \"SHORTMONTH\": [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\"\n ],\n \"STANDALONEMONTH\": [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n ],\n \"WEEKENDRANGE\": [\n 5,\n 6\n ],\n \"fullDate\": \"EEEE, MMMM d, y\",\n \"longDate\": \"MMMM d, y\",\n \"medium\": \"MMM d, y h:mm:ss a\",\n \"mediumDate\": \"MMM d, y\",\n \"mediumTime\": \"h:mm:ss a\",\n \"short\": \"M/d/yy h:mm a\",\n \"shortDate\": \"M/d/yy\",\n \"shortTime\": \"h:mm a\"\n },\n \"NUMBER_FORMATS\": {\n \"CURRENCY_SYM\": \"$\",\n \"DECIMAL_SEP\": \".\",\n \"GROUP_SEP\": \",\",\n \"PATTERNS\": [\n {\n \"gSize\": 3,\n \"lgSize\": 3,\n \"maxFrac\": 3,\n \"minFrac\": 0,\n \"minInt\": 1,\n \"negPre\": \"-\",\n \"negSuf\": \"\",\n \"posPre\": \"\",\n \"posSuf\": \"\"\n },\n {\n \"gSize\": 3,\n \"lgSize\": 3,\n \"maxFrac\": 2,\n \"minFrac\": 2,\n \"minInt\": 1,\n \"negPre\": \"-\\u00a4\",\n \"negSuf\": \"\",\n \"posPre\": \"\\u00a4\",\n \"posSuf\": \"\"\n }\n ]\n },\n \"id\": \"en-us\",\n \"localeID\": \"en_US\",\n \"pluralCat\": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}\n});\n}]);\n\n jqLite(document).ready(function() {\n angularInit(document, bootstrap);\n });\n\n})(window, document);\n\n!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend('<style type=\"text/css\">@charset \"UTF-8\";[ng\\\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>');\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/angular/angular.js\n// module id = 3\n// module chunks = 0","require('./angular-route');\nmodule.exports = 'ngRoute';\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/angular-route/index.js\n// module id = 4\n// module chunks = 0","/**\n * @license AngularJS v1.4.14\n * (c) 2010-2015 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\n/**\n * @ngdoc module\n * @name ngRoute\n * @description\n *\n * # ngRoute\n *\n * The `ngRoute` module provides routing and deeplinking services and directives for angular apps.\n *\n * ## Example\n * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`.\n *\n *\n * <div doc-module-components=\"ngRoute\"></div>\n */\n /* global -ngRouteModule */\nvar ngRouteModule = angular.module('ngRoute', ['ng']).\n provider('$route', $RouteProvider),\n $routeMinErr = angular.$$minErr('ngRoute');\n\n/**\n * @ngdoc provider\n * @name $routeProvider\n *\n * @description\n *\n * Used for configuring routes.\n *\n * ## Example\n * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`.\n *\n * ## Dependencies\n * Requires the {@link ngRoute `ngRoute`} module to be installed.\n */\nfunction $RouteProvider() {\n function inherit(parent, extra) {\n return angular.extend(Object.create(parent), extra);\n }\n\n var routes = {};\n\n /**\n * @ngdoc method\n * @name $routeProvider#when\n *\n * @param {string} path Route path (matched against `$location.path`). If `$location.path`\n * contains redundant trailing slash or is missing one, the route will still match and the\n * `$location.path` will be updated to add or drop the trailing slash to exactly match the\n * route definition.\n *\n * * `path` can contain named groups starting with a colon: e.g. `:name`. All characters up\n * to the next slash are matched and stored in `$routeParams` under the given `name`\n * when the route matches.\n * * `path` can contain named groups starting with a colon and ending with a star:\n * e.g.`:name*`. All characters are eagerly stored in `$routeParams` under the given `name`\n * when the route matches.\n * * `path` can contain optional named groups with a question mark: e.g.`:name?`.\n *\n * For example, routes like `/color/:color/largecode/:largecode*\\/edit` will match\n * `/color/brown/largecode/code/with/slashes/edit` and extract:\n *\n * * `color: brown`\n * * `largecode: code/with/slashes`.\n *\n *\n * @param {Object} route Mapping information to be assigned to `$route.current` on route\n * match.\n *\n * Object properties:\n *\n * - `controller` `{(string|function()=}` Controller fn that should be associated with\n * newly created scope or the name of a {@link angular.Module#controller registered\n * controller} if passed as a string.\n * - `controllerAs` `{string=}` An identifier name for a reference to the controller.\n * If present, the controller will be published to scope under the `controllerAs` name.\n * - `template` `{string=|function()=}` html template as a string or a function that\n * returns an html template as a string which should be used by {@link\n * ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives.\n * This property takes precedence over `templateUrl`.\n *\n * If `template` is a function, it will be called with the following parameters:\n *\n * - `{Array.<Object>}` - route parameters extracted from the current\n * `$location.path()` by applying the current route\n *\n * - `templateUrl` `{string=|function()=}` path or function that returns a path to an html\n * template that should be used by {@link ngRoute.directive:ngView ngView}.\n *\n * If `templateUrl` is a function, it will be called with the following parameters:\n *\n * - `{Array.<Object>}` - route parameters extracted from the current\n * `$location.path()` by applying the current route\n *\n * - `resolve` - `{Object.<string, function>=}` - An optional map of dependencies which should\n * be injected into the controller. If any of these dependencies are promises, the router\n * will wait for them all to be resolved or one to be rejected before the controller is\n * instantiated.\n * If all the promises are resolved successfully, the values of the resolved promises are\n * injected and {@link ngRoute.$route#$routeChangeSuccess $routeChangeSuccess} event is\n * fired. If any of the promises are rejected the\n * {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired. The map object\n * is:\n *\n * - `key` `{string}`: a name of a dependency to be injected into the controller.\n * - `factory` - `{string|function}`: If `string` then it is an alias for a service.\n * Otherwise if function, then it is {@link auto.$injector#invoke injected}\n * and the return value is treated as the dependency. If the result is a promise, it is\n * resolved before its value is injected into the controller. Be aware that\n * `ngRoute.$routeParams` will still refer to the previous route within these resolve\n * functions. Use `$route.current.params` to access the new route parameters, instead.\n *\n * - `redirectTo` {(string|function())=} value to update\n * {@link ng.$location $location} path with and trigger route redirection.\n *\n * If `redirectTo` is a function, it will be called with the following parameters:\n *\n * - `{Object.<string>}` - route parameters extracted from the current\n * `$location.path()` by applying the current route templateUrl.\n * - `{string}` - current `$location.path()`\n * - `{Object}` - current `$location.search()`\n *\n * The custom `redirectTo` function is expected to return a string which will be used\n * to update `$location.path()` and `$location.search()`.\n *\n * - `[reloadOnSearch=true]` - {boolean=} - reload route when only `$location.search()`\n * or `$location.hash()` changes.\n *\n * If the option is set to `false` and url in the browser changes, then\n * `$routeUpdate` event is broadcasted on the root scope.\n *\n * - `[caseInsensitiveMatch=false]` - {boolean=} - match routes without being case sensitive\n *\n * If the option is set to `true`, then the particular route can be matched without being\n * case sensitive\n *\n * @returns {Object} self\n *\n * @description\n * Adds a new route definition to the `$route` service.\n */\n this.when = function(path, route) {\n //copy original route object to preserve params inherited from proto chain\n var routeCopy = angular.copy(route);\n if (angular.isUndefined(routeCopy.reloadOnSearch)) {\n routeCopy.reloadOnSearch = true;\n }\n if (angular.isUndefined(routeCopy.caseInsensitiveMatch)) {\n routeCopy.caseInsensitiveMatch = this.caseInsensitiveMatch;\n }\n routes[path] = angular.extend(\n routeCopy,\n path && pathRegExp(path, routeCopy)\n );\n\n // create redirection for trailing slashes\n if (path) {\n var redirectPath = (path[path.length - 1] == '/')\n ? path.substr(0, path.length - 1)\n : path + '/';\n\n routes[redirectPath] = angular.extend(\n {redirectTo: path},\n pathRegExp(redirectPath, routeCopy)\n );\n }\n\n return this;\n };\n\n /**\n * @ngdoc property\n * @name $routeProvider#caseInsensitiveMatch\n * @description\n *\n * A boolean property indicating if routes defined\n * using this provider should be matched using a case insensitive\n * algorithm. Defaults to `false`.\n */\n this.caseInsensitiveMatch = false;\n\n /**\n * @param path {string} path\n * @param opts {Object} options\n * @return {?Object}\n *\n * @description\n * Normalizes the given path, returning a regular expression\n * and the original path.\n *\n * Inspired by pathRexp in visionmedia/express/lib/utils.js.\n */\n function pathRegExp(path, opts) {\n var insensitive = opts.caseInsensitiveMatch,\n ret = {\n originalPath: path,\n regexp: path\n },\n keys = ret.keys = [];\n\n path = path\n .replace(/([().])/g, '\\\\$1')\n .replace(/(\\/)?:(\\w+)(\\*\\?|[\\?\\*])?/g, function(_, slash, key, option) {\n var optional = (option === '?' || option === '*?') ? '?' : null;\n var star = (option === '*' || option === '*?') ? '*' : null;\n keys.push({ name: key, optional: !!optional });\n slash = slash || '';\n return ''\n + (optional ? '' : slash)\n + '(?:'\n + (optional ? slash : '')\n + (star && '(.+?)' || '([^/]+)')\n + (optional || '')\n + ')'\n + (optional || '');\n })\n .replace(/([\\/$\\*])/g, '\\\\$1');\n\n ret.regexp = new RegExp('^' + path + '$', insensitive ? 'i' : '');\n return ret;\n }\n\n /**\n * @ngdoc method\n * @name $routeProvider#otherwise\n *\n * @description\n * Sets route definition that will be used on route change when no other route definition\n * is matched.\n *\n * @param {Object|string} params Mapping information to be assigned to `$route.current`.\n * If called with a string, the value maps to `redirectTo`.\n * @returns {Object} self\n */\n this.otherwise = function(params) {\n if (typeof params === 'string') {\n params = {redirectTo: params};\n }\n this.when(null, params);\n return this;\n };\n\n\n this.$get = ['$rootScope',\n '$location',\n '$routeParams',\n '$q',\n '$injector',\n '$templateRequest',\n '$sce',\n function($rootScope, $location, $routeParams, $q, $injector, $templateRequest, $sce) {\n\n /**\n * @ngdoc service\n * @name $route\n * @requires $location\n * @requires $routeParams\n *\n * @property {Object} current Reference to the current route definition.\n * The route definition contains:\n *\n * - `controller`: The controller constructor as define in route definition.\n * - `locals`: A map of locals which is used by {@link ng.$controller $controller} service for\n * controller instantiation. The `locals` contain\n * the resolved values of the `resolve` map. Additionally the `locals` also contain:\n *\n * - `$scope` - The current route scope.\n * - `$template` - The current route template HTML.\n *\n * @property {Object} routes Object with all route configuration Objects as its properties.\n *\n * @description\n * `$route` is used for deep-linking URLs to controllers and views (HTML partials).\n * It watches `$location.url()` and tries to map the path to an existing route definition.\n *\n * Requires the {@link ngRoute `ngRoute`} module to be installed.\n *\n * You can define routes through {@link ngRoute.$routeProvider $routeProvider}'s API.\n *\n * The `$route` service is typically used in conjunction with the\n * {@link ngRoute.directive:ngView `ngView`} directive and the\n * {@link ngRoute.$routeParams `$routeParams`} service.\n *\n * @example\n * This example shows how changing the URL hash causes the `$route` to match a route against the\n * URL, and the `ngView` pulls in the partial.\n *\n * <example name=\"$route-service\" module=\"ngRouteExample\"\n * deps=\"angular-route.js\" fixBase=\"true\">\n * <file name=\"index.html\">\n * <div ng-controller=\"MainController\">\n * Choose:\n * <a href=\"Book/Moby\">Moby</a> |\n * <a href=\"Book/Moby/ch/1\">Moby: Ch1</a> |\n * <a href=\"Book/Gatsby\">Gatsby</a> |\n * <a href=\"Book/Gatsby/ch/4?key=value\">Gatsby: Ch4</a> |\n * <a href=\"Book/Scarlet\">Scarlet Letter</a><br/>\n *\n * <div ng-view></div>\n *\n * <hr />\n *\n * <pre>$location.path() = {{$location.path()}}</pre>\n * <pre>$route.current.templateUrl = {{$route.current.templateUrl}}</pre>\n * <pre>$route.current.params = {{$route.current.params}}</pre>\n * <pre>$route.current.scope.name = {{$route.current.scope.name}}</pre>\n * <pre>$routeParams = {{$routeParams}}</pre>\n * </div>\n * </file>\n *\n * <file name=\"book.html\">\n * controller: {{name}}<br />\n * Book Id: {{params.bookId}}<br />\n * </file>\n *\n * <file name=\"chapter.html\">\n * controller: {{name}}<br />\n * Book Id: {{params.bookId}}<br />\n * Chapter Id: {{params.chapterId}}\n * </file>\n *\n * <file name=\"script.js\">\n * angular.module('ngRouteExample', ['ngRoute'])\n *\n * .controller('MainController', function($scope, $route, $routeParams, $location) {\n * $scope.$route = $route;\n * $scope.$location = $location;\n * $scope.$routeParams = $routeParams;\n * })\n *\n * .controller('BookController', function($scope, $routeParams) {\n * $scope.name = \"BookController\";\n * $scope.params = $routeParams;\n * })\n *\n * .controller('ChapterController', function($scope, $routeParams) {\n * $scope.name = \"ChapterController\";\n * $scope.params = $routeParams;\n * })\n *\n * .config(function($routeProvider, $locationProvider) {\n * $routeProvider\n * .when('/Book/:bookId', {\n * templateUrl: 'book.html',\n * controller: 'BookController',\n * resolve: {\n * // I will cause a 1 second delay\n * delay: function($q, $timeout) {\n * var delay = $q.defer();\n * $timeout(delay.resolve, 1000);\n * return delay.promise;\n * }\n * }\n * })\n * .when('/Book/:bookId/ch/:chapterId', {\n * templateUrl: 'chapter.html',\n * controller: 'ChapterController'\n * });\n *\n * // configure html5 to get links working on jsfiddle\n * $locationProvider.html5Mode(true);\n * });\n *\n * </file>\n *\n * <file name=\"protractor.js\" type=\"protractor\">\n * it('should load and compile correct template', function() {\n * element(by.linkText('Moby: Ch1')).click();\n * var content = element(by.css('[ng-view]')).getText();\n * expect(content).toMatch(/controller\\: ChapterController/);\n * expect(content).toMatch(/Book Id\\: Moby/);\n * expect(content).toMatch(/Chapter Id\\: 1/);\n *\n * element(by.partialLinkText('Scarlet')).click();\n *\n * content = element(by.css('[ng-view]')).getText();\n * expect(content).toMatch(/controller\\: BookController/);\n * expect(content).toMatch(/Book Id\\: Scarlet/);\n * });\n * </file>\n * </example>\n */\n\n /**\n * @ngdoc event\n * @name $route#$routeChangeStart\n * @eventType broadcast on root scope\n * @description\n * Broadcasted before a route change. At this point the route services starts\n * resolving all of the dependencies needed for the route change to occur.\n * Typically this involves fetching the view template as well as any dependencies\n * defined in `resolve` route property. Once all of the dependencies are resolved\n * `$routeChangeSuccess` is fired.\n *\n * The route change (and the `$location` change that triggered it) can be prevented\n * by calling `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on}\n * for more details about event object.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {Route} next Future route information.\n * @param {Route} current Current route information.\n */\n\n /**\n * @ngdoc event\n * @name $route#$routeChangeSuccess\n * @eventType broadcast on root scope\n * @description\n * Broadcasted after a route change has happened successfully.\n * The `resolve` dependencies are now available in the `current.locals` property.\n *\n * {@link ngRoute.directive:ngView ngView} listens for the directive\n * to instantiate the controller and render the view.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {Route} current Current route information.\n * @param {Route|Undefined} previous Previous route information, or undefined if current is\n * first route entered.\n */\n\n /**\n * @ngdoc event\n * @name $route#$routeChangeError\n * @eventType broadcast on root scope\n * @description\n * Broadcasted if any of the resolve promises are rejected.\n *\n * @param {Object} angularEvent Synthetic event object\n * @param {Route} current Current route information.\n * @param {Route} previous Previous route information.\n * @param {Route} rejection Rejection of the promise. Usually the error of the failed promise.\n */\n\n /**\n * @ngdoc event\n * @name $route#$routeUpdate\n * @eventType broadcast on root scope\n * @description\n * The `reloadOnSearch` property has been set to false, and we are reusing the same\n * instance of the Controller.\n *\n * @param {Object} angularEvent Synthetic event object\n * @param {Route} current Current/previous route information.\n */\n\n var forceReload = false,\n preparedRoute,\n preparedRouteIsUpdateOnly,\n $route = {\n routes: routes,\n\n /**\n * @ngdoc method\n * @name $route#reload\n *\n * @description\n * Causes `$route` service to reload the current route even if\n * {@link ng.$location $location} hasn't changed.\n *\n * As a result of that, {@link ngRoute.directive:ngView ngView}\n * creates new scope and reinstantiates the controller.\n */\n reload: function() {\n forceReload = true;\n\n var fakeLocationEvent = {\n defaultPrevented: false,\n preventDefault: function fakePreventDefault() {\n this.defaultPrevented = true;\n forceReload = false;\n }\n };\n\n $rootScope.$evalAsync(function() {\n prepareRoute(fakeLocationEvent);\n if (!fakeLocationEvent.defaultPrevented) commitRoute();\n });\n },\n\n /**\n * @ngdoc method\n * @name $route#updateParams\n *\n * @description\n * Causes `$route` service to update the current URL, replacing\n * current route parameters with those specified in `newParams`.\n * Provided property names that match the route's path segment\n * definitions will be interpolated into the location's path, while\n * remaining properties will be treated as query params.\n *\n * @param {!Object<string, string>} newParams mapping of URL parameter names to values\n */\n updateParams: function(newParams) {\n if (this.current && this.current.$$route) {\n newParams = angular.extend({}, this.current.params, newParams);\n $location.path(interpolate(this.current.$$route.originalPath, newParams));\n // interpolate modifies newParams, only query params are left\n $location.search(newParams);\n } else {\n throw $routeMinErr('norout', 'Tried updating route when with no current route');\n }\n }\n };\n\n $rootScope.$on('$locationChangeStart', prepareRoute);\n $rootScope.$on('$locationChangeSuccess', commitRoute);\n\n return $route;\n\n /////////////////////////////////////////////////////\n\n /**\n * @param on {string} current url\n * @param route {Object} route regexp to match the url against\n * @return {?Object}\n *\n * @description\n * Check if the route matches the current url.\n *\n * Inspired by match in\n * visionmedia/express/lib/router/router.js.\n */\n function switchRouteMatcher(on, route) {\n var keys = route.keys,\n params = {};\n\n if (!route.regexp) return null;\n\n var m = route.regexp.exec(on);\n if (!m) return null;\n\n for (var i = 1, len = m.length; i < len; ++i) {\n var key = keys[i - 1];\n\n var val = m[i];\n\n if (key && val) {\n params[key.name] = val;\n }\n }\n return params;\n }\n\n function prepareRoute($locationEvent) {\n var lastRoute = $route.current;\n\n preparedRoute = parseRoute();\n preparedRouteIsUpdateOnly = preparedRoute && lastRoute && preparedRoute.$$route === lastRoute.$$route\n && angular.equals(preparedRoute.pathParams, lastRoute.pathParams)\n && !preparedRoute.reloadOnSearch && !forceReload;\n\n if (!preparedRouteIsUpdateOnly && (lastRoute || preparedRoute)) {\n if ($rootScope.$broadcast('$routeChangeStart', preparedRoute, lastRoute).defaultPrevented) {\n if ($locationEvent) {\n $locationEvent.preventDefault();\n }\n }\n }\n }\n\n function commitRoute() {\n var lastRoute = $route.current;\n var nextRoute = preparedRoute;\n\n if (preparedRouteIsUpdateOnly) {\n lastRoute.params = nextRoute.params;\n angular.copy(lastRoute.params, $routeParams);\n $rootScope.$broadcast('$routeUpdate', lastRoute);\n } else if (nextRoute || lastRoute) {\n forceReload = false;\n $route.current = nextRoute;\n if (nextRoute) {\n if (nextRoute.redirectTo) {\n if (angular.isString(nextRoute.redirectTo)) {\n $location.path(interpolate(nextRoute.redirectTo, nextRoute.params)).search(nextRoute.params)\n .replace();\n } else {\n $location.url(nextRoute.redirectTo(nextRoute.pathParams, $location.path(), $location.search()))\n .replace();\n }\n }\n }\n\n $q.when(nextRoute).\n then(function() {\n if (nextRoute) {\n var locals = angular.extend({}, nextRoute.resolve),\n template, templateUrl;\n\n angular.forEach(locals, function(value, key) {\n locals[key] = angular.isString(value) ?\n $injector.get(value) : $injector.invoke(value, null, null, key);\n });\n\n if (angular.isDefined(template = nextRoute.template)) {\n if (angular.isFunction(template)) {\n template = template(nextRoute.params);\n }\n } else if (angular.isDefined(templateUrl = nextRoute.templateUrl)) {\n if (angular.isFunction(templateUrl)) {\n templateUrl = templateUrl(nextRoute.params);\n }\n if (angular.isDefined(templateUrl)) {\n nextRoute.loadedTemplateUrl = $sce.valueOf(templateUrl);\n template = $templateRequest(templateUrl);\n }\n }\n if (angular.isDefined(template)) {\n locals['$template'] = template;\n }\n return $q.all(locals);\n }\n }).\n then(function(locals) {\n // after route change\n if (nextRoute == $route.current) {\n if (nextRoute) {\n nextRoute.locals = locals;\n angular.copy(nextRoute.params, $routeParams);\n }\n $rootScope.$broadcast('$routeChangeSuccess', nextRoute, lastRoute);\n }\n }, function(error) {\n if (nextRoute == $route.current) {\n $rootScope.$broadcast('$routeChangeError', nextRoute, lastRoute, error);\n }\n });\n }\n }\n\n\n /**\n * @returns {Object} the current active route, by matching it against the URL\n */\n function parseRoute() {\n // Match a route\n var params, match;\n angular.forEach(routes, function(route, path) {\n if (!match && (params = switchRouteMatcher($location.path(), route))) {\n match = inherit(route, {\n params: angular.extend({}, $location.search(), params),\n pathParams: params});\n match.$$route = route;\n }\n });\n // No route matched; fallback to \"otherwise\" route\n return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}});\n }\n\n /**\n * @returns {string} interpolation of the redirect path with the parameters\n */\n function interpolate(string, params) {\n var result = [];\n angular.forEach((string || '').split(':'), function(segment, i) {\n if (i === 0) {\n result.push(segment);\n } else {\n var segmentMatch = segment.match(/(\\w+)(?:[?*])?(.*)/);\n var key = segmentMatch[1];\n result.push(params[key]);\n result.push(segmentMatch[2] || '');\n delete params[key];\n }\n });\n return result.join('');\n }\n }];\n}\n\nngRouteModule.provider('$routeParams', $RouteParamsProvider);\n\n\n/**\n * @ngdoc service\n * @name $routeParams\n * @requires $route\n *\n * @description\n * The `$routeParams` service allows you to retrieve the current set of route parameters.\n *\n * Requires the {@link ngRoute `ngRoute`} module to be installed.\n *\n * The route parameters are a combination of {@link ng.$location `$location`}'s\n * {@link ng.$location#search `search()`} and {@link ng.$location#path `path()`}.\n * The `path` parameters are extracted when the {@link ngRoute.$route `$route`} path is matched.\n *\n * In case of parameter name collision, `path` params take precedence over `search` params.\n *\n * The service guarantees that the identity of the `$routeParams` object will remain unchanged\n * (but its properties will likely change) even when a route change occurs.\n *\n * Note that the `$routeParams` are only updated *after* a route change completes successfully.\n * This means that you cannot rely on `$routeParams` being correct in route resolve functions.\n * Instead you can use `$route.current.params` to access the new route's parameters.\n *\n * @example\n * ```js\n * // Given:\n * // URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby\n * // Route: /Chapter/:chapterId/Section/:sectionId\n * //\n * // Then\n * $routeParams ==> {chapterId:'1', sectionId:'2', search:'moby'}\n * ```\n */\nfunction $RouteParamsProvider() {\n this.$get = function() { return {}; };\n}\n\nngRouteModule.directive('ngView', ngViewFactory);\nngRouteModule.directive('ngView', ngViewFillContentFactory);\n\n\n/**\n * @ngdoc directive\n * @name ngView\n * @restrict ECA\n *\n * @description\n * # Overview\n * `ngView` is a directive that complements the {@link ngRoute.$route $route} service by\n * including the rendered template of the current route into the main layout (`index.html`) file.\n * Every time the current route changes, the included view changes with it according to the\n * configuration of the `$route` service.\n *\n * Requires the {@link ngRoute `ngRoute`} module to be installed.\n *\n * @animations\n * enter - animation is used to bring new content into the browser.\n * leave - animation is used to animate existing content away.\n *\n * The enter and leave animation occur concurrently.\n *\n * @scope\n * @priority 400\n * @param {string=} onload Expression to evaluate whenever the view updates.\n *\n * @param {string=} autoscroll Whether `ngView` should call {@link ng.$anchorScroll\n * $anchorScroll} to scroll the viewport after the view is updated.\n *\n * - If the attribute is not set, disable scrolling.\n * - If the attribute is set without value, enable scrolling.\n * - Otherwise enable scrolling only if the `autoscroll` attribute value evaluated\n * as an expression yields a truthy value.\n * @example\n <example name=\"ngView-directive\" module=\"ngViewExample\"\n deps=\"angular-route.js;angular-animate.js\"\n animations=\"true\" fixBase=\"true\">\n <file name=\"index.html\">\n <div ng-controller=\"MainCtrl as main\">\n Choose:\n <a href=\"Book/Moby\">Moby</a> |\n <a href=\"Book/Moby/ch/1\">Moby: Ch1</a> |\n <a href=\"Book/Gatsby\">Gatsby</a> |\n <a href=\"Book/Gatsby/ch/4?key=value\">Gatsby: Ch4</a> |\n <a href=\"Book/Scarlet\">Scarlet Letter</a><br/>\n\n <div class=\"view-animate-container\">\n <div ng-view class=\"view-animate\"></div>\n </div>\n <hr />\n\n <pre>$location.path() = {{main.$location.path()}}</pre>\n <pre>$route.current.templateUrl = {{main.$route.current.templateUrl}}</pre>\n <pre>$route.current.params = {{main.$route.current.params}}</pre>\n <pre>$routeParams = {{main.$routeParams}}</pre>\n </div>\n </file>\n\n <file name=\"book.html\">\n <div>\n controller: {{book.name}}<br />\n Book Id: {{book.params.bookId}}<br />\n </div>\n </file>\n\n <file name=\"chapter.html\">\n <div>\n controller: {{chapter.name}}<br />\n Book Id: {{chapter.params.bookId}}<br />\n Chapter Id: {{chapter.params.chapterId}}\n </div>\n </file>\n\n <file name=\"animations.css\">\n .view-animate-container {\n position:relative;\n height:100px!important;\n background:white;\n border:1px solid black;\n height:40px;\n overflow:hidden;\n }\n\n .view-animate {\n padding:10px;\n }\n\n .view-animate.ng-enter, .view-animate.ng-leave {\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;\n\n display:block;\n width:100%;\n border-left:1px solid black;\n\n position:absolute;\n top:0;\n left:0;\n right:0;\n bottom:0;\n padding:10px;\n }\n\n .view-animate.ng-enter {\n left:100%;\n }\n .view-animate.ng-enter.ng-enter-active {\n left:0;\n }\n .view-animate.ng-leave.ng-leave-active {\n left:-100%;\n }\n </file>\n\n <file name=\"script.js\">\n angular.module('ngViewExample', ['ngRoute', 'ngAnimate'])\n .config(['$routeProvider', '$locationProvider',\n function($routeProvider, $locationProvider) {\n $routeProvider\n .when('/Book/:bookId', {\n templateUrl: 'book.html',\n controller: 'BookCtrl',\n controllerAs: 'book'\n })\n .when('/Book/:bookId/ch/:chapterId', {\n templateUrl: 'chapter.html',\n controller: 'ChapterCtrl',\n controllerAs: 'chapter'\n });\n\n $locationProvider.html5Mode(true);\n }])\n .controller('MainCtrl', ['$route', '$routeParams', '$location',\n function($route, $routeParams, $location) {\n this.$route = $route;\n this.$location = $location;\n this.$routeParams = $routeParams;\n }])\n .controller('BookCtrl', ['$routeParams', function($routeParams) {\n this.name = \"BookCtrl\";\n this.params = $routeParams;\n }])\n .controller('ChapterCtrl', ['$routeParams', function($routeParams) {\n this.name = \"ChapterCtrl\";\n this.params = $routeParams;\n }]);\n\n </file>\n\n <file name=\"protractor.js\" type=\"protractor\">\n it('should load and compile correct template', function() {\n element(by.linkText('Moby: Ch1')).click();\n var content = element(by.css('[ng-view]')).getText();\n expect(content).toMatch(/controller\\: ChapterCtrl/);\n expect(content).toMatch(/Book Id\\: Moby/);\n expect(content).toMatch(/Chapter Id\\: 1/);\n\n element(by.partialLinkText('Scarlet')).click();\n\n content = element(by.css('[ng-view]')).getText();\n expect(content).toMatch(/controller\\: BookCtrl/);\n expect(content).toMatch(/Book Id\\: Scarlet/);\n });\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc event\n * @name ngView#$viewContentLoaded\n * @eventType emit on the current ngView scope\n * @description\n * Emitted every time the ngView content is reloaded.\n */\nngViewFactory.$inject = ['$route', '$anchorScroll', '$animate'];\nfunction ngViewFactory($route, $anchorScroll, $animate) {\n return {\n restrict: 'ECA',\n terminal: true,\n priority: 400,\n transclude: 'element',\n link: function(scope, $element, attr, ctrl, $transclude) {\n var currentScope,\n currentElement,\n previousLeaveAnimation,\n autoScrollExp = attr.autoscroll,\n onloadExp = attr.onload || '';\n\n scope.$on('$routeChangeSuccess', update);\n update();\n\n function cleanupLastView() {\n if (previousLeaveAnimation) {\n $animate.cancel(previousLeaveAnimation);\n previousLeaveAnimation = null;\n }\n\n if (currentScope) {\n currentScope.$destroy();\n currentScope = null;\n }\n if (currentElement) {\n previousLeaveAnimation = $animate.leave(currentElement);\n previousLeaveAnimation.then(function() {\n previousLeaveAnimation = null;\n });\n currentElement = null;\n }\n }\n\n function update() {\n var locals = $route.current && $route.current.locals,\n template = locals && locals.$template;\n\n if (angular.isDefined(template)) {\n var newScope = scope.$new();\n var current = $route.current;\n\n // Note: This will also link all children of ng-view that were contained in the original\n // html. If that content contains controllers, ... they could pollute/change the scope.\n // However, using ng-view on an element with additional content does not make sense...\n // Note: We can't remove them in the cloneAttchFn of $transclude as that\n // function is called before linking the content, which would apply child\n // directives to non existing elements.\n var clone = $transclude(newScope, function(clone) {\n $animate.enter(clone, null, currentElement || $element).then(function onNgViewEnter() {\n if (angular.isDefined(autoScrollExp)\n && (!autoScrollExp || scope.$eval(autoScrollExp))) {\n $anchorScroll();\n }\n });\n cleanupLastView();\n });\n\n currentElement = clone;\n currentScope = current.scope = newScope;\n currentScope.$emit('$viewContentLoaded');\n currentScope.$eval(onloadExp);\n } else {\n cleanupLastView();\n }\n }\n }\n };\n}\n\n// This directive is called during the $transclude call of the first `ngView` directive.\n// It will replace and compile the content of the element with the loaded template.\n// We need this directive so that the element content is already filled when\n// the link function of another directive on the same element as ngView\n// is called.\nngViewFillContentFactory.$inject = ['$compile', '$controller', '$route'];\nfunction ngViewFillContentFactory($compile, $controller, $route) {\n return {\n restrict: 'ECA',\n priority: -400,\n link: function(scope, $element) {\n var current = $route.current,\n locals = current.locals;\n\n $element.html(locals.$template);\n\n var link = $compile($element.contents());\n\n if (current.controller) {\n locals.$scope = scope;\n var controller = $controller(current.controller, locals);\n if (current.controllerAs) {\n scope[current.controllerAs] = controller;\n }\n $element.data('$ngControllerController', controller);\n $element.children().data('$ngControllerController', controller);\n }\n\n link(scope);\n }\n };\n}\n\n\n})(window, window.angular);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/angular-route/angular-route.js\n// module id = 5\n// module chunks = 0","require('./angular-sanitize');\nmodule.exports = 'ngSanitize';\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/angular-sanitize/index.js\n// module id = 6\n// module chunks = 0","/**\n * @license AngularJS v1.4.14\n * (c) 2010-2015 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * Any commits to this file should be reviewed with security in mind. *\n * Changes to this file can potentially create security vulnerabilities. *\n * An approval from 2 Core members with history of modifying *\n * this file is required. *\n * *\n * Does the change somehow allow for arbitrary javascript to be executed? *\n * Or allows for someone to change the prototype of built-in objects? *\n * Or gives undesired access to variables likes document or window? *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\nvar $sanitizeMinErr = angular.$$minErr('$sanitize');\n\n/**\n * @ngdoc module\n * @name ngSanitize\n * @description\n *\n * # ngSanitize\n *\n * The `ngSanitize` module provides functionality to sanitize HTML.\n *\n *\n * <div doc-module-components=\"ngSanitize\"></div>\n *\n * See {@link ngSanitize.$sanitize `$sanitize`} for usage.\n */\n\n/*\n * HTML Parser By Misko Hevery (misko@hevery.com)\n * based on: HTML Parser By John Resig (ejohn.org)\n * Original code by Erik Arvidsson, Mozilla Public License\n * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js\n *\n * // Use like so:\n * htmlParser(htmlString, {\n * start: function(tag, attrs, unary) {},\n * end: function(tag) {},\n * chars: function(text) {},\n * comment: function(text) {}\n * });\n *\n */\n\n\n/**\n * @ngdoc service\n * @name $sanitize\n * @kind function\n *\n * @description\n * The input is sanitized by parsing the HTML into tokens. All safe tokens (from a whitelist) are\n * then serialized back to properly escaped html string. This means that no unsafe input can make\n * it into the returned string, however, since our parser is more strict than a typical browser\n * parser, it's possible that some obscure input, which would be recognized as valid HTML by a\n * browser, won't make it through the sanitizer. The input may also contain SVG markup.\n * The whitelist is configured using the functions `aHrefSanitizationWhitelist` and\n * `imgSrcSanitizationWhitelist` of {@link ng.$compileProvider `$compileProvider`}.\n *\n * @param {string} html HTML input.\n * @returns {string} Sanitized HTML.\n *\n * @example\n <example module=\"sanitizeExample\" deps=\"angular-sanitize.js\">\n <file name=\"index.html\">\n <script>\n angular.module('sanitizeExample', ['ngSanitize'])\n .controller('ExampleController', ['$scope', '$sce', function($scope, $sce) {\n $scope.snippet =\n '<p style=\"color:blue\">an html\\n' +\n '<em onmouseover=\"this.textContent=\\'PWN3D!\\'\">click here</em>\\n' +\n 'snippet</p>';\n $scope.deliberatelyTrustDangerousSnippet = function() {\n return $sce.trustAsHtml($scope.snippet);\n };\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n Snippet: <textarea ng-model=\"snippet\" cols=\"60\" rows=\"3\"></textarea>\n <table>\n <tr>\n <td>Directive</td>\n <td>How</td>\n <td>Source</td>\n <td>Rendered</td>\n </tr>\n <tr id=\"bind-html-with-sanitize\">\n <td>ng-bind-html</td>\n <td>Automatically uses $sanitize</td>\n <td><pre>&lt;div ng-bind-html=\"snippet\"&gt;<br/>&lt;/div&gt;</pre></td>\n <td><div ng-bind-html=\"snippet\"></div></td>\n </tr>\n <tr id=\"bind-html-with-trust\">\n <td>ng-bind-html</td>\n <td>Bypass $sanitize by explicitly trusting the dangerous value</td>\n <td>\n <pre>&lt;div ng-bind-html=\"deliberatelyTrustDangerousSnippet()\"&gt;\n&lt;/div&gt;</pre>\n </td>\n <td><div ng-bind-html=\"deliberatelyTrustDangerousSnippet()\"></div></td>\n </tr>\n <tr id=\"bind-default\">\n <td>ng-bind</td>\n <td>Automatically escapes</td>\n <td><pre>&lt;div ng-bind=\"snippet\"&gt;<br/>&lt;/div&gt;</pre></td>\n <td><div ng-bind=\"snippet\"></div></td>\n </tr>\n </table>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should sanitize the html snippet by default', function() {\n expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).\n toBe('<p>an html\\n<em>click here</em>\\nsnippet</p>');\n });\n\n it('should inline raw snippet if bound to a trusted value', function() {\n expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).\n toBe(\"<p style=\\\"color:blue\\\">an html\\n\" +\n \"<em onmouseover=\\\"this.textContent='PWN3D!'\\\">click here</em>\\n\" +\n \"snippet</p>\");\n });\n\n it('should escape snippet without any filter', function() {\n expect(element(by.css('#bind-default div')).getInnerHtml()).\n toBe(\"&lt;p style=\\\"color:blue\\\"&gt;an html\\n\" +\n \"&lt;em onmouseover=\\\"this.textContent='PWN3D!'\\\"&gt;click here&lt;/em&gt;\\n\" +\n \"snippet&lt;/p&gt;\");\n });\n\n it('should update', function() {\n element(by.model('snippet')).clear();\n element(by.model('snippet')).sendKeys('new <b onclick=\"alert(1)\">text</b>');\n expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).\n toBe('new <b>text</b>');\n expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).toBe(\n 'new <b onclick=\"alert(1)\">text</b>');\n expect(element(by.css('#bind-default div')).getInnerHtml()).toBe(\n \"new &lt;b onclick=\\\"alert(1)\\\"&gt;text&lt;/b&gt;\");\n });\n </file>\n </example>\n */\nfunction $SanitizeProvider() {\n this.$get = ['$$sanitizeUri', function($$sanitizeUri) {\n return function(html) {\n var buf = [];\n htmlParser(html, htmlSanitizeWriter(buf, function(uri, isImage) {\n return !/^unsafe/.test($$sanitizeUri(uri, isImage));\n }));\n return buf.join('');\n };\n }];\n}\n\nfunction sanitizeText(chars) {\n var buf = [];\n var writer = htmlSanitizeWriter(buf, angular.noop);\n writer.chars(chars);\n return buf.join('');\n}\n\n\n// Regular Expressions for parsing tags and attributes\nvar START_TAG_REGEXP =\n /^<((?:[a-zA-Z])[\\w:-]*)((?:\\s+[\\w:-]+(?:\\s*=\\s*(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>\\s]+))?)*)\\s*(\\/?)\\s*(>?)/,\n END_TAG_REGEXP = /^<\\/\\s*([\\w:-]+)[^>]*>/,\n ATTR_REGEXP = /([\\w:-]+)(?:\\s*=\\s*(?:(?:\"((?:[^\"])*)\")|(?:'((?:[^'])*)')|([^>\\s]+)))?/g,\n BEGIN_TAG_REGEXP = /^</,\n BEGING_END_TAGE_REGEXP = /^<\\//,\n COMMENT_REGEXP = /<!--(.*?)-->/g,\n DOCTYPE_REGEXP = /<!DOCTYPE([^>]*?)>/i,\n CDATA_REGEXP = /<!\\[CDATA\\[(.*?)]]>/g,\n SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g,\n // Match everything outside of normal chars and \" (quote character)\n NON_ALPHANUMERIC_REGEXP = /([^\\#-~| |!])/g;\n\n\n// Good source of info about elements and attributes\n// http://dev.w3.org/html5/spec/Overview.html#semantics\n// http://simon.html5.org/html-elements\n\n// Safe Void Elements - HTML5\n// http://dev.w3.org/html5/spec/Overview.html#void-elements\nvar voidElements = makeMap(\"area,br,col,hr,img,wbr\");\n\n// Elements that you can, intentionally, leave open (and which close themselves)\n// http://dev.w3.org/html5/spec/Overview.html#optional-tags\nvar optionalEndTagBlockElements = makeMap(\"colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr\"),\n optionalEndTagInlineElements = makeMap(\"rp,rt\"),\n optionalEndTagElements = angular.extend({},\n optionalEndTagInlineElements,\n optionalEndTagBlockElements);\n\n// Safe Block Elements - HTML5\nvar blockElements = angular.extend({}, optionalEndTagBlockElements, makeMap(\"address,article,\" +\n \"aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,\" +\n \"h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul\"));\n\n// Inline Elements - HTML5\nvar inlineElements = angular.extend({}, optionalEndTagInlineElements, makeMap(\"a,abbr,acronym,b,\" +\n \"bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,\" +\n \"samp,small,span,strike,strong,sub,sup,time,tt,u,var\"));\n\n// SVG Elements\n// https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Elements\n// Note: the elements animate,animateColor,animateMotion,animateTransform,set are intentionally omitted.\n// They can potentially allow for arbitrary javascript to be executed. See #11290\nvar svgElements = makeMap(\"circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,\" +\n \"hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,\" +\n \"radialGradient,rect,stop,svg,switch,text,title,tspan,use\");\n\n// Special Elements (can contain anything)\nvar specialElements = makeMap(\"script,style\");\n\nvar validElements = angular.extend({},\n voidElements,\n blockElements,\n inlineElements,\n optionalEndTagElements,\n svgElements);\n\n//Attributes that have href and hence need to be sanitized\nvar uriAttrs = makeMap(\"background,cite,href,longdesc,src,usemap,xlink:href\");\n\nvar htmlAttrs = makeMap('abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,' +\n 'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,' +\n 'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,' +\n 'scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,' +\n 'valign,value,vspace,width');\n\n// SVG attributes (without \"id\" and \"name\" attributes)\n// https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Attributes\nvar svgAttrs = makeMap('accent-height,accumulate,additive,alphabetic,arabic-form,ascent,' +\n 'baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,' +\n 'cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,' +\n 'font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,' +\n 'height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,' +\n 'marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,' +\n 'max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,' +\n 'path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,' +\n 'requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,' +\n 'stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,' +\n 'stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,' +\n 'stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,' +\n 'underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,' +\n 'width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,' +\n 'xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan', true);\n\nvar validAttrs = angular.extend({},\n uriAttrs,\n svgAttrs,\n htmlAttrs);\n\nfunction makeMap(str, lowercaseKeys) {\n var obj = {}, items = str.split(','), i;\n for (i = 0; i < items.length; i++) {\n obj[lowercaseKeys ? angular.lowercase(items[i]) : items[i]] = true;\n }\n return obj;\n}\n\n\n/**\n * @example\n * htmlParser(htmlString, {\n * start: function(tag, attrs, unary) {},\n * end: function(tag) {},\n * chars: function(text) {},\n * comment: function(text) {}\n * });\n *\n * @param {string} html string\n * @param {object} handler\n */\nfunction htmlParser(html, handler) {\n if (typeof html !== 'string') {\n if (html === null || typeof html === 'undefined') {\n html = '';\n } else {\n html = '' + html;\n }\n }\n var index, chars, match, stack = [], last = html, text;\n stack.last = function() { return stack[stack.length - 1]; };\n\n while (html) {\n text = '';\n chars = true;\n\n // Make sure we're not in a script or style element\n if (!stack.last() || !specialElements[stack.last()]) {\n\n // Comment\n if (html.indexOf(\"<!--\") === 0) {\n // comments containing -- are not allowed unless they terminate the comment\n index = html.indexOf(\"--\", 4);\n\n if (index >= 0 && html.lastIndexOf(\"-->\", index) === index) {\n if (handler.comment) handler.comment(html.substring(4, index));\n html = html.substring(index + 3);\n chars = false;\n }\n // DOCTYPE\n } else if (DOCTYPE_REGEXP.test(html)) {\n match = html.match(DOCTYPE_REGEXP);\n\n if (match) {\n html = html.replace(match[0], '');\n chars = false;\n }\n // end tag\n } else if (BEGING_END_TAGE_REGEXP.test(html)) {\n match = html.match(END_TAG_REGEXP);\n\n if (match) {\n html = html.substring(match[0].length);\n match[0].replace(END_TAG_REGEXP, parseEndTag);\n chars = false;\n }\n\n // start tag\n } else if (BEGIN_TAG_REGEXP.test(html)) {\n match = html.match(START_TAG_REGEXP);\n\n if (match) {\n // We only have a valid start-tag if there is a '>'.\n if (match[4]) {\n html = html.substring(match[0].length);\n match[0].replace(START_TAG_REGEXP, parseStartTag);\n }\n chars = false;\n } else {\n // no ending tag found --- this piece should be encoded as an entity.\n text += '<';\n html = html.substring(1);\n }\n }\n\n if (chars) {\n index = html.indexOf(\"<\");\n\n text += index < 0 ? html : html.substring(0, index);\n html = index < 0 ? \"\" : html.substring(index);\n\n if (handler.chars) handler.chars(decodeEntities(text));\n }\n\n } else {\n // IE versions 9 and 10 do not understand the regex '[^]', so using a workaround with [\\W\\w].\n html = html.replace(new RegExp(\"([\\\\W\\\\w]*)<\\\\s*\\\\/\\\\s*\" + stack.last() + \"[^>]*>\", 'i'),\n function(all, text) {\n text = text.replace(COMMENT_REGEXP, \"$1\").replace(CDATA_REGEXP, \"$1\");\n\n if (handler.chars) handler.chars(decodeEntities(text));\n\n return \"\";\n });\n\n parseEndTag(\"\", stack.last());\n }\n\n if (html == last) {\n throw $sanitizeMinErr('badparse', \"The sanitizer was unable to parse the following block \" +\n \"of html: {0}\", html);\n }\n last = html;\n }\n\n // Clean up any remaining tags\n parseEndTag();\n\n function parseStartTag(tag, tagName, rest, unary) {\n tagName = angular.lowercase(tagName);\n if (blockElements[tagName]) {\n while (stack.last() && inlineElements[stack.last()]) {\n parseEndTag(\"\", stack.last());\n }\n }\n\n if (optionalEndTagElements[tagName] && stack.last() == tagName) {\n parseEndTag(\"\", tagName);\n }\n\n unary = voidElements[tagName] || !!unary;\n\n if (!unary) {\n stack.push(tagName);\n }\n\n var attrs = {};\n\n rest.replace(ATTR_REGEXP,\n function(match, name, doubleQuotedValue, singleQuotedValue, unquotedValue) {\n var value = doubleQuotedValue\n || singleQuotedValue\n || unquotedValue\n || '';\n\n attrs[name] = decodeEntities(value);\n });\n if (handler.start) handler.start(tagName, attrs, unary);\n }\n\n function parseEndTag(tag, tagName) {\n var pos = 0, i;\n tagName = angular.lowercase(tagName);\n if (tagName) {\n // Find the closest opened tag of the same type\n for (pos = stack.length - 1; pos >= 0; pos--) {\n if (stack[pos] == tagName) break;\n }\n }\n\n if (pos >= 0) {\n // Close all the open elements, up the stack\n for (i = stack.length - 1; i >= pos; i--)\n if (handler.end) handler.end(stack[i]);\n\n // Remove the open elements from the stack\n stack.length = pos;\n }\n }\n}\n\nvar hiddenPre=document.createElement(\"pre\");\n/**\n * decodes all entities into regular string\n * @param value\n * @returns {string} A string with decoded entities.\n */\nfunction decodeEntities(value) {\n if (!value) { return ''; }\n\n hiddenPre.innerHTML = value.replace(/</g,\"&lt;\");\n // innerText depends on styling as it doesn't display hidden elements.\n // Therefore, it's better to use textContent not to cause unnecessary reflows.\n return hiddenPre.textContent;\n}\n\n/**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n * @returns {string} escaped text\n */\nfunction encodeEntities(value) {\n return value.\n replace(/&/g, '&amp;').\n replace(SURROGATE_PAIR_REGEXP, function(value) {\n var hi = value.charCodeAt(0);\n var low = value.charCodeAt(1);\n return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\n }).\n replace(NON_ALPHANUMERIC_REGEXP, function(value) {\n return '&#' + value.charCodeAt(0) + ';';\n }).\n replace(/</g, '&lt;').\n replace(/>/g, '&gt;');\n}\n\n/**\n * create an HTML/XML writer which writes to buffer\n * @param {Array} buf use buf.jain('') to get out sanitized html string\n * @returns {object} in the form of {\n * start: function(tag, attrs, unary) {},\n * end: function(tag) {},\n * chars: function(text) {},\n * comment: function(text) {}\n * }\n */\nfunction htmlSanitizeWriter(buf, uriValidator) {\n var ignore = false;\n var out = angular.bind(buf, buf.push);\n return {\n start: function(tag, attrs, unary) {\n tag = angular.lowercase(tag);\n if (!ignore && specialElements[tag]) {\n ignore = tag;\n }\n if (!ignore && validElements[tag] === true) {\n out('<');\n out(tag);\n angular.forEach(attrs, function(value, key) {\n var lkey=angular.lowercase(key);\n var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background');\n if (validAttrs[lkey] === true &&\n (uriAttrs[lkey] !== true || uriValidator(value, isImage))) {\n out(' ');\n out(key);\n out('=\"');\n out(encodeEntities(value));\n out('\"');\n }\n });\n out(unary ? '/>' : '>');\n }\n },\n end: function(tag) {\n tag = angular.lowercase(tag);\n if (!ignore && validElements[tag] === true) {\n out('</');\n out(tag);\n out('>');\n }\n if (tag == ignore) {\n ignore = false;\n }\n },\n chars: function(chars) {\n if (!ignore) {\n out(encodeEntities(chars));\n }\n }\n };\n}\n\n\n// define ngSanitize module and register $sanitize service\nangular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider);\n\n/* global sanitizeText: false */\n\n/**\n * @ngdoc filter\n * @name linky\n * @kind function\n *\n * @description\n * Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and\n * plain email address links.\n *\n * Requires the {@link ngSanitize `ngSanitize`} module to be installed.\n *\n * @param {string} text Input text.\n * @param {string} target Window (_blank|_self|_parent|_top) or named frame to open links in.\n * @returns {string} Html-linkified text.\n *\n * @usage\n <span ng-bind-html=\"linky_expression | linky\"></span>\n *\n * @example\n <example module=\"linkyExample\" deps=\"angular-sanitize.js\">\n <file name=\"index.html\">\n <script>\n angular.module('linkyExample', ['ngSanitize'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.snippet =\n 'Pretty text with some links:\\n'+\n 'http://angularjs.org/,\\n'+\n 'mailto:us@somewhere.org,\\n'+\n 'another@somewhere.org,\\n'+\n 'and one more: ftp://127.0.0.1/.';\n $scope.snippetWithTarget = 'http://angularjs.org/';\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n Snippet: <textarea ng-model=\"snippet\" cols=\"60\" rows=\"3\"></textarea>\n <table>\n <tr>\n <td>Filter</td>\n <td>Source</td>\n <td>Rendered</td>\n </tr>\n <tr id=\"linky-filter\">\n <td>linky filter</td>\n <td>\n <pre>&lt;div ng-bind-html=\"snippet | linky\"&gt;<br>&lt;/div&gt;</pre>\n </td>\n <td>\n <div ng-bind-html=\"snippet | linky\"></div>\n </td>\n </tr>\n <tr id=\"linky-target\">\n <td>linky target</td>\n <td>\n <pre>&lt;div ng-bind-html=\"snippetWithTarget | linky:'_blank'\"&gt;<br>&lt;/div&gt;</pre>\n </td>\n <td>\n <div ng-bind-html=\"snippetWithTarget | linky:'_blank'\"></div>\n </td>\n </tr>\n <tr id=\"escaped-html\">\n <td>no filter</td>\n <td><pre>&lt;div ng-bind=\"snippet\"&gt;<br>&lt;/div&gt;</pre></td>\n <td><div ng-bind=\"snippet\"></div></td>\n </tr>\n </table>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should linkify the snippet with urls', function() {\n expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).\n toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' +\n 'another@somewhere.org, and one more: ftp://127.0.0.1/.');\n expect(element.all(by.css('#linky-filter a')).count()).toEqual(4);\n });\n\n it('should not linkify snippet without the linky filter', function() {\n expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()).\n toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' +\n 'another@somewhere.org, and one more: ftp://127.0.0.1/.');\n expect(element.all(by.css('#escaped-html a')).count()).toEqual(0);\n });\n\n it('should update', function() {\n element(by.model('snippet')).clear();\n element(by.model('snippet')).sendKeys('new http://link.');\n expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).\n toBe('new http://link.');\n expect(element.all(by.css('#linky-filter a')).count()).toEqual(1);\n expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText())\n .toBe('new http://link.');\n });\n\n it('should work with the target property', function() {\n expect(element(by.id('linky-target')).\n element(by.binding(\"snippetWithTarget | linky:'_blank'\")).getText()).\n toBe('http://angularjs.org/');\n expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank');\n });\n </file>\n </example>\n */\nangular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) {\n var LINKY_URL_REGEXP =\n /((ftp|https?):\\/\\/|(www\\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\\S*[^\\s.;,(){}<>\"\\u201d\\u2019]/i,\n MAILTO_REGEXP = /^mailto:/i;\n\n return function(text, target) {\n if (!text) return text;\n var match;\n var raw = text;\n var html = [];\n var url;\n var i;\n while ((match = raw.match(LINKY_URL_REGEXP))) {\n // We can not end in these as they are sometimes found at the end of the sentence\n url = match[0];\n // if we did not match ftp/http/www/mailto then assume mailto\n if (!match[2] && !match[4]) {\n url = (match[3] ? 'http://' : 'mailto:') + url;\n }\n i = match.index;\n addText(raw.substr(0, i));\n addLink(url, match[0].replace(MAILTO_REGEXP, ''));\n raw = raw.substring(i + match[0].length);\n }\n addText(raw);\n return $sanitize(html.join(''));\n\n function addText(text) {\n if (!text) {\n return;\n }\n html.push(sanitizeText(text));\n }\n\n function addLink(url, text) {\n html.push('<a ');\n if (angular.isDefined(target)) {\n html.push('target=\"',\n target,\n '\" ');\n }\n html.push('href=\"',\n url.replace(/\"/g, '&quot;'),\n '\">');\n addText(text);\n html.push('</a>');\n }\n };\n}]);\n\n\n})(window, window.angular);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/angular-sanitize/angular-sanitize.js\n// module id = 7\n// module chunks = 0","require('./angular-touch');\nmodule.exports = 'ngTouch';\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/angular-touch/index.js\n// module id = 8\n// module chunks = 0","/**\n * @license AngularJS v1.4.14\n * (c) 2010-2015 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\n/**\n * @ngdoc module\n * @name ngTouch\n * @description\n *\n * # ngTouch\n *\n * The `ngTouch` module provides touch events and other helpers for touch-enabled devices.\n * The implementation is based on jQuery Mobile touch event handling\n * ([jquerymobile.com](http://jquerymobile.com/)).\n *\n *\n * See {@link ngTouch.$swipe `$swipe`} for usage.\n *\n * <div doc-module-components=\"ngTouch\"></div>\n *\n */\n\n// define ngTouch module\n/* global -ngTouch */\nvar ngTouch = angular.module('ngTouch', []);\n\nfunction nodeName_(element) {\n return angular.lowercase(element.nodeName || (element[0] && element[0].nodeName));\n}\n\n/* global ngTouch: false */\n\n /**\n * @ngdoc service\n * @name $swipe\n *\n * @description\n * The `$swipe` service is a service that abstracts the messier details of hold-and-drag swipe\n * behavior, to make implementing swipe-related directives more convenient.\n *\n * Requires the {@link ngTouch `ngTouch`} module to be installed.\n *\n * `$swipe` is used by the `ngSwipeLeft` and `ngSwipeRight` directives in `ngTouch`.\n *\n * # Usage\n * The `$swipe` service is an object with a single method: `bind`. `bind` takes an element\n * which is to be watched for swipes, and an object with four handler functions. See the\n * documentation for `bind` below.\n */\n\nngTouch.factory('$swipe', [function() {\n // The total distance in any direction before we make the call on swipe vs. scroll.\n var MOVE_BUFFER_RADIUS = 10;\n\n var POINTER_EVENTS = {\n 'mouse': {\n start: 'mousedown',\n move: 'mousemove',\n end: 'mouseup'\n },\n 'touch': {\n start: 'touchstart',\n move: 'touchmove',\n end: 'touchend',\n cancel: 'touchcancel'\n }\n };\n\n function getCoordinates(event) {\n var originalEvent = event.originalEvent || event;\n var touches = originalEvent.touches && originalEvent.touches.length ? originalEvent.touches : [originalEvent];\n var e = (originalEvent.changedTouches && originalEvent.changedTouches[0]) || touches[0];\n\n return {\n x: e.clientX,\n y: e.clientY\n };\n }\n\n function getEvents(pointerTypes, eventType) {\n var res = [];\n angular.forEach(pointerTypes, function(pointerType) {\n var eventName = POINTER_EVENTS[pointerType][eventType];\n if (eventName) {\n res.push(eventName);\n }\n });\n return res.join(' ');\n }\n\n return {\n /**\n * @ngdoc method\n * @name $swipe#bind\n *\n * @description\n * The main method of `$swipe`. It takes an element to be watched for swipe motions, and an\n * object containing event handlers.\n * The pointer types that should be used can be specified via the optional\n * third argument, which is an array of strings `'mouse'` and `'touch'`. By default,\n * `$swipe` will listen for `mouse` and `touch` events.\n *\n * The four events are `start`, `move`, `end`, and `cancel`. `start`, `move`, and `end`\n * receive as a parameter a coordinates object of the form `{ x: 150, y: 310 }` and the raw\n * `event`. `cancel` receives the raw `event` as its single parameter.\n *\n * `start` is called on either `mousedown` or `touchstart`. After this event, `$swipe` is\n * watching for `touchmove` or `mousemove` events. These events are ignored until the total\n * distance moved in either dimension exceeds a small threshold.\n *\n * Once this threshold is exceeded, either the horizontal or vertical delta is greater.\n * - If the horizontal distance is greater, this is a swipe and `move` and `end` events follow.\n * - If the vertical distance is greater, this is a scroll, and we let the browser take over.\n * A `cancel` event is sent.\n *\n * `move` is called on `mousemove` and `touchmove` after the above logic has determined that\n * a swipe is in progress.\n *\n * `end` is called when a swipe is successfully completed with a `touchend` or `mouseup`.\n *\n * `cancel` is called either on a `touchcancel` from the browser, or when we begin scrolling\n * as described above.\n *\n */\n bind: function(element, eventHandlers, pointerTypes) {\n // Absolute total movement, used to control swipe vs. scroll.\n var totalX, totalY;\n // Coordinates of the start position.\n var startCoords;\n // Last event's position.\n var lastPos;\n // Whether a swipe is active.\n var active = false;\n\n pointerTypes = pointerTypes || ['mouse', 'touch'];\n element.on(getEvents(pointerTypes, 'start'), function(event) {\n startCoords = getCoordinates(event);\n active = true;\n totalX = 0;\n totalY = 0;\n lastPos = startCoords;\n eventHandlers['start'] && eventHandlers['start'](startCoords, event);\n });\n var events = getEvents(pointerTypes, 'cancel');\n if (events) {\n element.on(events, function(event) {\n active = false;\n eventHandlers['cancel'] && eventHandlers['cancel'](event);\n });\n }\n\n element.on(getEvents(pointerTypes, 'move'), function(event) {\n if (!active) return;\n\n // Android will send a touchcancel if it thinks we're starting to scroll.\n // So when the total distance (+ or - or both) exceeds 10px in either direction,\n // we either:\n // - On totalX > totalY, we send preventDefault() and treat this as a swipe.\n // - On totalY > totalX, we let the browser handle it as a scroll.\n\n if (!startCoords) return;\n var coords = getCoordinates(event);\n\n totalX += Math.abs(coords.x - lastPos.x);\n totalY += Math.abs(coords.y - lastPos.y);\n\n lastPos = coords;\n\n if (totalX < MOVE_BUFFER_RADIUS && totalY < MOVE_BUFFER_RADIUS) {\n return;\n }\n\n // One of totalX or totalY has exceeded the buffer, so decide on swipe vs. scroll.\n if (totalY > totalX) {\n // Allow native scrolling to take over.\n active = false;\n eventHandlers['cancel'] && eventHandlers['cancel'](event);\n return;\n } else {\n // Prevent the browser from scrolling.\n event.preventDefault();\n eventHandlers['move'] && eventHandlers['move'](coords, event);\n }\n });\n\n element.on(getEvents(pointerTypes, 'end'), function(event) {\n if (!active) return;\n active = false;\n eventHandlers['end'] && eventHandlers['end'](getCoordinates(event), event);\n });\n }\n };\n}]);\n\n/* global ngTouch: false,\n nodeName_: false\n*/\n\n/**\n * @ngdoc directive\n * @name ngClick\n *\n * @description\n * A more powerful replacement for the default ngClick designed to be used on touchscreen\n * devices. Most mobile browsers wait about 300ms after a tap-and-release before sending\n * the click event. This version handles them immediately, and then prevents the\n * following click event from propagating.\n *\n * Requires the {@link ngTouch `ngTouch`} module to be installed.\n *\n * This directive can fall back to using an ordinary click event, and so works on desktop\n * browsers as well as mobile.\n *\n * This directive also sets the CSS class `ng-click-active` while the element is being held\n * down (by a mouse click or touch) so you can restyle the depressed element if you wish.\n *\n * @element ANY\n * @param {expression} ngClick {@link guide/expression Expression} to evaluate\n * upon tap. (Event object is available as `$event`)\n *\n * @example\n <example module=\"ngClickExample\" deps=\"angular-touch.js\">\n <file name=\"index.html\">\n <button ng-click=\"count = count + 1\" ng-init=\"count=0\">\n Increment\n </button>\n count: {{ count }}\n </file>\n <file name=\"script.js\">\n angular.module('ngClickExample', ['ngTouch']);\n </file>\n </example>\n */\n\nngTouch.config(['$provide', function($provide) {\n $provide.decorator('ngClickDirective', ['$delegate', function($delegate) {\n // drop the default ngClick directive\n $delegate.shift();\n return $delegate;\n }]);\n}]);\n\nngTouch.directive('ngClick', ['$parse', '$timeout', '$rootElement',\n function($parse, $timeout, $rootElement) {\n var TAP_DURATION = 750; // Shorter than 750ms is a tap, longer is a taphold or drag.\n var MOVE_TOLERANCE = 12; // 12px seems to work in most mobile browsers.\n var PREVENT_DURATION = 2500; // 2.5 seconds maximum from preventGhostClick call to click\n var CLICKBUSTER_THRESHOLD = 25; // 25 pixels in any dimension is the limit for busting clicks.\n\n var ACTIVE_CLASS_NAME = 'ng-click-active';\n var lastPreventedTime;\n var touchCoordinates;\n var lastLabelClickCoordinates;\n\n\n // TAP EVENTS AND GHOST CLICKS\n //\n // Why tap events?\n // Mobile browsers detect a tap, then wait a moment (usually ~300ms) to see if you're\n // double-tapping, and then fire a click event.\n //\n // This delay sucks and makes mobile apps feel unresponsive.\n // So we detect touchstart, touchcancel and touchend ourselves and determine when\n // the user has tapped on something.\n //\n // What happens when the browser then generates a click event?\n // The browser, of course, also detects the tap and fires a click after a delay. This results in\n // tapping/clicking twice. We do \"clickbusting\" to prevent it.\n //\n // How does it work?\n // We attach global touchstart and click handlers, that run during the capture (early) phase.\n // So the sequence for a tap is:\n // - global touchstart: Sets an \"allowable region\" at the point touched.\n // - element's touchstart: Starts a touch\n // (- touchcancel ends the touch, no click follows)\n // - element's touchend: Determines if the tap is valid (didn't move too far away, didn't hold\n // too long) and fires the user's tap handler. The touchend also calls preventGhostClick().\n // - preventGhostClick() removes the allowable region the global touchstart created.\n // - The browser generates a click event.\n // - The global click handler catches the click, and checks whether it was in an allowable region.\n // - If preventGhostClick was called, the region will have been removed, the click is busted.\n // - If the region is still there, the click proceeds normally. Therefore clicks on links and\n // other elements without ngTap on them work normally.\n //\n // This is an ugly, terrible hack!\n // Yeah, tell me about it. The alternatives are using the slow click events, or making our users\n // deal with the ghost clicks, so I consider this the least of evils. Fortunately Angular\n // encapsulates this ugly logic away from the user.\n //\n // Why not just put click handlers on the element?\n // We do that too, just to be sure. If the tap event caused the DOM to change,\n // it is possible another element is now in that position. To take account for these possibly\n // distinct elements, the handlers are global and care only about coordinates.\n\n // Checks if the coordinates are close enough to be within the region.\n function hit(x1, y1, x2, y2) {\n return Math.abs(x1 - x2) < CLICKBUSTER_THRESHOLD && Math.abs(y1 - y2) < CLICKBUSTER_THRESHOLD;\n }\n\n // Checks a list of allowable regions against a click location.\n // Returns true if the click should be allowed.\n // Splices out the allowable region from the list after it has been used.\n function checkAllowableRegions(touchCoordinates, x, y) {\n for (var i = 0; i < touchCoordinates.length; i += 2) {\n if (hit(touchCoordinates[i], touchCoordinates[i + 1], x, y)) {\n touchCoordinates.splice(i, i + 2);\n return true; // allowable region\n }\n }\n return false; // No allowable region; bust it.\n }\n\n // Global click handler that prevents the click if it's in a bustable zone and preventGhostClick\n // was called recently.\n function onClick(event) {\n if (Date.now() - lastPreventedTime > PREVENT_DURATION) {\n return; // Too old.\n }\n\n var touches = event.touches && event.touches.length ? event.touches : [event];\n var x = touches[0].clientX;\n var y = touches[0].clientY;\n // Work around desktop Webkit quirk where clicking a label will fire two clicks (on the label\n // and on the input element). Depending on the exact browser, this second click we don't want\n // to bust has either (0,0), negative coordinates, or coordinates equal to triggering label\n // click event\n if (x < 1 && y < 1) {\n return; // offscreen\n }\n if (lastLabelClickCoordinates &&\n lastLabelClickCoordinates[0] === x && lastLabelClickCoordinates[1] === y) {\n return; // input click triggered by label click\n }\n // reset label click coordinates on first subsequent click\n if (lastLabelClickCoordinates) {\n lastLabelClickCoordinates = null;\n }\n // remember label click coordinates to prevent click busting of trigger click event on input\n if (nodeName_(event.target) === 'label') {\n lastLabelClickCoordinates = [x, y];\n }\n\n // Look for an allowable region containing this click.\n // If we find one, that means it was created by touchstart and not removed by\n // preventGhostClick, so we don't bust it.\n if (checkAllowableRegions(touchCoordinates, x, y)) {\n return;\n }\n\n // If we didn't find an allowable region, bust the click.\n event.stopPropagation();\n event.preventDefault();\n\n // Blur focused form elements\n event.target && event.target.blur && event.target.blur();\n }\n\n\n // Global touchstart handler that creates an allowable region for a click event.\n // This allowable region can be removed by preventGhostClick if we want to bust it.\n function onTouchStart(event) {\n var touches = event.touches && event.touches.length ? event.touches : [event];\n var x = touches[0].clientX;\n var y = touches[0].clientY;\n touchCoordinates.push(x, y);\n\n $timeout(function() {\n // Remove the allowable region.\n for (var i = 0; i < touchCoordinates.length; i += 2) {\n if (touchCoordinates[i] == x && touchCoordinates[i + 1] == y) {\n touchCoordinates.splice(i, i + 2);\n return;\n }\n }\n }, PREVENT_DURATION, false);\n }\n\n // On the first call, attaches some event handlers. Then whenever it gets called, it creates a\n // zone around the touchstart where clicks will get busted.\n function preventGhostClick(x, y) {\n if (!touchCoordinates) {\n $rootElement[0].addEventListener('click', onClick, true);\n $rootElement[0].addEventListener('touchstart', onTouchStart, true);\n touchCoordinates = [];\n }\n\n lastPreventedTime = Date.now();\n\n checkAllowableRegions(touchCoordinates, x, y);\n }\n\n // Actual linking function.\n return function(scope, element, attr) {\n var clickHandler = $parse(attr.ngClick),\n tapping = false,\n tapElement, // Used to blur the element after a tap.\n startTime, // Used to check if the tap was held too long.\n touchStartX,\n touchStartY;\n\n function resetState() {\n tapping = false;\n element.removeClass(ACTIVE_CLASS_NAME);\n }\n\n element.on('touchstart', function(event) {\n tapping = true;\n tapElement = event.target ? event.target : event.srcElement; // IE uses srcElement.\n // Hack for Safari, which can target text nodes instead of containers.\n if (tapElement.nodeType == 3) {\n tapElement = tapElement.parentNode;\n }\n\n element.addClass(ACTIVE_CLASS_NAME);\n\n startTime = Date.now();\n\n // Use jQuery originalEvent\n var originalEvent = event.originalEvent || event;\n var touches = originalEvent.touches && originalEvent.touches.length ? originalEvent.touches : [originalEvent];\n var e = touches[0];\n touchStartX = e.clientX;\n touchStartY = e.clientY;\n });\n\n element.on('touchcancel', function(event) {\n resetState();\n });\n\n element.on('touchend', function(event) {\n var diff = Date.now() - startTime;\n\n // Use jQuery originalEvent\n var originalEvent = event.originalEvent || event;\n var touches = (originalEvent.changedTouches && originalEvent.changedTouches.length) ?\n originalEvent.changedTouches :\n ((originalEvent.touches && originalEvent.touches.length) ? originalEvent.touches : [originalEvent]);\n var e = touches[0];\n var x = e.clientX;\n var y = e.clientY;\n var dist = Math.sqrt(Math.pow(x - touchStartX, 2) + Math.pow(y - touchStartY, 2));\n\n if (tapping && diff < TAP_DURATION && dist < MOVE_TOLERANCE) {\n // Call preventGhostClick so the clickbuster will catch the corresponding click.\n preventGhostClick(x, y);\n\n // Blur the focused element (the button, probably) before firing the callback.\n // This doesn't work perfectly on Android Chrome, but seems to work elsewhere.\n // I couldn't get anything to work reliably on Android Chrome.\n if (tapElement) {\n tapElement.blur();\n }\n\n if (!angular.isDefined(attr.disabled) || attr.disabled === false) {\n element.triggerHandler('click', [event]);\n }\n }\n\n resetState();\n });\n\n // Hack for iOS Safari's benefit. It goes searching for onclick handlers and is liable to click\n // something else nearby.\n element.onclick = function(event) { };\n\n // Actual click handler.\n // There are three different kinds of clicks, only two of which reach this point.\n // - On desktop browsers without touch events, their clicks will always come here.\n // - On mobile browsers, the simulated \"fast\" click will call this.\n // - But the browser's follow-up slow click will be \"busted\" before it reaches this handler.\n // Therefore it's safe to use this directive on both mobile and desktop.\n element.on('click', function(event, touchend) {\n scope.$apply(function() {\n clickHandler(scope, {$event: (touchend || event)});\n });\n });\n\n element.on('mousedown', function(event) {\n element.addClass(ACTIVE_CLASS_NAME);\n });\n\n element.on('mousemove mouseup', function(event) {\n element.removeClass(ACTIVE_CLASS_NAME);\n });\n\n };\n}]);\n\n/* global ngTouch: false */\n\n/**\n * @ngdoc directive\n * @name ngSwipeLeft\n *\n * @description\n * Specify custom behavior when an element is swiped to the left on a touchscreen device.\n * A leftward swipe is a quick, right-to-left slide of the finger.\n * Though ngSwipeLeft is designed for touch-based devices, it will work with a mouse click and drag\n * too.\n *\n * To disable the mouse click and drag functionality, add `ng-swipe-disable-mouse` to\n * the `ng-swipe-left` or `ng-swipe-right` DOM Element.\n *\n * Requires the {@link ngTouch `ngTouch`} module to be installed.\n *\n * @element ANY\n * @param {expression} ngSwipeLeft {@link guide/expression Expression} to evaluate\n * upon left swipe. (Event object is available as `$event`)\n *\n * @example\n <example module=\"ngSwipeLeftExample\" deps=\"angular-touch.js\">\n <file name=\"index.html\">\n <div ng-show=\"!showActions\" ng-swipe-left=\"showActions = true\">\n Some list content, like an email in the inbox\n </div>\n <div ng-show=\"showActions\" ng-swipe-right=\"showActions = false\">\n <button ng-click=\"reply()\">Reply</button>\n <button ng-click=\"delete()\">Delete</button>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('ngSwipeLeftExample', ['ngTouch']);\n </file>\n </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngSwipeRight\n *\n * @description\n * Specify custom behavior when an element is swiped to the right on a touchscreen device.\n * A rightward swipe is a quick, left-to-right slide of the finger.\n * Though ngSwipeRight is designed for touch-based devices, it will work with a mouse click and drag\n * too.\n *\n * Requires the {@link ngTouch `ngTouch`} module to be installed.\n *\n * @element ANY\n * @param {expression} ngSwipeRight {@link guide/expression Expression} to evaluate\n * upon right swipe. (Event object is available as `$event`)\n *\n * @example\n <example module=\"ngSwipeRightExample\" deps=\"angular-touch.js\">\n <file name=\"index.html\">\n <div ng-show=\"!showActions\" ng-swipe-left=\"showActions = true\">\n Some list content, like an email in the inbox\n </div>\n <div ng-show=\"showActions\" ng-swipe-right=\"showActions = false\">\n <button ng-click=\"reply()\">Reply</button>\n <button ng-click=\"delete()\">Delete</button>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('ngSwipeRightExample', ['ngTouch']);\n </file>\n </example>\n */\n\nfunction makeSwipeDirective(directiveName, direction, eventName) {\n ngTouch.directive(directiveName, ['$parse', '$swipe', function($parse, $swipe) {\n // The maximum vertical delta for a swipe should be less than 75px.\n var MAX_VERTICAL_DISTANCE = 75;\n // Vertical distance should not be more than a fraction of the horizontal distance.\n var MAX_VERTICAL_RATIO = 0.3;\n // At least a 30px lateral motion is necessary for a swipe.\n var MIN_HORIZONTAL_DISTANCE = 30;\n\n return function(scope, element, attr) {\n var swipeHandler = $parse(attr[directiveName]);\n\n var startCoords, valid;\n\n function validSwipe(coords) {\n // Check that it's within the coordinates.\n // Absolute vertical distance must be within tolerances.\n // Horizontal distance, we take the current X - the starting X.\n // This is negative for leftward swipes and positive for rightward swipes.\n // After multiplying by the direction (-1 for left, +1 for right), legal swipes\n // (ie. same direction as the directive wants) will have a positive delta and\n // illegal ones a negative delta.\n // Therefore this delta must be positive, and larger than the minimum.\n if (!startCoords) return false;\n var deltaY = Math.abs(coords.y - startCoords.y);\n var deltaX = (coords.x - startCoords.x) * direction;\n return valid && // Short circuit for already-invalidated swipes.\n deltaY < MAX_VERTICAL_DISTANCE &&\n deltaX > 0 &&\n deltaX > MIN_HORIZONTAL_DISTANCE &&\n deltaY / deltaX < MAX_VERTICAL_RATIO;\n }\n\n var pointerTypes = ['touch'];\n if (!angular.isDefined(attr['ngSwipeDisableMouse'])) {\n pointerTypes.push('mouse');\n }\n $swipe.bind(element, {\n 'start': function(coords, event) {\n startCoords = coords;\n valid = true;\n },\n 'cancel': function(event) {\n valid = false;\n },\n 'end': function(coords, event) {\n if (validSwipe(coords)) {\n scope.$apply(function() {\n element.triggerHandler(eventName);\n swipeHandler(scope, {$event: event});\n });\n }\n }\n }, pointerTypes);\n };\n }]);\n}\n\n// Left is negative X-coordinate, right is positive.\nmakeSwipeDirective('ngSwipeLeft', -1, 'swipeleft');\nmakeSwipeDirective('ngSwipeRight', 1, 'swiperight');\n\n\n\n})(window, window.angular);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/angular-touch/angular-touch.js\n// module id = 9\n// module chunks = 0","var angular = require('../angular');\n\nangular\n .module(\"bsDisconnect\", [])\n .directive(\"disconnectElem\", function () {\n return {\n restrict: \"E\",\n scope: {},\n template: '<section bs-overlay ng-class=\"{\\'active\\': ui.visible}\">\\n <p><icon icon=\"block\"></icon></p>\\n <h1>{{ui.heading}} {{ui.message}}</h1>\\n <p>Possible reasons are:</p>\\n <ul bs-list>\\n <li>1. Your process was exited by another tool</li>\\n </ul>\\n <p>You should check your terminal window to see what happened. <br/>(Or simply try reloading this page.)</p>\\n</section>', // jshint:ignore\n controller: [\"$scope\", \"$rootScope\", \"$window\", disconnectController]\n };\n });\n\n/**\n * Disconnect\n * @param $scope\n * @param $rootScope\n * @param $window\n */\nfunction disconnectController($scope, $rootScope, $window) {\n\n /**\n * Default settings\n */\n const DEFAULT_HEADING = \"Browsersync\";\n const DEFAULT_MESSAGE = \"Disconnected\";\n\n $scope._disconnected = false;\n\n /**\n * Default state\n * @type {{visible: boolean, status: string, heading: string, text: string}}\n */\n $scope.ui = {\n visible: false,\n heading: DEFAULT_HEADING,\n message: DEFAULT_MESSAGE\n };\n\n /**\n * @type {{connection: Function, disconnect: Function}}\n */\n $scope.socketEvents = {\n connection: function () {\n if ($scope._disconnected) {\n $window.location.reload(true);\n }\n $scope.ui.visible = false;\n $scope.$digest();\n },\n disconnect: function () {\n $scope._disconnected = true;\n $scope.ui.visible = true;\n $scope.$digest();\n }\n };\n\n $rootScope.$on(\"ui:connection\", $scope.socketEvents.connection);\n $rootScope.$on(\"ui:disconnect\", $scope.socketEvents.disconnect);\n}\n\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./modules/bsDisconnect.js\n// module id = 10\n// module chunks = 0","/**\n * @type {angular}\n */\nmodule.exports = window.angular;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./angular.js\n// module id = 11\n// module chunks = 0","var angular = require('../angular');\n\nangular\n .module('bsNotify', [])\n .directive(\"notifyElem\", function () {\n return {\n restrict: \"E\",\n scope: {},\n template: \"<div bs-notify ng-class=\\\"{\\'active\\': ui.visible}\\\">\\n <p class=\\\"notification__text\\\">{{ui.heading}} <span class=\\\"color--lime\\\">{{ui.message}}</span></p>\\n</div>\",\n controller: [\"$scope\", \"$rootScope\", notifyController]\n };\n });\n\n/**\n * Notify\n * @param $scope\n * @param $rootScope\n */\nfunction notifyController($scope, $rootScope) {\n\n /**\n * Default settings\n */\n var DEFAULT_STATUS = \"info\";\n var DEFAULT_HEADING = \"Browsersync:\";\n var DEFAULT_MESSAGE = \"Welcome to Browsersync\";\n var DEFAULT_TIMEOUT = 2000;\n\n /**\n * Default state\n * @type {{visible: boolean, status: string, heading: string, text: string}}\n */\n $scope.ui = {\n status: DEFAULT_STATUS,\n heading: DEFAULT_HEADING,\n message: DEFAULT_MESSAGE\n };\n\n /**\n * @param evt\n * @param data\n */\n $scope.show = function (evt, data) {\n\n data = data || {};\n\n /**\n *\n * Clear any previous timers\n *\n */\n if ($scope._timer) {\n clearTimeout($scope._timer);\n }\n\n /**\n *\n * Set a reset timer\n *\n */\n $scope._timer = window.setTimeout($scope.reset, data.timeout || DEFAULT_TIMEOUT);\n\n /**\n *\n * Set UI flags\n *\n */\n $scope.ui.visible = true;\n $scope.ui.status = data.status || DEFAULT_STATUS;\n $scope.ui.heading = data.heading || DEFAULT_HEADING;\n $scope.ui.message = data.message || DEFAULT_HEADING;\n };\n\n /**\n * Reset the UI\n */\n $scope.reset = function () {\n $scope.ui.visible = false;\n $scope.$digest();\n };\n\n /**\n * Listen to events on the $rootScope\n */\n $rootScope.$on(\"notify:flash\", $scope.show);\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./modules/bsNotify.js\n// module id = 12\n// module chunks = 0","var angular = require('../angular');\n\nangular\n .module(\"bsHistory\", [\"bsSocket\"])\n .service(\"History\", [\"Socket\", HistoryService]);\n\nfunction HistoryService(Socket) {\n\n var visited = [];\n var updateStack = [];\n\n /**\n * Add a single socket event and call all callbacks listening to it.\n */\n Socket.on(\"ui:history:update\", function (items) {\n updateStack.forEach(function (fn) {\n fn(items);\n });\n });\n\n return {\n visited: visited,\n updateHistory: function (urls) {\n visited = urls;\n },\n get: function () {\n return Socket.getData(\"visited\");\n },\n remove: function (data) {\n Socket.emit(\"ui\", {\n namespace: \"history\",\n event: \"remove\",\n data: data\n });\n },\n clear: function () {\n Socket.emit(\"ui\", {\n namespace: \"history\",\n event: \"clear\"\n });\n },\n on: function (event, fn) {\n updateStack.push(fn);\n },\n off: function (fn) {\n var index = updateStack.indexOf(fn);\n if (index > -1) {\n updateStack = updateStack.splice(index, 1);\n }\n }\n };\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./modules/bsHistory.js\n// module id = 13\n// module chunks = 0","var angular = require('../angular');\n\nangular\n .module(\"bsClients\", [\"bsSocket\"])\n .service(\"Clients\", [\"Socket\", ClientsService]);\n\n/**\n * @param Socket\n * @returns {{reloadAll: Function, sendAllTo: Function, scrollAllTo: Function, highlight: Function}}\n * @constructor\n */\nfunction ClientsService(Socket) {\n\n var api = {\n reloadAll: function () {\n Socket.clientEvent(\"browser:reload\");\n },\n sendAllTo: function (path) {\n Socket.emit(\"ui\", {\n namespace: \"history\",\n event: \"sendAllTo\",\n data: {\n path: path\n }\n });\n },\n scrollAllTo: function () {\n Socket.clientEvent(\"scroll\", {\n position: {\n raw: 0,\n proportional: 0\n },\n override: true\n });\n },\n highlight: function (connection) {\n Socket.emit(\"ui:highlight\", connection);\n }\n };\n\n return api;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./modules/bsClients.js\n// module id = 14\n// module chunks = 0","var angular = require('../angular');\nvar socket = require('socket.io-client');\nvar socketConfig = window.___browserSync___.socketConfig;\nvar socketUrl = window.___browserSync___.socketUrl;\nvar io = socket(socketUrl, socketConfig);\n\nangular\n .module(\"bsSocket\", [])\n .service(\"Socket\", [\"$q\", \"$rootScope\", SocketService]);\n\nfunction SocketService($q, $rootScope) {\n\n var deferred = $q.defer();\n var session;\n\n io.on(\"connection\", function (out) {\n session = out.session;\n $rootScope.$emit(\"ui:connection\", out);\n\n deferred.resolve(out, this);\n\n if (window.name === '') {\n window.name = JSON.stringify({id: socket.id});\n } else {\n var prev = JSON.parse(window.name);\n //console.log(prev, socket);\n if (prev.id !== socket.id) {\n //console.log('new session');\n } else {\n //console.log('page reload');\n }\n //console.log(JSON.parse(window.name));\n }\n });\n\n io.on(\"disconnect\", function () {\n $rootScope.$emit(\"ui:disconnect\");\n });\n\n var publicApi = {\n on: function (name, callback) {\n io.on(name, callback);\n },\n off: function (name, callback) {\n io.off(name, callback);\n },\n removeEvent: function (name, callback) {\n io.removeListener(name, callback);\n },\n emit: function (name, data) {\n io.emit(name, data || {});\n },\n /**\n * Proxy client events\n * @param name\n * @param data\n */\n clientEvent: function (name, data) {\n io.emit(\"ui:client:proxy\", {\n event: name,\n data: data\n });\n },\n options: function () {\n return deferred.promise;\n },\n getData: function (name) {\n var deferred = $q.defer();\n io.on(\"ui:receive:\" + name, function (data) {\n deferred.resolve(data);\n });\n io.emit(\"ui:get:\" + name);\n return deferred.promise;\n },\n uiEvent: function (evt) {\n io.emit(\"ui\", evt);\n },\n newSession: function () {\n\n }\n };\n\n Object.defineProperty(publicApi, 'sessionId', {\n get: function () {\n return session\n }\n });\n\n return publicApi;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./modules/bsSocket.js\n// module id = 15\n// module chunks = 0","\n/**\n * Module dependencies.\n */\n\nvar url = require('./url');\nvar parser = require('socket.io-parser');\nvar Manager = require('./manager');\nvar debug = require('debug')('socket.io-client');\n\n/**\n * Module exports.\n */\n\nmodule.exports = exports = lookup;\n\n/**\n * Managers cache.\n */\n\nvar cache = exports.managers = {};\n\n/**\n * Looks up an existing `Manager` for multiplexing.\n * If the user summons:\n *\n * `io('http://localhost/a');`\n * `io('http://localhost/b');`\n *\n * We reuse the existing instance based on same scheme/port/host,\n * and we initialize sockets for each namespace.\n *\n * @api public\n */\n\nfunction lookup (uri, opts) {\n if (typeof uri === 'object') {\n opts = uri;\n uri = undefined;\n }\n\n opts = opts || {};\n\n var parsed = url(uri);\n var source = parsed.source;\n var id = parsed.id;\n var path = parsed.path;\n var sameNamespace = cache[id] && path in cache[id].nsps;\n var newConnection = opts.forceNew || opts['force new connection'] ||\n false === opts.multiplex || sameNamespace;\n\n var io;\n\n if (newConnection) {\n debug('ignoring socket cache for %s', source);\n io = Manager(source, opts);\n } else {\n if (!cache[id]) {\n debug('new io instance for %s', source);\n cache[id] = Manager(source, opts);\n }\n io = cache[id];\n }\n if (parsed.query && !opts.query) {\n opts.query = parsed.query;\n }\n return io.socket(parsed.path, opts);\n}\n\n/**\n * Protocol version.\n *\n * @api public\n */\n\nexports.protocol = parser.protocol;\n\n/**\n * `connect`.\n *\n * @param {String} uri\n * @api public\n */\n\nexports.connect = lookup;\n\n/**\n * Expose constructors for standalone build.\n *\n * @api public\n */\n\nexports.Manager = require('./manager');\nexports.Socket = require('./socket');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/socket.io-client/lib/index.js\n// module id = 16\n// module chunks = 0","\n/**\n * Module dependencies.\n */\n\nvar parseuri = require('parseuri');\nvar debug = require('debug')('socket.io-client:url');\n\n/**\n * Module exports.\n */\n\nmodule.exports = url;\n\n/**\n * URL parser.\n *\n * @param {String} url\n * @param {Object} An object meant to mimic window.location.\n * Defaults to window.location.\n * @api public\n */\n\nfunction url (uri, loc) {\n var obj = uri;\n\n // default to window.location\n loc = loc || global.location;\n if (null == uri) uri = loc.protocol + '//' + loc.host;\n\n // relative path support\n if ('string' === typeof uri) {\n if ('/' === uri.charAt(0)) {\n if ('/' === uri.charAt(1)) {\n uri = loc.protocol + uri;\n } else {\n uri = loc.host + uri;\n }\n }\n\n if (!/^(https?|wss?):\\/\\//.test(uri)) {\n debug('protocol-less url %s', uri);\n if ('undefined' !== typeof loc) {\n uri = loc.protocol + '//' + uri;\n } else {\n uri = 'https://' + uri;\n }\n }\n\n // parse\n debug('parse %s', uri);\n obj = parseuri(uri);\n }\n\n // make sure we treat `localhost:80` and `localhost` equally\n if (!obj.port) {\n if (/^(http|ws)$/.test(obj.protocol)) {\n obj.port = '80';\n } else if (/^(http|ws)s$/.test(obj.protocol)) {\n obj.port = '443';\n }\n }\n\n obj.path = obj.path || '/';\n\n var ipv6 = obj.host.indexOf(':') !== -1;\n var host = ipv6 ? '[' + obj.host + ']' : obj.host;\n\n // define unique id\n obj.id = obj.protocol + '://' + host + ':' + obj.port;\n // define href\n obj.href = obj.protocol + '://' + host + (loc && loc.port === obj.port ? '' : (':' + obj.port));\n\n return obj;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/socket.io-client/lib/url.js\n// module id = 17\n// module chunks = 0","/**\r\n * Parses an URI\r\n *\r\n * @author Steven Levithan <stevenlevithan.com> (MIT license)\r\n * @api private\r\n */\r\n\r\nvar re = /^(?:(?![^:@]+:[^:@\\/]*@)(http|https|ws|wss):\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/;\r\n\r\nvar parts = [\r\n 'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'\r\n];\r\n\r\nmodule.exports = function parseuri(str) {\r\n var src = str,\r\n b = str.indexOf('['),\r\n e = str.indexOf(']');\r\n\r\n if (b != -1 && e != -1) {\r\n str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length);\r\n }\r\n\r\n var m = re.exec(str || ''),\r\n uri = {},\r\n i = 14;\r\n\r\n while (i--) {\r\n uri[parts[i]] = m[i] || '';\r\n }\r\n\r\n if (b != -1 && e != -1) {\r\n uri.source = src;\r\n uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':');\r\n uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':');\r\n uri.ipv6uri = true;\r\n }\r\n\r\n return uri;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/socket.io-client/~/parseuri/index.js\n// module id = 18\n// module chunks = 0","/**\n * This is the web browser implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = require('./debug');\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = 'undefined' != typeof chrome\n && 'undefined' != typeof chrome.storage\n ? chrome.storage.local\n : localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n 'lightseagreen',\n 'forestgreen',\n 'goldenrod',\n 'dodgerblue',\n 'darkorchid',\n 'crimson'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\nfunction useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nexports.formatters.j = function(v) {\n try {\n return JSON.stringify(v);\n } catch (err) {\n return '[UnexpectedJSONParseError]: ' + err.message;\n }\n};\n\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return;\n\n var c = 'color: ' + this.color;\n args.splice(1, 0, c, 'color: inherit')\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-zA-Z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\nfunction log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console\n && console.log\n && Function.prototype.apply.call(console.log, console, arguments);\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n try {\n if (null == namespaces) {\n exports.storage.removeItem('debug');\n } else {\n exports.storage.debug = namespaces;\n }\n } catch(e) {}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n var r;\n try {\n r = exports.storage.debug;\n } catch(e) {}\n\n // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n if (!r && typeof process !== 'undefined' && 'env' in process) {\n r = process.env.DEBUG;\n }\n\n return r;\n}\n\n/**\n * Enable namespaces listed in `localStorage.debug` initially.\n */\n\nexports.enable(load());\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n try {\n return window.localStorage;\n } catch (e) {}\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/socket.io-client/~/debug/src/browser.js\n// module id = 19\n// module chunks = 0","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/process/browser.js\n// module id = 20\n// module chunks = 0","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = createDebug.debug = createDebug['default'] = createDebug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\nexports.humanize = require('ms');\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\nexports.formatters = {};\n\n/**\n * Previous log timestamp.\n */\n\nvar prevTime;\n\n/**\n * Select a color.\n * @param {String} namespace\n * @return {Number}\n * @api private\n */\n\nfunction selectColor(namespace) {\n var hash = 0, i;\n\n for (i in namespace) {\n hash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n\n return exports.colors[Math.abs(hash) % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction createDebug(namespace) {\n\n function debug() {\n // disabled?\n if (!debug.enabled) return;\n\n var self = debug;\n\n // set `diff` timestamp\n var curr = +new Date();\n var ms = curr - (prevTime || curr);\n self.diff = ms;\n self.prev = prevTime;\n self.curr = curr;\n prevTime = curr;\n\n // turn the `arguments` into a proper Array\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n args[0] = exports.coerce(args[0]);\n\n if ('string' !== typeof args[0]) {\n // anything else let's inspect with %O\n args.unshift('%O');\n }\n\n // apply any `formatters` transformations\n var index = 0;\n args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {\n // if we encounter an escaped % then don't increase the array index\n if (match === '%%') return match;\n index++;\n var formatter = exports.formatters[format];\n if ('function' === typeof formatter) {\n var val = args[index];\n match = formatter.call(self, val);\n\n // now we need to remove `args[index]` since it's inlined in the `format`\n args.splice(index, 1);\n index--;\n }\n return match;\n });\n\n // apply env-specific formatting (colors, etc.)\n exports.formatArgs.call(self, args);\n\n var logFn = debug.log || exports.log || console.log.bind(console);\n logFn.apply(self, args);\n }\n\n debug.namespace = namespace;\n debug.enabled = exports.enabled(namespace);\n debug.useColors = exports.useColors();\n debug.color = selectColor(namespace);\n\n // env-specific initialization logic for debug instances\n if ('function' === typeof exports.init) {\n exports.init(debug);\n }\n\n return debug;\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n exports.save(namespaces);\n\n exports.names = [];\n exports.skips = [];\n\n var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n var len = split.length;\n\n for (var i = 0; i < len; i++) {\n if (!split[i]) continue; // ignore empty strings\n namespaces = split[i].replace(/\\*/g, '.*?');\n if (namespaces[0] === '-') {\n exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n exports.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n var i, len;\n for (i = 0, len = exports.skips.length; i < len; i++) {\n if (exports.skips[i].test(name)) {\n return false;\n }\n }\n for (i = 0, len = exports.names.length; i < len; i++) {\n if (exports.names[i].test(name)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n if (val instanceof Error) return val.stack || val.message;\n return val;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/socket.io-client/~/debug/src/debug.js\n// module id = 21\n// module chunks = 0","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isNaN(val) === false) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n if (ms >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (ms >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (ms >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (ms >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n return plural(ms, d, 'day') ||\n plural(ms, h, 'hour') ||\n plural(ms, m, 'minute') ||\n plural(ms, s, 'second') ||\n ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, n, name) {\n if (ms < n) {\n return;\n }\n if (ms < n * 1.5) {\n return Math.floor(ms / n) + ' ' + name;\n }\n return Math.ceil(ms / n) + ' ' + name + 's';\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/socket.io-client/~/ms/index.js\n// module id = 22\n// module chunks = 0","\n/**\n * Module dependencies.\n */\n\nvar debug = require('debug')('socket.io-parser');\nvar Emitter = require('component-emitter');\nvar hasBin = require('has-binary2');\nvar binary = require('./binary');\nvar isBuf = require('./is-buffer');\n\n/**\n * Protocol version.\n *\n * @api public\n */\n\nexports.protocol = 4;\n\n/**\n * Packet types.\n *\n * @api public\n */\n\nexports.types = [\n 'CONNECT',\n 'DISCONNECT',\n 'EVENT',\n 'ACK',\n 'ERROR',\n 'BINARY_EVENT',\n 'BINARY_ACK'\n];\n\n/**\n * Packet type `connect`.\n *\n * @api public\n */\n\nexports.CONNECT = 0;\n\n/**\n * Packet type `disconnect`.\n *\n * @api public\n */\n\nexports.DISCONNECT = 1;\n\n/**\n * Packet type `event`.\n *\n * @api public\n */\n\nexports.EVENT = 2;\n\n/**\n * Packet type `ack`.\n *\n * @api public\n */\n\nexports.ACK = 3;\n\n/**\n * Packet type `error`.\n *\n * @api public\n */\n\nexports.ERROR = 4;\n\n/**\n * Packet type 'binary event'\n *\n * @api public\n */\n\nexports.BINARY_EVENT = 5;\n\n/**\n * Packet type `binary ack`. For acks with binary arguments.\n *\n * @api public\n */\n\nexports.BINARY_ACK = 6;\n\n/**\n * Encoder constructor.\n *\n * @api public\n */\n\nexports.Encoder = Encoder;\n\n/**\n * Decoder constructor.\n *\n * @api public\n */\n\nexports.Decoder = Decoder;\n\n/**\n * A socket.io Encoder instance\n *\n * @api public\n */\n\nfunction Encoder() {}\n\n/**\n * Encode a packet as a single string if non-binary, or as a\n * buffer sequence, depending on packet type.\n *\n * @param {Object} obj - packet object\n * @param {Function} callback - function to handle encodings (likely engine.write)\n * @return Calls callback with Array of encodings\n * @api public\n */\n\nEncoder.prototype.encode = function(obj, callback){\n if ((obj.type === exports.EVENT || obj.type === exports.ACK) && hasBin(obj.data)) {\n obj.type = obj.type === exports.EVENT ? exports.BINARY_EVENT : exports.BINARY_ACK;\n }\n\n debug('encoding packet %j', obj);\n\n if (exports.BINARY_EVENT === obj.type || exports.BINARY_ACK === obj.type) {\n encodeAsBinary(obj, callback);\n }\n else {\n var encoding = encodeAsString(obj);\n callback([encoding]);\n }\n};\n\n/**\n * Encode packet as string.\n *\n * @param {Object} packet\n * @return {String} encoded\n * @api private\n */\n\nfunction encodeAsString(obj) {\n\n // first is type\n var str = '' + obj.type;\n\n // attachments if we have them\n if (exports.BINARY_EVENT === obj.type || exports.BINARY_ACK === obj.type) {\n str += obj.attachments + '-';\n }\n\n // if we have a namespace other than `/`\n // we append it followed by a comma `,`\n if (obj.nsp && '/' !== obj.nsp) {\n str += obj.nsp + ',';\n }\n\n // immediately followed by the id\n if (null != obj.id) {\n str += obj.id;\n }\n\n // json data\n if (null != obj.data) {\n str += JSON.stringify(obj.data);\n }\n\n debug('encoded %j as %s', obj, str);\n return str;\n}\n\n/**\n * Encode packet as 'buffer sequence' by removing blobs, and\n * deconstructing packet into object with placeholders and\n * a list of buffers.\n *\n * @param {Object} packet\n * @return {Buffer} encoded\n * @api private\n */\n\nfunction encodeAsBinary(obj, callback) {\n\n function writeEncoding(bloblessData) {\n var deconstruction = binary.deconstructPacket(bloblessData);\n var pack = encodeAsString(deconstruction.packet);\n var buffers = deconstruction.buffers;\n\n buffers.unshift(pack); // add packet info to beginning of data list\n callback(buffers); // write all the buffers\n }\n\n binary.removeBlobs(obj, writeEncoding);\n}\n\n/**\n * A socket.io Decoder instance\n *\n * @return {Object} decoder\n * @api public\n */\n\nfunction Decoder() {\n this.reconstructor = null;\n}\n\n/**\n * Mix in `Emitter` with Decoder.\n */\n\nEmitter(Decoder.prototype);\n\n/**\n * Decodes an ecoded packet string into packet JSON.\n *\n * @param {String} obj - encoded packet\n * @return {Object} packet\n * @api public\n */\n\nDecoder.prototype.add = function(obj) {\n var packet;\n if (typeof obj === 'string') {\n packet = decodeString(obj);\n if (exports.BINARY_EVENT === packet.type || exports.BINARY_ACK === packet.type) { // binary packet's json\n this.reconstructor = new BinaryReconstructor(packet);\n\n // no attachments, labeled binary but no binary data to follow\n if (this.reconstructor.reconPack.attachments === 0) {\n this.emit('decoded', packet);\n }\n } else { // non-binary full packet\n this.emit('decoded', packet);\n }\n }\n else if (isBuf(obj) || obj.base64) { // raw binary data\n if (!this.reconstructor) {\n throw new Error('got binary data when not reconstructing a packet');\n } else {\n packet = this.reconstructor.takeBinaryData(obj);\n if (packet) { // received final buffer\n this.reconstructor = null;\n this.emit('decoded', packet);\n }\n }\n }\n else {\n throw new Error('Unknown type: ' + obj);\n }\n};\n\n/**\n * Decode a packet String (JSON data)\n *\n * @param {String} str\n * @return {Object} packet\n * @api private\n */\n\nfunction decodeString(str) {\n var i = 0;\n // look up type\n var p = {\n type: Number(str.charAt(0))\n };\n\n if (null == exports.types[p.type]) return error();\n\n // look up attachments if type binary\n if (exports.BINARY_EVENT === p.type || exports.BINARY_ACK === p.type) {\n var buf = '';\n while (str.charAt(++i) !== '-') {\n buf += str.charAt(i);\n if (i == str.length) break;\n }\n if (buf != Number(buf) || str.charAt(i) !== '-') {\n throw new Error('Illegal attachments');\n }\n p.attachments = Number(buf);\n }\n\n // look up namespace (if any)\n if ('/' === str.charAt(i + 1)) {\n p.nsp = '';\n while (++i) {\n var c = str.charAt(i);\n if (',' === c) break;\n p.nsp += c;\n if (i === str.length) break;\n }\n } else {\n p.nsp = '/';\n }\n\n // look up id\n var next = str.charAt(i + 1);\n if ('' !== next && Number(next) == next) {\n p.id = '';\n while (++i) {\n var c = str.charAt(i);\n if (null == c || Number(c) != c) {\n --i;\n break;\n }\n p.id += str.charAt(i);\n if (i === str.length) break;\n }\n p.id = Number(p.id);\n }\n\n // look up json data\n if (str.charAt(++i)) {\n p = tryParse(p, str.substr(i));\n }\n\n debug('decoded %s as %j', str, p);\n return p;\n}\n\nfunction tryParse(p, str) {\n try {\n p.data = JSON.parse(str);\n } catch(e){\n return error();\n }\n return p; \n}\n\n/**\n * Deallocates a parser's resources\n *\n * @api public\n */\n\nDecoder.prototype.destroy = function() {\n if (this.reconstructor) {\n this.reconstructor.finishedReconstruction();\n }\n};\n\n/**\n * A manager of a binary event's 'buffer sequence'. Should\n * be constructed whenever a packet of type BINARY_EVENT is\n * decoded.\n *\n * @param {Object} packet\n * @return {BinaryReconstructor} initialized reconstructor\n * @api private\n */\n\nfunction BinaryReconstructor(packet) {\n this.reconPack = packet;\n this.buffers = [];\n}\n\n/**\n * Method to be called when binary data received from connection\n * after a BINARY_EVENT packet.\n *\n * @param {Buffer | ArrayBuffer} binData - the raw binary data received\n * @return {null | Object} returns null if more binary data is expected or\n * a reconstructed packet object if all buffers have been received.\n * @api private\n */\n\nBinaryReconstructor.prototype.takeBinaryData = function(binData) {\n this.buffers.push(binData);\n if (this.buffers.length === this.reconPack.attachments) { // done with buffer list\n var packet = binary.reconstructPacket(this.reconPack, this.buffers);\n this.finishedReconstruction();\n return packet;\n }\n return null;\n};\n\n/**\n * Cleans up binary packet reconstruction variables.\n *\n * @api private\n */\n\nBinaryReconstructor.prototype.finishedReconstruction = function() {\n this.reconPack = null;\n this.buffers = [];\n};\n\nfunction error() {\n return {\n type: exports.ERROR,\n data: 'parser error'\n };\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/socket.io-client/~/socket.io-parser/index.js\n// module id = 23\n// module chunks = 0","\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (typeof module !== 'undefined') {\r\n module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n for (var key in Emitter.prototype) {\r\n obj[key] = Emitter.prototype[key];\r\n }\r\n return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n .push(fn);\r\n return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n function on() {\r\n this.off(event, on);\r\n fn.apply(this, arguments);\r\n }\r\n\r\n on.fn = fn;\r\n this.on(event, on);\r\n return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n\r\n // all\r\n if (0 == arguments.length) {\r\n this._callbacks = {};\r\n return this;\r\n }\r\n\r\n // specific event\r\n var callbacks = this._callbacks['$' + event];\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (1 == arguments.length) {\r\n delete this._callbacks['$' + event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n var cb;\r\n for (var i = 0; i < callbacks.length; i++) {\r\n cb = callbacks[i];\r\n if (cb === fn || cb.fn === fn) {\r\n callbacks.splice(i, 1);\r\n break;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n this._callbacks = this._callbacks || {};\r\n var args = [].slice.call(arguments, 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n if (callbacks) {\r\n callbacks = callbacks.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n callbacks[i].apply(this, args);\r\n }\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n this._callbacks = this._callbacks || {};\r\n return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n return !! this.listeners(event).length;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/component-emitter/index.js\n// module id = 24\n// module chunks = 0","/* global Blob File */\n\n/*\n * Module requirements.\n */\n\nvar isArray = require('isarray');\n\nvar toString = Object.prototype.toString;\nvar withNativeBlob = typeof global.Blob === 'function' || toString.call(global.Blob) === '[object BlobConstructor]';\nvar withNativeFile = typeof global.File === 'function' || toString.call(global.File) === '[object FileConstructor]';\n\n/**\n * Module exports.\n */\n\nmodule.exports = hasBinary;\n\n/**\n * Checks for binary data.\n *\n * Supports Buffer, ArrayBuffer, Blob and File.\n *\n * @param {Object} anything\n * @api public\n */\n\nfunction hasBinary (obj) {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n\n if (isArray(obj)) {\n for (var i = 0, l = obj.length; i < l; i++) {\n if (hasBinary(obj[i])) {\n return true;\n }\n }\n return false;\n }\n\n if ((typeof global.Buffer === 'function' && global.Buffer.isBuffer && global.Buffer.isBuffer(obj)) ||\n (typeof global.ArrayBuffer === 'function' && obj instanceof ArrayBuffer) ||\n (withNativeBlob && obj instanceof Blob) ||\n (withNativeFile && obj instanceof File)\n ) {\n return true;\n }\n\n // see: https://github.com/Automattic/has-binary/pull/4\n if (obj.toJSON && typeof obj.toJSON === 'function' && arguments.length === 1) {\n return hasBinary(obj.toJSON(), true);\n }\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {\n return true;\n }\n }\n\n return false;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/has-binary2/index.js\n// module id = 25\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/has-binary2/~/isarray/index.js\n// module id = 26\n// module chunks = 0","/*global Blob,File*/\n\n/**\n * Module requirements\n */\n\nvar isArray = require('isarray');\nvar isBuf = require('./is-buffer');\nvar toString = Object.prototype.toString;\nvar withNativeBlob = typeof global.Blob === 'function' || toString.call(global.Blob) === '[object BlobConstructor]';\nvar withNativeFile = typeof global.File === 'function' || toString.call(global.File) === '[object FileConstructor]';\n\n/**\n * Replaces every Buffer | ArrayBuffer in packet with a numbered placeholder.\n * Anything with blobs or files should be fed through removeBlobs before coming\n * here.\n *\n * @param {Object} packet - socket.io event packet\n * @return {Object} with deconstructed packet and list of buffers\n * @api public\n */\n\nexports.deconstructPacket = function(packet) {\n var buffers = [];\n var packetData = packet.data;\n var pack = packet;\n pack.data = _deconstructPacket(packetData, buffers);\n pack.attachments = buffers.length; // number of binary 'attachments'\n return {packet: pack, buffers: buffers};\n};\n\nfunction _deconstructPacket(data, buffers) {\n if (!data) return data;\n\n if (isBuf(data)) {\n var placeholder = { _placeholder: true, num: buffers.length };\n buffers.push(data);\n return placeholder;\n } else if (isArray(data)) {\n var newData = new Array(data.length);\n for (var i = 0; i < data.length; i++) {\n newData[i] = _deconstructPacket(data[i], buffers);\n }\n return newData;\n } else if (typeof data === 'object' && !(data instanceof Date)) {\n var newData = {};\n for (var key in data) {\n newData[key] = _deconstructPacket(data[key], buffers);\n }\n return newData;\n }\n return data;\n}\n\n/**\n * Reconstructs a binary packet from its placeholder packet and buffers\n *\n * @param {Object} packet - event packet with placeholders\n * @param {Array} buffers - binary buffers to put in placeholder positions\n * @return {Object} reconstructed packet\n * @api public\n */\n\nexports.reconstructPacket = function(packet, buffers) {\n packet.data = _reconstructPacket(packet.data, buffers);\n packet.attachments = undefined; // no longer useful\n return packet;\n};\n\nfunction _reconstructPacket(data, buffers) {\n if (!data) return data;\n\n if (data && data._placeholder) {\n return buffers[data.num]; // appropriate buffer (should be natural order anyway)\n } else if (isArray(data)) {\n for (var i = 0; i < data.length; i++) {\n data[i] = _reconstructPacket(data[i], buffers);\n }\n } else if (typeof data === 'object') {\n for (var key in data) {\n data[key] = _reconstructPacket(data[key], buffers);\n }\n }\n\n return data;\n}\n\n/**\n * Asynchronously removes Blobs or Files from data via\n * FileReader's readAsArrayBuffer method. Used before encoding\n * data as msgpack. Calls callback with the blobless data.\n *\n * @param {Object} data\n * @param {Function} callback\n * @api private\n */\n\nexports.removeBlobs = function(data, callback) {\n function _removeBlobs(obj, curKey, containingObject) {\n if (!obj) return obj;\n\n // convert any blob\n if ((withNativeBlob && obj instanceof Blob) ||\n (withNativeFile && obj instanceof File)) {\n pendingBlobs++;\n\n // async filereader\n var fileReader = new FileReader();\n fileReader.onload = function() { // this.result == arraybuffer\n if (containingObject) {\n containingObject[curKey] = this.result;\n }\n else {\n bloblessData = this.result;\n }\n\n // if nothing pending its callback time\n if(! --pendingBlobs) {\n callback(bloblessData);\n }\n };\n\n fileReader.readAsArrayBuffer(obj); // blob -> arraybuffer\n } else if (isArray(obj)) { // handle array\n for (var i = 0; i < obj.length; i++) {\n _removeBlobs(obj[i], i, obj);\n }\n } else if (typeof obj === 'object' && !isBuf(obj)) { // and object\n for (var key in obj) {\n _removeBlobs(obj[key], key, obj);\n }\n }\n }\n\n var pendingBlobs = 0;\n var bloblessData = data;\n _removeBlobs(bloblessData);\n if (!pendingBlobs) {\n callback(bloblessData);\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/socket.io-client/~/socket.io-parser/binary.js\n// module id = 27\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/socket.io-client/~/isarray/index.js\n// module id = 28\n// module chunks = 0","\nmodule.exports = isBuf;\n\n/**\n * Returns true if obj is a buffer or an arraybuffer.\n *\n * @api private\n */\n\nfunction isBuf(obj) {\n return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n (global.ArrayBuffer && obj instanceof ArrayBuffer);\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/socket.io-client/~/socket.io-parser/is-buffer.js\n// module id = 29\n// module chunks = 0","\n/**\n * Module dependencies.\n */\n\nvar eio = require('engine.io-client');\nvar Socket = require('./socket');\nvar Emitter = require('component-emitter');\nvar parser = require('socket.io-parser');\nvar on = require('./on');\nvar bind = require('component-bind');\nvar debug = require('debug')('socket.io-client:manager');\nvar indexOf = require('indexof');\nvar Backoff = require('backo2');\n\n/**\n * IE6+ hasOwnProperty\n */\n\nvar has = Object.prototype.hasOwnProperty;\n\n/**\n * Module exports\n */\n\nmodule.exports = Manager;\n\n/**\n * `Manager` constructor.\n *\n * @param {String} engine instance or engine uri/opts\n * @param {Object} options\n * @api public\n */\n\nfunction Manager (uri, opts) {\n if (!(this instanceof Manager)) return new Manager(uri, opts);\n if (uri && ('object' === typeof uri)) {\n opts = uri;\n uri = undefined;\n }\n opts = opts || {};\n\n opts.path = opts.path || '/socket.io';\n this.nsps = {};\n this.subs = [];\n this.opts = opts;\n this.reconnection(opts.reconnection !== false);\n this.reconnectionAttempts(opts.reconnectionAttempts || Infinity);\n this.reconnectionDelay(opts.reconnectionDelay || 1000);\n this.reconnectionDelayMax(opts.reconnectionDelayMax || 5000);\n this.randomizationFactor(opts.randomizationFactor || 0.5);\n this.backoff = new Backoff({\n min: this.reconnectionDelay(),\n max: this.reconnectionDelayMax(),\n jitter: this.randomizationFactor()\n });\n this.timeout(null == opts.timeout ? 20000 : opts.timeout);\n this.readyState = 'closed';\n this.uri = uri;\n this.connecting = [];\n this.lastPing = null;\n this.encoding = false;\n this.packetBuffer = [];\n var _parser = opts.parser || parser;\n this.encoder = new _parser.Encoder();\n this.decoder = new _parser.Decoder();\n this.autoConnect = opts.autoConnect !== false;\n if (this.autoConnect) this.open();\n}\n\n/**\n * Propagate given event to sockets and emit on `this`\n *\n * @api private\n */\n\nManager.prototype.emitAll = function () {\n this.emit.apply(this, arguments);\n for (var nsp in this.nsps) {\n if (has.call(this.nsps, nsp)) {\n this.nsps[nsp].emit.apply(this.nsps[nsp], arguments);\n }\n }\n};\n\n/**\n * Update `socket.id` of all sockets\n *\n * @api private\n */\n\nManager.prototype.updateSocketIds = function () {\n for (var nsp in this.nsps) {\n if (has.call(this.nsps, nsp)) {\n this.nsps[nsp].id = this.generateId(nsp);\n }\n }\n};\n\n/**\n * generate `socket.id` for the given `nsp`\n *\n * @param {String} nsp\n * @return {String}\n * @api private\n */\n\nManager.prototype.generateId = function (nsp) {\n return (nsp === '/' ? '' : (nsp + '#')) + this.engine.id;\n};\n\n/**\n * Mix in `Emitter`.\n */\n\nEmitter(Manager.prototype);\n\n/**\n * Sets the `reconnection` config.\n *\n * @param {Boolean} true/false if it should automatically reconnect\n * @return {Manager} self or value\n * @api public\n */\n\nManager.prototype.reconnection = function (v) {\n if (!arguments.length) return this._reconnection;\n this._reconnection = !!v;\n return this;\n};\n\n/**\n * Sets the reconnection attempts config.\n *\n * @param {Number} max reconnection attempts before giving up\n * @return {Manager} self or value\n * @api public\n */\n\nManager.prototype.reconnectionAttempts = function (v) {\n if (!arguments.length) return this._reconnectionAttempts;\n this._reconnectionAttempts = v;\n return this;\n};\n\n/**\n * Sets the delay between reconnections.\n *\n * @param {Number} delay\n * @return {Manager} self or value\n * @api public\n */\n\nManager.prototype.reconnectionDelay = function (v) {\n if (!arguments.length) return this._reconnectionDelay;\n this._reconnectionDelay = v;\n this.backoff && this.backoff.setMin(v);\n return this;\n};\n\nManager.prototype.randomizationFactor = function (v) {\n if (!arguments.length) return this._randomizationFactor;\n this._randomizationFactor = v;\n this.backoff && this.backoff.setJitter(v);\n return this;\n};\n\n/**\n * Sets the maximum delay between reconnections.\n *\n * @param {Number} delay\n * @return {Manager} self or value\n * @api public\n */\n\nManager.prototype.reconnectionDelayMax = function (v) {\n if (!arguments.length) return this._reconnectionDelayMax;\n this._reconnectionDelayMax = v;\n this.backoff && this.backoff.setMax(v);\n return this;\n};\n\n/**\n * Sets the connection timeout. `false` to disable\n *\n * @return {Manager} self or value\n * @api public\n */\n\nManager.prototype.timeout = function (v) {\n if (!arguments.length) return this._timeout;\n this._timeout = v;\n return this;\n};\n\n/**\n * Starts trying to reconnect if reconnection is enabled and we have not\n * started reconnecting yet\n *\n * @api private\n */\n\nManager.prototype.maybeReconnectOnOpen = function () {\n // Only try to reconnect if it's the first time we're connecting\n if (!this.reconnecting && this._reconnection && this.backoff.attempts === 0) {\n // keeps reconnection from firing twice for the same reconnection loop\n this.reconnect();\n }\n};\n\n/**\n * Sets the current transport `socket`.\n *\n * @param {Function} optional, callback\n * @return {Manager} self\n * @api public\n */\n\nManager.prototype.open =\nManager.prototype.connect = function (fn, opts) {\n debug('readyState %s', this.readyState);\n if (~this.readyState.indexOf('open')) return this;\n\n debug('opening %s', this.uri);\n this.engine = eio(this.uri, this.opts);\n var socket = this.engine;\n var self = this;\n this.readyState = 'opening';\n this.skipReconnect = false;\n\n // emit `open`\n var openSub = on(socket, 'open', function () {\n self.onopen();\n fn && fn();\n });\n\n // emit `connect_error`\n var errorSub = on(socket, 'error', function (data) {\n debug('connect_error');\n self.cleanup();\n self.readyState = 'closed';\n self.emitAll('connect_error', data);\n if (fn) {\n var err = new Error('Connection error');\n err.data = data;\n fn(err);\n } else {\n // Only do this if there is no fn to handle the error\n self.maybeReconnectOnOpen();\n }\n });\n\n // emit `connect_timeout`\n if (false !== this._timeout) {\n var timeout = this._timeout;\n debug('connect attempt will timeout after %d', timeout);\n\n // set timer\n var timer = setTimeout(function () {\n debug('connect attempt timed out after %d', timeout);\n openSub.destroy();\n socket.close();\n socket.emit('error', 'timeout');\n self.emitAll('connect_timeout', timeout);\n }, timeout);\n\n this.subs.push({\n destroy: function () {\n clearTimeout(timer);\n }\n });\n }\n\n this.subs.push(openSub);\n this.subs.push(errorSub);\n\n return this;\n};\n\n/**\n * Called upon transport open.\n *\n * @api private\n */\n\nManager.prototype.onopen = function () {\n debug('open');\n\n // clear old subs\n this.cleanup();\n\n // mark as open\n this.readyState = 'open';\n this.emit('open');\n\n // add new subs\n var socket = this.engine;\n this.subs.push(on(socket, 'data', bind(this, 'ondata')));\n this.subs.push(on(socket, 'ping', bind(this, 'onping')));\n this.subs.push(on(socket, 'pong', bind(this, 'onpong')));\n this.subs.push(on(socket, 'error', bind(this, 'onerror')));\n this.subs.push(on(socket, 'close', bind(this, 'onclose')));\n this.subs.push(on(this.decoder, 'decoded', bind(this, 'ondecoded')));\n};\n\n/**\n * Called upon a ping.\n *\n * @api private\n */\n\nManager.prototype.onping = function () {\n this.lastPing = new Date();\n this.emitAll('ping');\n};\n\n/**\n * Called upon a packet.\n *\n * @api private\n */\n\nManager.prototype.onpong = function () {\n this.emitAll('pong', new Date() - this.lastPing);\n};\n\n/**\n * Called with data.\n *\n * @api private\n */\n\nManager.prototype.ondata = function (data) {\n this.decoder.add(data);\n};\n\n/**\n * Called when parser fully decodes a packet.\n *\n * @api private\n */\n\nManager.prototype.ondecoded = function (packet) {\n this.emit('packet', packet);\n};\n\n/**\n * Called upon socket error.\n *\n * @api private\n */\n\nManager.prototype.onerror = function (err) {\n debug('error', err);\n this.emitAll('error', err);\n};\n\n/**\n * Creates a new socket for the given `nsp`.\n *\n * @return {Socket}\n * @api public\n */\n\nManager.prototype.socket = function (nsp, opts) {\n var socket = this.nsps[nsp];\n if (!socket) {\n socket = new Socket(this, nsp, opts);\n this.nsps[nsp] = socket;\n var self = this;\n socket.on('connecting', onConnecting);\n socket.on('connect', function () {\n socket.id = self.generateId(nsp);\n });\n\n if (this.autoConnect) {\n // manually call here since connecting event is fired before listening\n onConnecting();\n }\n }\n\n function onConnecting () {\n if (!~indexOf(self.connecting, socket)) {\n self.connecting.push(socket);\n }\n }\n\n return socket;\n};\n\n/**\n * Called upon a socket close.\n *\n * @param {Socket} socket\n */\n\nManager.prototype.destroy = function (socket) {\n var index = indexOf(this.connecting, socket);\n if (~index) this.connecting.splice(index, 1);\n if (this.connecting.length) return;\n\n this.close();\n};\n\n/**\n * Writes a packet.\n *\n * @param {Object} packet\n * @api private\n */\n\nManager.prototype.packet = function (packet) {\n debug('writing packet %j', packet);\n var self = this;\n if (packet.query && packet.type === 0) packet.nsp += '?' + packet.query;\n\n if (!self.encoding) {\n // encode, then write to engine with result\n self.encoding = true;\n this.encoder.encode(packet, function (encodedPackets) {\n for (var i = 0; i < encodedPackets.length; i++) {\n self.engine.write(encodedPackets[i], packet.options);\n }\n self.encoding = false;\n self.processPacketQueue();\n });\n } else { // add packet to the queue\n self.packetBuffer.push(packet);\n }\n};\n\n/**\n * If packet buffer is non-empty, begins encoding the\n * next packet in line.\n *\n * @api private\n */\n\nManager.prototype.processPacketQueue = function () {\n if (this.packetBuffer.length > 0 && !this.encoding) {\n var pack = this.packetBuffer.shift();\n this.packet(pack);\n }\n};\n\n/**\n * Clean up transport subscriptions and packet buffer.\n *\n * @api private\n */\n\nManager.prototype.cleanup = function () {\n debug('cleanup');\n\n var subsLength = this.subs.length;\n for (var i = 0; i < subsLength; i++) {\n var sub = this.subs.shift();\n sub.destroy();\n }\n\n this.packetBuffer = [];\n this.encoding = false;\n this.lastPing = null;\n\n this.decoder.destroy();\n};\n\n/**\n * Close the current socket.\n *\n * @api private\n */\n\nManager.prototype.close =\nManager.prototype.disconnect = function () {\n debug('disconnect');\n this.skipReconnect = true;\n this.reconnecting = false;\n if ('opening' === this.readyState) {\n // `onclose` will not fire because\n // an open event never happened\n this.cleanup();\n }\n this.backoff.reset();\n this.readyState = 'closed';\n if (this.engine) this.engine.close();\n};\n\n/**\n * Called upon engine close.\n *\n * @api private\n */\n\nManager.prototype.onclose = function (reason) {\n debug('onclose');\n\n this.cleanup();\n this.backoff.reset();\n this.readyState = 'closed';\n this.emit('close', reason);\n\n if (this._reconnection && !this.skipReconnect) {\n this.reconnect();\n }\n};\n\n/**\n * Attempt a reconnection.\n *\n * @api private\n */\n\nManager.prototype.reconnect = function () {\n if (this.reconnecting || this.skipReconnect) return this;\n\n var self = this;\n\n if (this.backoff.attempts >= this._reconnectionAttempts) {\n debug('reconnect failed');\n this.backoff.reset();\n this.emitAll('reconnect_failed');\n this.reconnecting = false;\n } else {\n var delay = this.backoff.duration();\n debug('will wait %dms before reconnect attempt', delay);\n\n this.reconnecting = true;\n var timer = setTimeout(function () {\n if (self.skipReconnect) return;\n\n debug('attempting reconnect');\n self.emitAll('reconnect_attempt', self.backoff.attempts);\n self.emitAll('reconnecting', self.backoff.attempts);\n\n // check again for the case socket closed in above events\n if (self.skipReconnect) return;\n\n self.open(function (err) {\n if (err) {\n debug('reconnect attempt error');\n self.reconnecting = false;\n self.reconnect();\n self.emitAll('reconnect_error', err.data);\n } else {\n debug('reconnect success');\n self.onreconnect();\n }\n });\n }, delay);\n\n this.subs.push({\n destroy: function () {\n clearTimeout(timer);\n }\n });\n }\n};\n\n/**\n * Called upon successful reconnect.\n *\n * @api private\n */\n\nManager.prototype.onreconnect = function () {\n var attempt = this.backoff.attempts;\n this.reconnecting = false;\n this.backoff.reset();\n this.updateSocketIds();\n this.emitAll('reconnect', attempt);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/socket.io-client/lib/manager.js\n// module id = 30\n// module chunks = 0","\nmodule.exports = require('./socket');\n\n/**\n * Exports parser\n *\n * @api public\n *\n */\nmodule.exports.parser = require('engine.io-parser');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/engine.io-client/lib/index.js\n// module id = 31\n// module chunks = 0","/**\n * Module dependencies.\n */\n\nvar transports = require('./transports/index');\nvar Emitter = require('component-emitter');\nvar debug = require('debug')('engine.io-client:socket');\nvar index = require('indexof');\nvar parser = require('engine.io-parser');\nvar parseuri = require('parseuri');\nvar parseqs = require('parseqs');\n\n/**\n * Module exports.\n */\n\nmodule.exports = Socket;\n\n/**\n * Socket constructor.\n *\n * @param {String|Object} uri or options\n * @param {Object} options\n * @api public\n */\n\nfunction Socket (uri, opts) {\n if (!(this instanceof Socket)) return new Socket(uri, opts);\n\n opts = opts || {};\n\n if (uri && 'object' === typeof uri) {\n opts = uri;\n uri = null;\n }\n\n if (uri) {\n uri = parseuri(uri);\n opts.hostname = uri.host;\n opts.secure = uri.protocol === 'https' || uri.protocol === 'wss';\n opts.port = uri.port;\n if (uri.query) opts.query = uri.query;\n } else if (opts.host) {\n opts.hostname = parseuri(opts.host).host;\n }\n\n this.secure = null != opts.secure ? opts.secure\n : (global.location && 'https:' === location.protocol);\n\n if (opts.hostname && !opts.port) {\n // if no port is specified manually, use the protocol default\n opts.port = this.secure ? '443' : '80';\n }\n\n this.agent = opts.agent || false;\n this.hostname = opts.hostname ||\n (global.location ? location.hostname : 'localhost');\n this.port = opts.port || (global.location && location.port\n ? location.port\n : (this.secure ? 443 : 80));\n this.query = opts.query || {};\n if ('string' === typeof this.query) this.query = parseqs.decode(this.query);\n this.upgrade = false !== opts.upgrade;\n this.path = (opts.path || '/engine.io').replace(/\\/$/, '') + '/';\n this.forceJSONP = !!opts.forceJSONP;\n this.jsonp = false !== opts.jsonp;\n this.forceBase64 = !!opts.forceBase64;\n this.enablesXDR = !!opts.enablesXDR;\n this.timestampParam = opts.timestampParam || 't';\n this.timestampRequests = opts.timestampRequests;\n this.transports = opts.transports || ['polling', 'websocket'];\n this.transportOptions = opts.transportOptions || {};\n this.readyState = '';\n this.writeBuffer = [];\n this.prevBufferLen = 0;\n this.policyPort = opts.policyPort || 843;\n this.rememberUpgrade = opts.rememberUpgrade || false;\n this.binaryType = null;\n this.onlyBinaryUpgrades = opts.onlyBinaryUpgrades;\n this.perMessageDeflate = false !== opts.perMessageDeflate ? (opts.perMessageDeflate || {}) : false;\n\n if (true === this.perMessageDeflate) this.perMessageDeflate = {};\n if (this.perMessageDeflate && null == this.perMessageDeflate.threshold) {\n this.perMessageDeflate.threshold = 1024;\n }\n\n // SSL options for Node.js client\n this.pfx = opts.pfx || null;\n this.key = opts.key || null;\n this.passphrase = opts.passphrase || null;\n this.cert = opts.cert || null;\n this.ca = opts.ca || null;\n this.ciphers = opts.ciphers || null;\n this.rejectUnauthorized = opts.rejectUnauthorized === undefined ? true : opts.rejectUnauthorized;\n this.forceNode = !!opts.forceNode;\n\n // other options for Node.js client\n var freeGlobal = typeof global === 'object' && global;\n if (freeGlobal.global === freeGlobal) {\n if (opts.extraHeaders && Object.keys(opts.extraHeaders).length > 0) {\n this.extraHeaders = opts.extraHeaders;\n }\n\n if (opts.localAddress) {\n this.localAddress = opts.localAddress;\n }\n }\n\n // set on handshake\n this.id = null;\n this.upgrades = null;\n this.pingInterval = null;\n this.pingTimeout = null;\n\n // set on heartbeat\n this.pingIntervalTimer = null;\n this.pingTimeoutTimer = null;\n\n this.open();\n}\n\nSocket.priorWebsocketSuccess = false;\n\n/**\n * Mix in `Emitter`.\n */\n\nEmitter(Socket.prototype);\n\n/**\n * Protocol version.\n *\n * @api public\n */\n\nSocket.protocol = parser.protocol; // this is an int\n\n/**\n * Expose deps for legacy compatibility\n * and standalone browser access.\n */\n\nSocket.Socket = Socket;\nSocket.Transport = require('./transport');\nSocket.transports = require('./transports/index');\nSocket.parser = require('engine.io-parser');\n\n/**\n * Creates transport of the given type.\n *\n * @param {String} transport name\n * @return {Transport}\n * @api private\n */\n\nSocket.prototype.createTransport = function (name) {\n debug('creating transport \"%s\"', name);\n var query = clone(this.query);\n\n // append engine.io protocol identifier\n query.EIO = parser.protocol;\n\n // transport name\n query.transport = name;\n\n // per-transport options\n var options = this.transportOptions[name] || {};\n\n // session id if we already have one\n if (this.id) query.sid = this.id;\n\n var transport = new transports[name]({\n query: query,\n socket: this,\n agent: options.agent || this.agent,\n hostname: options.hostname || this.hostname,\n port: options.port || this.port,\n secure: options.secure || this.secure,\n path: options.path || this.path,\n forceJSONP: options.forceJSONP || this.forceJSONP,\n jsonp: options.jsonp || this.jsonp,\n forceBase64: options.forceBase64 || this.forceBase64,\n enablesXDR: options.enablesXDR || this.enablesXDR,\n timestampRequests: options.timestampRequests || this.timestampRequests,\n timestampParam: options.timestampParam || this.timestampParam,\n policyPort: options.policyPort || this.policyPort,\n pfx: options.pfx || this.pfx,\n key: options.key || this.key,\n passphrase: options.passphrase || this.passphrase,\n cert: options.cert || this.cert,\n ca: options.ca || this.ca,\n ciphers: options.ciphers || this.ciphers,\n rejectUnauthorized: options.rejectUnauthorized || this.rejectUnauthorized,\n perMessageDeflate: options.perMessageDeflate || this.perMessageDeflate,\n extraHeaders: options.extraHeaders || this.extraHeaders,\n forceNode: options.forceNode || this.forceNode,\n localAddress: options.localAddress || this.localAddress,\n requestTimeout: options.requestTimeout || this.requestTimeout,\n protocols: options.protocols || void (0)\n });\n\n return transport;\n};\n\nfunction clone (obj) {\n var o = {};\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n o[i] = obj[i];\n }\n }\n return o;\n}\n\n/**\n * Initializes transport to use and starts probe.\n *\n * @api private\n */\nSocket.prototype.open = function () {\n var transport;\n if (this.rememberUpgrade && Socket.priorWebsocketSuccess && this.transports.indexOf('websocket') !== -1) {\n transport = 'websocket';\n } else if (0 === this.transports.length) {\n // Emit error on next tick so it can be listened to\n var self = this;\n setTimeout(function () {\n self.emit('error', 'No transports available');\n }, 0);\n return;\n } else {\n transport = this.transports[0];\n }\n this.readyState = 'opening';\n\n // Retry with the next transport if the transport is disabled (jsonp: false)\n try {\n transport = this.createTransport(transport);\n } catch (e) {\n this.transports.shift();\n this.open();\n return;\n }\n\n transport.open();\n this.setTransport(transport);\n};\n\n/**\n * Sets the current transport. Disables the existing one (if any).\n *\n * @api private\n */\n\nSocket.prototype.setTransport = function (transport) {\n debug('setting transport %s', transport.name);\n var self = this;\n\n if (this.transport) {\n debug('clearing existing transport %s', this.transport.name);\n this.transport.removeAllListeners();\n }\n\n // set up transport\n this.transport = transport;\n\n // set up transport listeners\n transport\n .on('drain', function () {\n self.onDrain();\n })\n .on('packet', function (packet) {\n self.onPacket(packet);\n })\n .on('error', function (e) {\n self.onError(e);\n })\n .on('close', function () {\n self.onClose('transport close');\n });\n};\n\n/**\n * Probes a transport.\n *\n * @param {String} transport name\n * @api private\n */\n\nSocket.prototype.probe = function (name) {\n debug('probing transport \"%s\"', name);\n var transport = this.createTransport(name, { probe: 1 });\n var failed = false;\n var self = this;\n\n Socket.priorWebsocketSuccess = false;\n\n function onTransportOpen () {\n if (self.onlyBinaryUpgrades) {\n var upgradeLosesBinary = !this.supportsBinary && self.transport.supportsBinary;\n failed = failed || upgradeLosesBinary;\n }\n if (failed) return;\n\n debug('probe transport \"%s\" opened', name);\n transport.send([{ type: 'ping', data: 'probe' }]);\n transport.once('packet', function (msg) {\n if (failed) return;\n if ('pong' === msg.type && 'probe' === msg.data) {\n debug('probe transport \"%s\" pong', name);\n self.upgrading = true;\n self.emit('upgrading', transport);\n if (!transport) return;\n Socket.priorWebsocketSuccess = 'websocket' === transport.name;\n\n debug('pausing current transport \"%s\"', self.transport.name);\n self.transport.pause(function () {\n if (failed) return;\n if ('closed' === self.readyState) return;\n debug('changing transport and sending upgrade packet');\n\n cleanup();\n\n self.setTransport(transport);\n transport.send([{ type: 'upgrade' }]);\n self.emit('upgrade', transport);\n transport = null;\n self.upgrading = false;\n self.flush();\n });\n } else {\n debug('probe transport \"%s\" failed', name);\n var err = new Error('probe error');\n err.transport = transport.name;\n self.emit('upgradeError', err);\n }\n });\n }\n\n function freezeTransport () {\n if (failed) return;\n\n // Any callback called by transport should be ignored since now\n failed = true;\n\n cleanup();\n\n transport.close();\n transport = null;\n }\n\n // Handle any error that happens while probing\n function onerror (err) {\n var error = new Error('probe error: ' + err);\n error.transport = transport.name;\n\n freezeTransport();\n\n debug('probe transport \"%s\" failed because of error: %s', name, err);\n\n self.emit('upgradeError', error);\n }\n\n function onTransportClose () {\n onerror('transport closed');\n }\n\n // When the socket is closed while we're probing\n function onclose () {\n onerror('socket closed');\n }\n\n // When the socket is upgraded while we're probing\n function onupgrade (to) {\n if (transport && to.name !== transport.name) {\n debug('\"%s\" works - aborting \"%s\"', to.name, transport.name);\n freezeTransport();\n }\n }\n\n // Remove all listeners on the transport and on self\n function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }\n\n transport.once('open', onTransportOpen);\n transport.once('error', onerror);\n transport.once('close', onTransportClose);\n\n this.once('close', onclose);\n this.once('upgrading', onupgrade);\n\n transport.open();\n};\n\n/**\n * Called when connection is deemed open.\n *\n * @api public\n */\n\nSocket.prototype.onOpen = function () {\n debug('socket open');\n this.readyState = 'open';\n Socket.priorWebsocketSuccess = 'websocket' === this.transport.name;\n this.emit('open');\n this.flush();\n\n // we check for `readyState` in case an `open`\n // listener already closed the socket\n if ('open' === this.readyState && this.upgrade && this.transport.pause) {\n debug('starting upgrade probes');\n for (var i = 0, l = this.upgrades.length; i < l; i++) {\n this.probe(this.upgrades[i]);\n }\n }\n};\n\n/**\n * Handles a packet.\n *\n * @api private\n */\n\nSocket.prototype.onPacket = function (packet) {\n if ('opening' === this.readyState || 'open' === this.readyState ||\n 'closing' === this.readyState) {\n debug('socket receive: type \"%s\", data \"%s\"', packet.type, packet.data);\n\n this.emit('packet', packet);\n\n // Socket is live - any packet counts\n this.emit('heartbeat');\n\n switch (packet.type) {\n case 'open':\n this.onHandshake(JSON.parse(packet.data));\n break;\n\n case 'pong':\n this.setPing();\n this.emit('pong');\n break;\n\n case 'error':\n var err = new Error('server error');\n err.code = packet.data;\n this.onError(err);\n break;\n\n case 'message':\n this.emit('data', packet.data);\n this.emit('message', packet.data);\n break;\n }\n } else {\n debug('packet received with socket readyState \"%s\"', this.readyState);\n }\n};\n\n/**\n * Called upon handshake completion.\n *\n * @param {Object} handshake obj\n * @api private\n */\n\nSocket.prototype.onHandshake = function (data) {\n this.emit('handshake', data);\n this.id = data.sid;\n this.transport.query.sid = data.sid;\n this.upgrades = this.filterUpgrades(data.upgrades);\n this.pingInterval = data.pingInterval;\n this.pingTimeout = data.pingTimeout;\n this.onOpen();\n // In case open handler closes socket\n if ('closed' === this.readyState) return;\n this.setPing();\n\n // Prolong liveness of socket on heartbeat\n this.removeListener('heartbeat', this.onHeartbeat);\n this.on('heartbeat', this.onHeartbeat);\n};\n\n/**\n * Resets ping timeout.\n *\n * @api private\n */\n\nSocket.prototype.onHeartbeat = function (timeout) {\n clearTimeout(this.pingTimeoutTimer);\n var self = this;\n self.pingTimeoutTimer = setTimeout(function () {\n if ('closed' === self.readyState) return;\n self.onClose('ping timeout');\n }, timeout || (self.pingInterval + self.pingTimeout));\n};\n\n/**\n * Pings server every `this.pingInterval` and expects response\n * within `this.pingTimeout` or closes connection.\n *\n * @api private\n */\n\nSocket.prototype.setPing = function () {\n var self = this;\n clearTimeout(self.pingIntervalTimer);\n self.pingIntervalTimer = setTimeout(function () {\n debug('writing ping packet - expecting pong within %sms', self.pingTimeout);\n self.ping();\n self.onHeartbeat(self.pingTimeout);\n }, self.pingInterval);\n};\n\n/**\n* Sends a ping packet.\n*\n* @api private\n*/\n\nSocket.prototype.ping = function () {\n var self = this;\n this.sendPacket('ping', function () {\n self.emit('ping');\n });\n};\n\n/**\n * Called on `drain` event\n *\n * @api private\n */\n\nSocket.prototype.onDrain = function () {\n this.writeBuffer.splice(0, this.prevBufferLen);\n\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n\n if (0 === this.writeBuffer.length) {\n this.emit('drain');\n } else {\n this.flush();\n }\n};\n\n/**\n * Flush write buffers.\n *\n * @api private\n */\n\nSocket.prototype.flush = function () {\n if ('closed' !== this.readyState && this.transport.writable &&\n !this.upgrading && this.writeBuffer.length) {\n debug('flushing %d packets in socket', this.writeBuffer.length);\n this.transport.send(this.writeBuffer);\n // keep track of current length of writeBuffer\n // splice writeBuffer and callbackBuffer on `drain`\n this.prevBufferLen = this.writeBuffer.length;\n this.emit('flush');\n }\n};\n\n/**\n * Sends a message.\n *\n * @param {String} message.\n * @param {Function} callback function.\n * @param {Object} options.\n * @return {Socket} for chaining.\n * @api public\n */\n\nSocket.prototype.write =\nSocket.prototype.send = function (msg, options, fn) {\n this.sendPacket('message', msg, options, fn);\n return this;\n};\n\n/**\n * Sends a packet.\n *\n * @param {String} packet type.\n * @param {String} data.\n * @param {Object} options.\n * @param {Function} callback function.\n * @api private\n */\n\nSocket.prototype.sendPacket = function (type, data, options, fn) {\n if ('function' === typeof data) {\n fn = data;\n data = undefined;\n }\n\n if ('function' === typeof options) {\n fn = options;\n options = null;\n }\n\n if ('closing' === this.readyState || 'closed' === this.readyState) {\n return;\n }\n\n options = options || {};\n options.compress = false !== options.compress;\n\n var packet = {\n type: type,\n data: data,\n options: options\n };\n this.emit('packetCreate', packet);\n this.writeBuffer.push(packet);\n if (fn) this.once('flush', fn);\n this.flush();\n};\n\n/**\n * Closes the connection.\n *\n * @api private\n */\n\nSocket.prototype.close = function () {\n if ('opening' === this.readyState || 'open' === this.readyState) {\n this.readyState = 'closing';\n\n var self = this;\n\n if (this.writeBuffer.length) {\n this.once('drain', function () {\n if (this.upgrading) {\n waitForUpgrade();\n } else {\n close();\n }\n });\n } else if (this.upgrading) {\n waitForUpgrade();\n } else {\n close();\n }\n }\n\n function close () {\n self.onClose('forced close');\n debug('socket closing - telling transport to close');\n self.transport.close();\n }\n\n function cleanupAndClose () {\n self.removeListener('upgrade', cleanupAndClose);\n self.removeListener('upgradeError', cleanupAndClose);\n close();\n }\n\n function waitForUpgrade () {\n // wait for upgrade to finish since we can't send packets while pausing a transport\n self.once('upgrade', cleanupAndClose);\n self.once('upgradeError', cleanupAndClose);\n }\n\n return this;\n};\n\n/**\n * Called upon transport error\n *\n * @api private\n */\n\nSocket.prototype.onError = function (err) {\n debug('socket error %j', err);\n Socket.priorWebsocketSuccess = false;\n this.emit('error', err);\n this.onClose('transport error', err);\n};\n\n/**\n * Called upon transport close.\n *\n * @api private\n */\n\nSocket.prototype.onClose = function (reason, desc) {\n if ('opening' === this.readyState || 'open' === this.readyState || 'closing' === this.readyState) {\n debug('socket close with reason: \"%s\"', reason);\n var self = this;\n\n // clear timers\n clearTimeout(this.pingIntervalTimer);\n clearTimeout(this.pingTimeoutTimer);\n\n // stop event from firing again for transport\n this.transport.removeAllListeners('close');\n\n // ensure transport won't stay open\n this.transport.close();\n\n // ignore further transport communication\n this.transport.removeAllListeners();\n\n // set ready state\n this.readyState = 'closed';\n\n // clear session id\n this.id = null;\n\n // emit close event\n this.emit('close', reason, desc);\n\n // clean buffers after, so users can still\n // grab the buffers on `close` event\n self.writeBuffer = [];\n self.prevBufferLen = 0;\n }\n};\n\n/**\n * Filters upgrades, returning only those matching client transports.\n *\n * @param {Array} server upgrades\n * @api private\n *\n */\n\nSocket.prototype.filterUpgrades = function (upgrades) {\n var filteredUpgrades = [];\n for (var i = 0, j = upgrades.length; i < j; i++) {\n if (~index(this.transports, upgrades[i])) filteredUpgrades.push(upgrades[i]);\n }\n return filteredUpgrades;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/engine.io-client/lib/socket.js\n// module id = 32\n// module chunks = 0","/**\n * Module dependencies\n */\n\nvar XMLHttpRequest = require('xmlhttprequest-ssl');\nvar XHR = require('./polling-xhr');\nvar JSONP = require('./polling-jsonp');\nvar websocket = require('./websocket');\n\n/**\n * Export transports.\n */\n\nexports.polling = polling;\nexports.websocket = websocket;\n\n/**\n * Polling transport polymorphic constructor.\n * Decides on xhr vs jsonp based on feature detection.\n *\n * @api private\n */\n\nfunction polling (opts) {\n var xhr;\n var xd = false;\n var xs = false;\n var jsonp = false !== opts.jsonp;\n\n if (global.location) {\n var isSSL = 'https:' === location.protocol;\n var port = location.port;\n\n // some user agents have empty `location.port`\n if (!port) {\n port = isSSL ? 443 : 80;\n }\n\n xd = opts.hostname !== location.hostname || port !== opts.port;\n xs = opts.secure !== isSSL;\n }\n\n opts.xdomain = xd;\n opts.xscheme = xs;\n xhr = new XMLHttpRequest(opts);\n\n if ('open' in xhr && !opts.forceJSONP) {\n return new XHR(opts);\n } else {\n if (!jsonp) throw new Error('JSONP disabled');\n return new JSONP(opts);\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/engine.io-client/lib/transports/index.js\n// module id = 33\n// module chunks = 0","// browser shim for xmlhttprequest module\n\nvar hasCORS = require('has-cors');\n\nmodule.exports = function (opts) {\n var xdomain = opts.xdomain;\n\n // scheme must be same when usign XDomainRequest\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n var xscheme = opts.xscheme;\n\n // XDomainRequest has a flow of not sending cookie, therefore it should be disabled as a default.\n // https://github.com/Automattic/engine.io-client/pull/217\n var enablesXDR = opts.enablesXDR;\n\n // XMLHttpRequest can be disabled on IE\n try {\n if ('undefined' !== typeof XMLHttpRequest && (!xdomain || hasCORS)) {\n return new XMLHttpRequest();\n }\n } catch (e) { }\n\n // Use XDomainRequest for IE8 if enablesXDR is true\n // because loading bar keeps flashing when using jsonp-polling\n // https://github.com/yujiosaka/socke.io-ie8-loading-example\n try {\n if ('undefined' !== typeof XDomainRequest && !xscheme && enablesXDR) {\n return new XDomainRequest();\n }\n } catch (e) { }\n\n if (!xdomain) {\n try {\n return new global[['Active'].concat('Object').join('X')]('Microsoft.XMLHTTP');\n } catch (e) { }\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/engine.io-client/lib/xmlhttprequest.js\n// module id = 34\n// module chunks = 0","\n/**\n * Module exports.\n *\n * Logic borrowed from Modernizr:\n *\n * - https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cors.js\n */\n\ntry {\n module.exports = typeof XMLHttpRequest !== 'undefined' &&\n 'withCredentials' in new XMLHttpRequest();\n} catch (err) {\n // if XMLHttp support is disabled in IE then it will throw\n // when trying to create\n module.exports = false;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/has-cors/index.js\n// module id = 35\n// module chunks = 0","/**\n * Module requirements.\n */\n\nvar XMLHttpRequest = require('xmlhttprequest-ssl');\nvar Polling = require('./polling');\nvar Emitter = require('component-emitter');\nvar inherit = require('component-inherit');\nvar debug = require('debug')('engine.io-client:polling-xhr');\n\n/**\n * Module exports.\n */\n\nmodule.exports = XHR;\nmodule.exports.Request = Request;\n\n/**\n * Empty function\n */\n\nfunction empty () {}\n\n/**\n * XHR Polling constructor.\n *\n * @param {Object} opts\n * @api public\n */\n\nfunction XHR (opts) {\n Polling.call(this, opts);\n this.requestTimeout = opts.requestTimeout;\n this.extraHeaders = opts.extraHeaders;\n\n if (global.location) {\n var isSSL = 'https:' === location.protocol;\n var port = location.port;\n\n // some user agents have empty `location.port`\n if (!port) {\n port = isSSL ? 443 : 80;\n }\n\n this.xd = opts.hostname !== global.location.hostname ||\n port !== opts.port;\n this.xs = opts.secure !== isSSL;\n }\n}\n\n/**\n * Inherits from Polling.\n */\n\ninherit(XHR, Polling);\n\n/**\n * XHR supports binary\n */\n\nXHR.prototype.supportsBinary = true;\n\n/**\n * Creates a request.\n *\n * @param {String} method\n * @api private\n */\n\nXHR.prototype.request = function (opts) {\n opts = opts || {};\n opts.uri = this.uri();\n opts.xd = this.xd;\n opts.xs = this.xs;\n opts.agent = this.agent || false;\n opts.supportsBinary = this.supportsBinary;\n opts.enablesXDR = this.enablesXDR;\n\n // SSL options for Node.js client\n opts.pfx = this.pfx;\n opts.key = this.key;\n opts.passphrase = this.passphrase;\n opts.cert = this.cert;\n opts.ca = this.ca;\n opts.ciphers = this.ciphers;\n opts.rejectUnauthorized = this.rejectUnauthorized;\n opts.requestTimeout = this.requestTimeout;\n\n // other options for Node.js client\n opts.extraHeaders = this.extraHeaders;\n\n return new Request(opts);\n};\n\n/**\n * Sends data.\n *\n * @param {String} data to send.\n * @param {Function} called upon flush.\n * @api private\n */\n\nXHR.prototype.doWrite = function (data, fn) {\n var isBinary = typeof data !== 'string' && data !== undefined;\n var req = this.request({ method: 'POST', data: data, isBinary: isBinary });\n var self = this;\n req.on('success', fn);\n req.on('error', function (err) {\n self.onError('xhr post error', err);\n });\n this.sendXhr = req;\n};\n\n/**\n * Starts a poll cycle.\n *\n * @api private\n */\n\nXHR.prototype.doPoll = function () {\n debug('xhr poll');\n var req = this.request();\n var self = this;\n req.on('data', function (data) {\n self.onData(data);\n });\n req.on('error', function (err) {\n self.onError('xhr poll error', err);\n });\n this.pollXhr = req;\n};\n\n/**\n * Request constructor\n *\n * @param {Object} options\n * @api public\n */\n\nfunction Request (opts) {\n this.method = opts.method || 'GET';\n this.uri = opts.uri;\n this.xd = !!opts.xd;\n this.xs = !!opts.xs;\n this.async = false !== opts.async;\n this.data = undefined !== opts.data ? opts.data : null;\n this.agent = opts.agent;\n this.isBinary = opts.isBinary;\n this.supportsBinary = opts.supportsBinary;\n this.enablesXDR = opts.enablesXDR;\n this.requestTimeout = opts.requestTimeout;\n\n // SSL options for Node.js client\n this.pfx = opts.pfx;\n this.key = opts.key;\n this.passphrase = opts.passphrase;\n this.cert = opts.cert;\n this.ca = opts.ca;\n this.ciphers = opts.ciphers;\n this.rejectUnauthorized = opts.rejectUnauthorized;\n\n // other options for Node.js client\n this.extraHeaders = opts.extraHeaders;\n\n this.create();\n}\n\n/**\n * Mix in `Emitter`.\n */\n\nEmitter(Request.prototype);\n\n/**\n * Creates the XHR object and sends the request.\n *\n * @api private\n */\n\nRequest.prototype.create = function () {\n var opts = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR };\n\n // SSL options for Node.js client\n opts.pfx = this.pfx;\n opts.key = this.key;\n opts.passphrase = this.passphrase;\n opts.cert = this.cert;\n opts.ca = this.ca;\n opts.ciphers = this.ciphers;\n opts.rejectUnauthorized = this.rejectUnauthorized;\n\n var xhr = this.xhr = new XMLHttpRequest(opts);\n var self = this;\n\n try {\n debug('xhr open %s: %s', this.method, this.uri);\n xhr.open(this.method, this.uri, this.async);\n try {\n if (this.extraHeaders) {\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (var i in this.extraHeaders) {\n if (this.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this.extraHeaders[i]);\n }\n }\n }\n } catch (e) {}\n\n if ('POST' === this.method) {\n try {\n if (this.isBinary) {\n xhr.setRequestHeader('Content-type', 'application/octet-stream');\n } else {\n xhr.setRequestHeader('Content-type', 'text/plain;charset=UTF-8');\n }\n } catch (e) {}\n }\n\n try {\n xhr.setRequestHeader('Accept', '*/*');\n } catch (e) {}\n\n // ie6 check\n if ('withCredentials' in xhr) {\n xhr.withCredentials = true;\n }\n\n if (this.requestTimeout) {\n xhr.timeout = this.requestTimeout;\n }\n\n if (this.hasXDR()) {\n xhr.onload = function () {\n self.onLoad();\n };\n xhr.onerror = function () {\n self.onError(xhr.responseText);\n };\n } else {\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 2) {\n var contentType;\n try {\n contentType = xhr.getResponseHeader('Content-Type');\n } catch (e) {}\n if (contentType === 'application/octet-stream') {\n xhr.responseType = 'arraybuffer';\n }\n }\n if (4 !== xhr.readyState) return;\n if (200 === xhr.status || 1223 === xhr.status) {\n self.onLoad();\n } else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n setTimeout(function () {\n self.onError(xhr.status);\n }, 0);\n }\n };\n }\n\n debug('xhr data %s', this.data);\n xhr.send(this.data);\n } catch (e) {\n // Need to defer since .create() is called directly fhrom the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n setTimeout(function () {\n self.onError(e);\n }, 0);\n return;\n }\n\n if (global.document) {\n this.index = Request.requestsCount++;\n Request.requests[this.index] = this;\n }\n};\n\n/**\n * Called upon successful response.\n *\n * @api private\n */\n\nRequest.prototype.onSuccess = function () {\n this.emit('success');\n this.cleanup();\n};\n\n/**\n * Called if we have data.\n *\n * @api private\n */\n\nRequest.prototype.onData = function (data) {\n this.emit('data', data);\n this.onSuccess();\n};\n\n/**\n * Called upon error.\n *\n * @api private\n */\n\nRequest.prototype.onError = function (err) {\n this.emit('error', err);\n this.cleanup(true);\n};\n\n/**\n * Cleans up house.\n *\n * @api private\n */\n\nRequest.prototype.cleanup = function (fromError) {\n if ('undefined' === typeof this.xhr || null === this.xhr) {\n return;\n }\n // xmlhttprequest\n if (this.hasXDR()) {\n this.xhr.onload = this.xhr.onerror = empty;\n } else {\n this.xhr.onreadystatechange = empty;\n }\n\n if (fromError) {\n try {\n this.xhr.abort();\n } catch (e) {}\n }\n\n if (global.document) {\n delete Request.requests[this.index];\n }\n\n this.xhr = null;\n};\n\n/**\n * Called upon load.\n *\n * @api private\n */\n\nRequest.prototype.onLoad = function () {\n var data;\n try {\n var contentType;\n try {\n contentType = this.xhr.getResponseHeader('Content-Type');\n } catch (e) {}\n if (contentType === 'application/octet-stream') {\n data = this.xhr.response || this.xhr.responseText;\n } else {\n data = this.xhr.responseText;\n }\n } catch (e) {\n this.onError(e);\n }\n if (null != data) {\n this.onData(data);\n }\n};\n\n/**\n * Check if it has XDomainRequest.\n *\n * @api private\n */\n\nRequest.prototype.hasXDR = function () {\n return 'undefined' !== typeof global.XDomainRequest && !this.xs && this.enablesXDR;\n};\n\n/**\n * Aborts the request.\n *\n * @api public\n */\n\nRequest.prototype.abort = function () {\n this.cleanup();\n};\n\n/**\n * Aborts pending requests when unloading the window. This is needed to prevent\n * memory leaks (e.g. when using IE) and to ensure that no spurious error is\n * emitted.\n */\n\nRequest.requestsCount = 0;\nRequest.requests = {};\n\nif (global.document) {\n if (global.attachEvent) {\n global.attachEvent('onunload', unloadHandler);\n } else if (global.addEventListener) {\n global.addEventListener('beforeunload', unloadHandler, false);\n }\n}\n\nfunction unloadHandler () {\n for (var i in Request.requests) {\n if (Request.requests.hasOwnProperty(i)) {\n Request.requests[i].abort();\n }\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/engine.io-client/lib/transports/polling-xhr.js\n// module id = 36\n// module chunks = 0","/**\n * Module dependencies.\n */\n\nvar Transport = require('../transport');\nvar parseqs = require('parseqs');\nvar parser = require('engine.io-parser');\nvar inherit = require('component-inherit');\nvar yeast = require('yeast');\nvar debug = require('debug')('engine.io-client:polling');\n\n/**\n * Module exports.\n */\n\nmodule.exports = Polling;\n\n/**\n * Is XHR2 supported?\n */\n\nvar hasXHR2 = (function () {\n var XMLHttpRequest = require('xmlhttprequest-ssl');\n var xhr = new XMLHttpRequest({ xdomain: false });\n return null != xhr.responseType;\n})();\n\n/**\n * Polling interface.\n *\n * @param {Object} opts\n * @api private\n */\n\nfunction Polling (opts) {\n var forceBase64 = (opts && opts.forceBase64);\n if (!hasXHR2 || forceBase64) {\n this.supportsBinary = false;\n }\n Transport.call(this, opts);\n}\n\n/**\n * Inherits from Transport.\n */\n\ninherit(Polling, Transport);\n\n/**\n * Transport name.\n */\n\nPolling.prototype.name = 'polling';\n\n/**\n * Opens the socket (triggers polling). We write a PING message to determine\n * when the transport is open.\n *\n * @api private\n */\n\nPolling.prototype.doOpen = function () {\n this.poll();\n};\n\n/**\n * Pauses polling.\n *\n * @param {Function} callback upon buffers are flushed and transport is paused\n * @api private\n */\n\nPolling.prototype.pause = function (onPause) {\n var self = this;\n\n this.readyState = 'pausing';\n\n function pause () {\n debug('paused');\n self.readyState = 'paused';\n onPause();\n }\n\n if (this.polling || !this.writable) {\n var total = 0;\n\n if (this.polling) {\n debug('we are currently polling - waiting to pause');\n total++;\n this.once('pollComplete', function () {\n debug('pre-pause polling complete');\n --total || pause();\n });\n }\n\n if (!this.writable) {\n debug('we are currently writing - waiting to pause');\n total++;\n this.once('drain', function () {\n debug('pre-pause writing complete');\n --total || pause();\n });\n }\n } else {\n pause();\n }\n};\n\n/**\n * Starts polling cycle.\n *\n * @api public\n */\n\nPolling.prototype.poll = function () {\n debug('polling');\n this.polling = true;\n this.doPoll();\n this.emit('poll');\n};\n\n/**\n * Overloads onData to detect payloads.\n *\n * @api private\n */\n\nPolling.prototype.onData = function (data) {\n var self = this;\n debug('polling got data %s', data);\n var callback = function (packet, index, total) {\n // if its the first message we consider the transport open\n if ('opening' === self.readyState) {\n self.onOpen();\n }\n\n // if its a close packet, we close the ongoing requests\n if ('close' === packet.type) {\n self.onClose();\n return false;\n }\n\n // otherwise bypass onData and handle the message\n self.onPacket(packet);\n };\n\n // decode payload\n parser.decodePayload(data, this.socket.binaryType, callback);\n\n // if an event did not trigger closing\n if ('closed' !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emit('pollComplete');\n\n if ('open' === this.readyState) {\n this.poll();\n } else {\n debug('ignoring poll - transport state \"%s\"', this.readyState);\n }\n }\n};\n\n/**\n * For polling, send a close packet.\n *\n * @api private\n */\n\nPolling.prototype.doClose = function () {\n var self = this;\n\n function close () {\n debug('writing close packet');\n self.write([{ type: 'close' }]);\n }\n\n if ('open' === this.readyState) {\n debug('transport open - closing');\n close();\n } else {\n // in case we're trying to close while\n // handshaking is in progress (GH-164)\n debug('transport not open - deferring close');\n this.once('open', close);\n }\n};\n\n/**\n * Writes a packets payload.\n *\n * @param {Array} data packets\n * @param {Function} drain callback\n * @api private\n */\n\nPolling.prototype.write = function (packets) {\n var self = this;\n this.writable = false;\n var callbackfn = function () {\n self.writable = true;\n self.emit('drain');\n };\n\n parser.encodePayload(packets, this.supportsBinary, function (data) {\n self.doWrite(data, callbackfn);\n });\n};\n\n/**\n * Generates uri for connection.\n *\n * @api private\n */\n\nPolling.prototype.uri = function () {\n var query = this.query || {};\n var schema = this.secure ? 'https' : 'http';\n var port = '';\n\n // cache busting is forced\n if (false !== this.timestampRequests) {\n query[this.timestampParam] = yeast();\n }\n\n if (!this.supportsBinary && !query.sid) {\n query.b64 = 1;\n }\n\n query = parseqs.encode(query);\n\n // avoid port if default for schema\n if (this.port && (('https' === schema && Number(this.port) !== 443) ||\n ('http' === schema && Number(this.port) !== 80))) {\n port = ':' + this.port;\n }\n\n // prepend ? to query\n if (query.length) {\n query = '?' + query;\n }\n\n var ipv6 = this.hostname.indexOf(':') !== -1;\n return schema + '://' + (ipv6 ? '[' + this.hostname + ']' : this.hostname) + port + this.path + query;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/engine.io-client/lib/transports/polling.js\n// module id = 37\n// module chunks = 0","/**\n * Module dependencies.\n */\n\nvar parser = require('engine.io-parser');\nvar Emitter = require('component-emitter');\n\n/**\n * Module exports.\n */\n\nmodule.exports = Transport;\n\n/**\n * Transport abstract constructor.\n *\n * @param {Object} options.\n * @api private\n */\n\nfunction Transport (opts) {\n this.path = opts.path;\n this.hostname = opts.hostname;\n this.port = opts.port;\n this.secure = opts.secure;\n this.query = opts.query;\n this.timestampParam = opts.timestampParam;\n this.timestampRequests = opts.timestampRequests;\n this.readyState = '';\n this.agent = opts.agent || false;\n this.socket = opts.socket;\n this.enablesXDR = opts.enablesXDR;\n\n // SSL options for Node.js client\n this.pfx = opts.pfx;\n this.key = opts.key;\n this.passphrase = opts.passphrase;\n this.cert = opts.cert;\n this.ca = opts.ca;\n this.ciphers = opts.ciphers;\n this.rejectUnauthorized = opts.rejectUnauthorized;\n this.forceNode = opts.forceNode;\n\n // other options for Node.js client\n this.extraHeaders = opts.extraHeaders;\n this.localAddress = opts.localAddress;\n}\n\n/**\n * Mix in `Emitter`.\n */\n\nEmitter(Transport.prototype);\n\n/**\n * Emits an error.\n *\n * @param {String} str\n * @return {Transport} for chaining\n * @api public\n */\n\nTransport.prototype.onError = function (msg, desc) {\n var err = new Error(msg);\n err.type = 'TransportError';\n err.description = desc;\n this.emit('error', err);\n return this;\n};\n\n/**\n * Opens the transport.\n *\n * @api public\n */\n\nTransport.prototype.open = function () {\n if ('closed' === this.readyState || '' === this.readyState) {\n this.readyState = 'opening';\n this.doOpen();\n }\n\n return this;\n};\n\n/**\n * Closes the transport.\n *\n * @api private\n */\n\nTransport.prototype.close = function () {\n if ('opening' === this.readyState || 'open' === this.readyState) {\n this.doClose();\n this.onClose();\n }\n\n return this;\n};\n\n/**\n * Sends multiple packets.\n *\n * @param {Array} packets\n * @api private\n */\n\nTransport.prototype.send = function (packets) {\n if ('open' === this.readyState) {\n this.write(packets);\n } else {\n throw new Error('Transport not open');\n }\n};\n\n/**\n * Called upon open\n *\n * @api private\n */\n\nTransport.prototype.onOpen = function () {\n this.readyState = 'open';\n this.writable = true;\n this.emit('open');\n};\n\n/**\n * Called with data.\n *\n * @param {String} data\n * @api private\n */\n\nTransport.prototype.onData = function (data) {\n var packet = parser.decodePacket(data, this.socket.binaryType);\n this.onPacket(packet);\n};\n\n/**\n * Called with a decoded packet.\n */\n\nTransport.prototype.onPacket = function (packet) {\n this.emit('packet', packet);\n};\n\n/**\n * Called upon close.\n *\n * @api private\n */\n\nTransport.prototype.onClose = function () {\n this.readyState = 'closed';\n this.emit('close');\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/engine.io-client/lib/transport.js\n// module id = 38\n// module chunks = 0","/**\n * Module dependencies.\n */\n\nvar keys = require('./keys');\nvar hasBinary = require('has-binary2');\nvar sliceBuffer = require('arraybuffer.slice');\nvar after = require('after');\nvar utf8 = require('./utf8');\n\nvar base64encoder;\nif (global && global.ArrayBuffer) {\n base64encoder = require('base64-arraybuffer');\n}\n\n/**\n * Check if we are running an android browser. That requires us to use\n * ArrayBuffer with polling transports...\n *\n * http://ghinda.net/jpeg-blob-ajax-android/\n */\n\nvar isAndroid = typeof navigator !== 'undefined' && /Android/i.test(navigator.userAgent);\n\n/**\n * Check if we are running in PhantomJS.\n * Uploading a Blob with PhantomJS does not work correctly, as reported here:\n * https://github.com/ariya/phantomjs/issues/11395\n * @type boolean\n */\nvar isPhantomJS = typeof navigator !== 'undefined' && /PhantomJS/i.test(navigator.userAgent);\n\n/**\n * When true, avoids using Blobs to encode payloads.\n * @type boolean\n */\nvar dontSendBlobs = isAndroid || isPhantomJS;\n\n/**\n * Current protocol version.\n */\n\nexports.protocol = 3;\n\n/**\n * Packet types.\n */\n\nvar packets = exports.packets = {\n open: 0 // non-ws\n , close: 1 // non-ws\n , ping: 2\n , pong: 3\n , message: 4\n , upgrade: 5\n , noop: 6\n};\n\nvar packetslist = keys(packets);\n\n/**\n * Premade error packet.\n */\n\nvar err = { type: 'error', data: 'parser error' };\n\n/**\n * Create a blob api even for blob builder when vendor prefixes exist\n */\n\nvar Blob = require('blob');\n\n/**\n * Encodes a packet.\n *\n * <packet type id> [ <data> ]\n *\n * Example:\n *\n * 5hello world\n * 3\n * 4\n *\n * Binary is encoded in an identical principle\n *\n * @api private\n */\n\nexports.encodePacket = function (packet, supportsBinary, utf8encode, callback) {\n if (typeof supportsBinary === 'function') {\n callback = supportsBinary;\n supportsBinary = false;\n }\n\n if (typeof utf8encode === 'function') {\n callback = utf8encode;\n utf8encode = null;\n }\n\n var data = (packet.data === undefined)\n ? undefined\n : packet.data.buffer || packet.data;\n\n if (global.ArrayBuffer && data instanceof ArrayBuffer) {\n return encodeArrayBuffer(packet, supportsBinary, callback);\n } else if (Blob && data instanceof global.Blob) {\n return encodeBlob(packet, supportsBinary, callback);\n }\n\n // might be an object with { base64: true, data: dataAsBase64String }\n if (data && data.base64) {\n return encodeBase64Object(packet, callback);\n }\n\n // Sending data as a utf-8 string\n var encoded = packets[packet.type];\n\n // data fragment is optional\n if (undefined !== packet.data) {\n encoded += utf8encode ? utf8.encode(String(packet.data), { strict: false }) : String(packet.data);\n }\n\n return callback('' + encoded);\n\n};\n\nfunction encodeBase64Object(packet, callback) {\n // packet data is an object { base64: true, data: dataAsBase64String }\n var message = 'b' + exports.packets[packet.type] + packet.data.data;\n return callback(message);\n}\n\n/**\n * Encode packet helpers for binary types\n */\n\nfunction encodeArrayBuffer(packet, supportsBinary, callback) {\n if (!supportsBinary) {\n return exports.encodeBase64Packet(packet, callback);\n }\n\n var data = packet.data;\n var contentArray = new Uint8Array(data);\n var resultBuffer = new Uint8Array(1 + data.byteLength);\n\n resultBuffer[0] = packets[packet.type];\n for (var i = 0; i < contentArray.length; i++) {\n resultBuffer[i+1] = contentArray[i];\n }\n\n return callback(resultBuffer.buffer);\n}\n\nfunction encodeBlobAsArrayBuffer(packet, supportsBinary, callback) {\n if (!supportsBinary) {\n return exports.encodeBase64Packet(packet, callback);\n }\n\n var fr = new FileReader();\n fr.onload = function() {\n packet.data = fr.result;\n exports.encodePacket(packet, supportsBinary, true, callback);\n };\n return fr.readAsArrayBuffer(packet.data);\n}\n\nfunction encodeBlob(packet, supportsBinary, callback) {\n if (!supportsBinary) {\n return exports.encodeBase64Packet(packet, callback);\n }\n\n if (dontSendBlobs) {\n return encodeBlobAsArrayBuffer(packet, supportsBinary, callback);\n }\n\n var length = new Uint8Array(1);\n length[0] = packets[packet.type];\n var blob = new Blob([length.buffer, packet.data]);\n\n return callback(blob);\n}\n\n/**\n * Encodes a packet with binary data in a base64 string\n *\n * @param {Object} packet, has `type` and `data`\n * @return {String} base64 encoded message\n */\n\nexports.encodeBase64Packet = function(packet, callback) {\n var message = 'b' + exports.packets[packet.type];\n if (Blob && packet.data instanceof global.Blob) {\n var fr = new FileReader();\n fr.onload = function() {\n var b64 = fr.result.split(',')[1];\n callback(message + b64);\n };\n return fr.readAsDataURL(packet.data);\n }\n\n var b64data;\n try {\n b64data = String.fromCharCode.apply(null, new Uint8Array(packet.data));\n } catch (e) {\n // iPhone Safari doesn't let you apply with typed arrays\n var typed = new Uint8Array(packet.data);\n var basic = new Array(typed.length);\n for (var i = 0; i < typed.length; i++) {\n basic[i] = typed[i];\n }\n b64data = String.fromCharCode.apply(null, basic);\n }\n message += global.btoa(b64data);\n return callback(message);\n};\n\n/**\n * Decodes a packet. Changes format to Blob if requested.\n *\n * @return {Object} with `type` and `data` (if any)\n * @api private\n */\n\nexports.decodePacket = function (data, binaryType, utf8decode) {\n if (data === undefined) {\n return err;\n }\n // String data\n if (typeof data === 'string') {\n if (data.charAt(0) === 'b') {\n return exports.decodeBase64Packet(data.substr(1), binaryType);\n }\n\n if (utf8decode) {\n data = tryDecode(data);\n if (data === false) {\n return err;\n }\n }\n var type = data.charAt(0);\n\n if (Number(type) != type || !packetslist[type]) {\n return err;\n }\n\n if (data.length > 1) {\n return { type: packetslist[type], data: data.substring(1) };\n } else {\n return { type: packetslist[type] };\n }\n }\n\n var asArray = new Uint8Array(data);\n var type = asArray[0];\n var rest = sliceBuffer(data, 1);\n if (Blob && binaryType === 'blob') {\n rest = new Blob([rest]);\n }\n return { type: packetslist[type], data: rest };\n};\n\nfunction tryDecode(data) {\n try {\n data = utf8.decode(data, { strict: false });\n } catch (e) {\n return false;\n }\n return data;\n}\n\n/**\n * Decodes a packet encoded in a base64 string\n *\n * @param {String} base64 encoded message\n * @return {Object} with `type` and `data` (if any)\n */\n\nexports.decodeBase64Packet = function(msg, binaryType) {\n var type = packetslist[msg.charAt(0)];\n if (!base64encoder) {\n return { type: type, data: { base64: true, data: msg.substr(1) } };\n }\n\n var data = base64encoder.decode(msg.substr(1));\n\n if (binaryType === 'blob' && Blob) {\n data = new Blob([data]);\n }\n\n return { type: type, data: data };\n};\n\n/**\n * Encodes multiple messages (payload).\n *\n * <length>:data\n *\n * Example:\n *\n * 11:hello world2:hi\n *\n * If any contents are binary, they will be encoded as base64 strings. Base64\n * encoded strings are marked with a b before the length specifier\n *\n * @param {Array} packets\n * @api private\n */\n\nexports.encodePayload = function (packets, supportsBinary, callback) {\n if (typeof supportsBinary === 'function') {\n callback = supportsBinary;\n supportsBinary = null;\n }\n\n var isBinary = hasBinary(packets);\n\n if (supportsBinary && isBinary) {\n if (Blob && !dontSendBlobs) {\n return exports.encodePayloadAsBlob(packets, callback);\n }\n\n return exports.encodePayloadAsArrayBuffer(packets, callback);\n }\n\n if (!packets.length) {\n return callback('0:');\n }\n\n function setLengthHeader(message) {\n return message.length + ':' + message;\n }\n\n function encodeOne(packet, doneCallback) {\n exports.encodePacket(packet, !isBinary ? false : supportsBinary, false, function(message) {\n doneCallback(null, setLengthHeader(message));\n });\n }\n\n map(packets, encodeOne, function(err, results) {\n return callback(results.join(''));\n });\n};\n\n/**\n * Async array map using after\n */\n\nfunction map(ary, each, done) {\n var result = new Array(ary.length);\n var next = after(ary.length, done);\n\n var eachWithIndex = function(i, el, cb) {\n each(el, function(error, msg) {\n result[i] = msg;\n cb(error, result);\n });\n };\n\n for (var i = 0; i < ary.length; i++) {\n eachWithIndex(i, ary[i], next);\n }\n}\n\n/*\n * Decodes data when a payload is maybe expected. Possible binary contents are\n * decoded from their base64 representation\n *\n * @param {String} data, callback method\n * @api public\n */\n\nexports.decodePayload = function (data, binaryType, callback) {\n if (typeof data !== 'string') {\n return exports.decodePayloadAsBinary(data, binaryType, callback);\n }\n\n if (typeof binaryType === 'function') {\n callback = binaryType;\n binaryType = null;\n }\n\n var packet;\n if (data === '') {\n // parser error - ignoring payload\n return callback(err, 0, 1);\n }\n\n var length = '', n, msg;\n\n for (var i = 0, l = data.length; i < l; i++) {\n var chr = data.charAt(i);\n\n if (chr !== ':') {\n length += chr;\n continue;\n }\n\n if (length === '' || (length != (n = Number(length)))) {\n // parser error - ignoring payload\n return callback(err, 0, 1);\n }\n\n msg = data.substr(i + 1, n);\n\n if (length != msg.length) {\n // parser error - ignoring payload\n return callback(err, 0, 1);\n }\n\n if (msg.length) {\n packet = exports.decodePacket(msg, binaryType, false);\n\n if (err.type === packet.type && err.data === packet.data) {\n // parser error in individual packet - ignoring payload\n return callback(err, 0, 1);\n }\n\n var ret = callback(packet, i + n, l);\n if (false === ret) return;\n }\n\n // advance cursor\n i += n;\n length = '';\n }\n\n if (length !== '') {\n // parser error - ignoring payload\n return callback(err, 0, 1);\n }\n\n};\n\n/**\n * Encodes multiple messages (payload) as binary.\n *\n * <1 = binary, 0 = string><number from 0-9><number from 0-9>[...]<number\n * 255><data>\n *\n * Example:\n * 1 3 255 1 2 3, if the binary contents are interpreted as 8 bit integers\n *\n * @param {Array} packets\n * @return {ArrayBuffer} encoded payload\n * @api private\n */\n\nexports.encodePayloadAsArrayBuffer = function(packets, callback) {\n if (!packets.length) {\n return callback(new ArrayBuffer(0));\n }\n\n function encodeOne(packet, doneCallback) {\n exports.encodePacket(packet, true, true, function(data) {\n return doneCallback(null, data);\n });\n }\n\n map(packets, encodeOne, function(err, encodedPackets) {\n var totalLength = encodedPackets.reduce(function(acc, p) {\n var len;\n if (typeof p === 'string'){\n len = p.length;\n } else {\n len = p.byteLength;\n }\n return acc + len.toString().length + len + 2; // string/binary identifier + separator = 2\n }, 0);\n\n var resultArray = new Uint8Array(totalLength);\n\n var bufferIndex = 0;\n encodedPackets.forEach(function(p) {\n var isString = typeof p === 'string';\n var ab = p;\n if (isString) {\n var view = new Uint8Array(p.length);\n for (var i = 0; i < p.length; i++) {\n view[i] = p.charCodeAt(i);\n }\n ab = view.buffer;\n }\n\n if (isString) { // not true binary\n resultArray[bufferIndex++] = 0;\n } else { // true binary\n resultArray[bufferIndex++] = 1;\n }\n\n var lenStr = ab.byteLength.toString();\n for (var i = 0; i < lenStr.length; i++) {\n resultArray[bufferIndex++] = parseInt(lenStr[i]);\n }\n resultArray[bufferIndex++] = 255;\n\n var view = new Uint8Array(ab);\n for (var i = 0; i < view.length; i++) {\n resultArray[bufferIndex++] = view[i];\n }\n });\n\n return callback(resultArray.buffer);\n });\n};\n\n/**\n * Encode as Blob\n */\n\nexports.encodePayloadAsBlob = function(packets, callback) {\n function encodeOne(packet, doneCallback) {\n exports.encodePacket(packet, true, true, function(encoded) {\n var binaryIdentifier = new Uint8Array(1);\n binaryIdentifier[0] = 1;\n if (typeof encoded === 'string') {\n var view = new Uint8Array(encoded.length);\n for (var i = 0; i < encoded.length; i++) {\n view[i] = encoded.charCodeAt(i);\n }\n encoded = view.buffer;\n binaryIdentifier[0] = 0;\n }\n\n var len = (encoded instanceof ArrayBuffer)\n ? encoded.byteLength\n : encoded.size;\n\n var lenStr = len.toString();\n var lengthAry = new Uint8Array(lenStr.length + 1);\n for (var i = 0; i < lenStr.length; i++) {\n lengthAry[i] = parseInt(lenStr[i]);\n }\n lengthAry[lenStr.length] = 255;\n\n if (Blob) {\n var blob = new Blob([binaryIdentifier.buffer, lengthAry.buffer, encoded]);\n doneCallback(null, blob);\n }\n });\n }\n\n map(packets, encodeOne, function(err, results) {\n return callback(new Blob(results));\n });\n};\n\n/*\n * Decodes data when a payload is maybe expected. Strings are decoded by\n * interpreting each byte as a key code for entries marked to start with 0. See\n * description of encodePayloadAsBinary\n *\n * @param {ArrayBuffer} data, callback method\n * @api public\n */\n\nexports.decodePayloadAsBinary = function (data, binaryType, callback) {\n if (typeof binaryType === 'function') {\n callback = binaryType;\n binaryType = null;\n }\n\n var bufferTail = data;\n var buffers = [];\n\n while (bufferTail.byteLength > 0) {\n var tailArray = new Uint8Array(bufferTail);\n var isString = tailArray[0] === 0;\n var msgLength = '';\n\n for (var i = 1; ; i++) {\n if (tailArray[i] === 255) break;\n\n // 310 = char length of Number.MAX_VALUE\n if (msgLength.length > 310) {\n return callback(err, 0, 1);\n }\n\n msgLength += tailArray[i];\n }\n\n bufferTail = sliceBuffer(bufferTail, 2 + msgLength.length);\n msgLength = parseInt(msgLength);\n\n var msg = sliceBuffer(bufferTail, 0, msgLength);\n if (isString) {\n try {\n msg = String.fromCharCode.apply(null, new Uint8Array(msg));\n } catch (e) {\n // iPhone Safari doesn't let you apply to typed arrays\n var typed = new Uint8Array(msg);\n msg = '';\n for (var i = 0; i < typed.length; i++) {\n msg += String.fromCharCode(typed[i]);\n }\n }\n }\n\n buffers.push(msg);\n bufferTail = sliceBuffer(bufferTail, msgLength);\n }\n\n var total = buffers.length;\n buffers.forEach(function(buffer, i) {\n callback(exports.decodePacket(buffer, binaryType, true), i, total);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/engine.io-client/~/engine.io-parser/lib/browser.js\n// module id = 39\n// module chunks = 0","\n/**\n * Gets the keys for an object.\n *\n * @return {Array} keys\n * @api private\n */\n\nmodule.exports = Object.keys || function keys (obj){\n var arr = [];\n var has = Object.prototype.hasOwnProperty;\n\n for (var i in obj) {\n if (has.call(obj, i)) {\n arr.push(i);\n }\n }\n return arr;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/engine.io-client/~/engine.io-parser/lib/keys.js\n// module id = 40\n// module chunks = 0","/**\n * An abstraction for slicing an arraybuffer even when\n * ArrayBuffer.prototype.slice is not supported\n *\n * @api public\n */\n\nmodule.exports = function(arraybuffer, start, end) {\n var bytes = arraybuffer.byteLength;\n start = start || 0;\n end = end || bytes;\n\n if (arraybuffer.slice) { return arraybuffer.slice(start, end); }\n\n if (start < 0) { start += bytes; }\n if (end < 0) { end += bytes; }\n if (end > bytes) { end = bytes; }\n\n if (start >= bytes || start >= end || bytes === 0) {\n return new ArrayBuffer(0);\n }\n\n var abv = new Uint8Array(arraybuffer);\n var result = new Uint8Array(end - start);\n for (var i = start, ii = 0; i < end; i++, ii++) {\n result[ii] = abv[i];\n }\n return result.buffer;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/arraybuffer.slice/index.js\n// module id = 41\n// module chunks = 0","module.exports = after\n\nfunction after(count, callback, err_cb) {\n var bail = false\n err_cb = err_cb || noop\n proxy.count = count\n\n return (count === 0) ? callback() : proxy\n\n function proxy(err, result) {\n if (proxy.count <= 0) {\n throw new Error('after called too many times')\n }\n --proxy.count\n\n // after first error, rest are passed to err_cb\n if (err) {\n bail = true\n callback(err)\n // future error callbacks will go to error handler\n callback = err_cb\n } else if (proxy.count === 0 && !bail) {\n callback(null, result)\n }\n }\n}\n\nfunction noop() {}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/engine.io-client/~/after/index.js\n// module id = 42\n// module chunks = 0","/*! https://mths.be/utf8js v2.1.2 by @mathias */\n;(function(root) {\n\n\t// Detect free variables `exports`\n\tvar freeExports = typeof exports == 'object' && exports;\n\n\t// Detect free variable `module`\n\tvar freeModule = typeof module == 'object' && module &&\n\t\tmodule.exports == freeExports && module;\n\n\t// Detect free variable `global`, from Node.js or Browserified code,\n\t// and use it as `root`\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {\n\t\troot = freeGlobal;\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar stringFromCharCode = String.fromCharCode;\n\n\t// Taken from https://mths.be/punycode\n\tfunction ucs2decode(string) {\n\t\tvar output = [];\n\t\tvar counter = 0;\n\t\tvar length = string.length;\n\t\tvar value;\n\t\tvar extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t// Taken from https://mths.be/punycode\n\tfunction ucs2encode(array) {\n\t\tvar length = array.length;\n\t\tvar index = -1;\n\t\tvar value;\n\t\tvar output = '';\n\t\twhile (++index < length) {\n\t\t\tvalue = array[index];\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t}\n\t\treturn output;\n\t}\n\n\tfunction checkScalarValue(codePoint, strict) {\n\t\tif (codePoint >= 0xD800 && codePoint <= 0xDFFF) {\n\t\t\tif (strict) {\n\t\t\t\tthrow Error(\n\t\t\t\t\t'Lone surrogate U+' + codePoint.toString(16).toUpperCase() +\n\t\t\t\t\t' is not a scalar value'\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\t/*--------------------------------------------------------------------------*/\n\n\tfunction createByte(codePoint, shift) {\n\t\treturn stringFromCharCode(((codePoint >> shift) & 0x3F) | 0x80);\n\t}\n\n\tfunction encodeCodePoint(codePoint, strict) {\n\t\tif ((codePoint & 0xFFFFFF80) == 0) { // 1-byte sequence\n\t\t\treturn stringFromCharCode(codePoint);\n\t\t}\n\t\tvar symbol = '';\n\t\tif ((codePoint & 0xFFFFF800) == 0) { // 2-byte sequence\n\t\t\tsymbol = stringFromCharCode(((codePoint >> 6) & 0x1F) | 0xC0);\n\t\t}\n\t\telse if ((codePoint & 0xFFFF0000) == 0) { // 3-byte sequence\n\t\t\tif (!checkScalarValue(codePoint, strict)) {\n\t\t\t\tcodePoint = 0xFFFD;\n\t\t\t}\n\t\t\tsymbol = stringFromCharCode(((codePoint >> 12) & 0x0F) | 0xE0);\n\t\t\tsymbol += createByte(codePoint, 6);\n\t\t}\n\t\telse if ((codePoint & 0xFFE00000) == 0) { // 4-byte sequence\n\t\t\tsymbol = stringFromCharCode(((codePoint >> 18) & 0x07) | 0xF0);\n\t\t\tsymbol += createByte(codePoint, 12);\n\t\t\tsymbol += createByte(codePoint, 6);\n\t\t}\n\t\tsymbol += stringFromCharCode((codePoint & 0x3F) | 0x80);\n\t\treturn symbol;\n\t}\n\n\tfunction utf8encode(string, opts) {\n\t\topts = opts || {};\n\t\tvar strict = false !== opts.strict;\n\n\t\tvar codePoints = ucs2decode(string);\n\t\tvar length = codePoints.length;\n\t\tvar index = -1;\n\t\tvar codePoint;\n\t\tvar byteString = '';\n\t\twhile (++index < length) {\n\t\t\tcodePoint = codePoints[index];\n\t\t\tbyteString += encodeCodePoint(codePoint, strict);\n\t\t}\n\t\treturn byteString;\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\tfunction readContinuationByte() {\n\t\tif (byteIndex >= byteCount) {\n\t\t\tthrow Error('Invalid byte index');\n\t\t}\n\n\t\tvar continuationByte = byteArray[byteIndex] & 0xFF;\n\t\tbyteIndex++;\n\n\t\tif ((continuationByte & 0xC0) == 0x80) {\n\t\t\treturn continuationByte & 0x3F;\n\t\t}\n\n\t\t// If we end up here, its not a continuation byte\n\t\tthrow Error('Invalid continuation byte');\n\t}\n\n\tfunction decodeSymbol(strict) {\n\t\tvar byte1;\n\t\tvar byte2;\n\t\tvar byte3;\n\t\tvar byte4;\n\t\tvar codePoint;\n\n\t\tif (byteIndex > byteCount) {\n\t\t\tthrow Error('Invalid byte index');\n\t\t}\n\n\t\tif (byteIndex == byteCount) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Read first byte\n\t\tbyte1 = byteArray[byteIndex] & 0xFF;\n\t\tbyteIndex++;\n\n\t\t// 1-byte sequence (no continuation bytes)\n\t\tif ((byte1 & 0x80) == 0) {\n\t\t\treturn byte1;\n\t\t}\n\n\t\t// 2-byte sequence\n\t\tif ((byte1 & 0xE0) == 0xC0) {\n\t\t\tbyte2 = readContinuationByte();\n\t\t\tcodePoint = ((byte1 & 0x1F) << 6) | byte2;\n\t\t\tif (codePoint >= 0x80) {\n\t\t\t\treturn codePoint;\n\t\t\t} else {\n\t\t\t\tthrow Error('Invalid continuation byte');\n\t\t\t}\n\t\t}\n\n\t\t// 3-byte sequence (may include unpaired surrogates)\n\t\tif ((byte1 & 0xF0) == 0xE0) {\n\t\t\tbyte2 = readContinuationByte();\n\t\t\tbyte3 = readContinuationByte();\n\t\t\tcodePoint = ((byte1 & 0x0F) << 12) | (byte2 << 6) | byte3;\n\t\t\tif (codePoint >= 0x0800) {\n\t\t\t\treturn checkScalarValue(codePoint, strict) ? codePoint : 0xFFFD;\n\t\t\t} else {\n\t\t\t\tthrow Error('Invalid continuation byte');\n\t\t\t}\n\t\t}\n\n\t\t// 4-byte sequence\n\t\tif ((byte1 & 0xF8) == 0xF0) {\n\t\t\tbyte2 = readContinuationByte();\n\t\t\tbyte3 = readContinuationByte();\n\t\t\tbyte4 = readContinuationByte();\n\t\t\tcodePoint = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0C) |\n\t\t\t\t(byte3 << 0x06) | byte4;\n\t\t\tif (codePoint >= 0x010000 && codePoint <= 0x10FFFF) {\n\t\t\t\treturn codePoint;\n\t\t\t}\n\t\t}\n\n\t\tthrow Error('Invalid UTF-8 detected');\n\t}\n\n\tvar byteArray;\n\tvar byteCount;\n\tvar byteIndex;\n\tfunction utf8decode(byteString, opts) {\n\t\topts = opts || {};\n\t\tvar strict = false !== opts.strict;\n\n\t\tbyteArray = ucs2decode(byteString);\n\t\tbyteCount = byteArray.length;\n\t\tbyteIndex = 0;\n\t\tvar codePoints = [];\n\t\tvar tmp;\n\t\twhile ((tmp = decodeSymbol(strict)) !== false) {\n\t\t\tcodePoints.push(tmp);\n\t\t}\n\t\treturn ucs2encode(codePoints);\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar utf8 = {\n\t\t'version': '2.1.2',\n\t\t'encode': utf8encode,\n\t\t'decode': utf8decode\n\t};\n\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine(function() {\n\t\t\treturn utf8;\n\t\t});\n\t}\telse if (freeExports && !freeExports.nodeType) {\n\t\tif (freeModule) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = utf8;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tvar object = {};\n\t\t\tvar hasOwnProperty = object.hasOwnProperty;\n\t\t\tfor (var key in utf8) {\n\t\t\t\thasOwnProperty.call(utf8, key) && (freeExports[key] = utf8[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.utf8 = utf8;\n\t}\n\n}(this));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/engine.io-client/~/engine.io-parser/lib/utf8.js\n// module id = 43\n// module chunks = 0","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tmodule.children = [];\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n}\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = 44\n// module chunks = 0","/*\n * base64-arraybuffer\n * https://github.com/niklasvh/base64-arraybuffer\n *\n * Copyright (c) 2012 Niklas von Hertzen\n * Licensed under the MIT license.\n */\n(function(){\n \"use strict\";\n\n var chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\n // Use a lookup table to find the index.\n var lookup = new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n\n exports.encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer),\n i, len = bytes.length, base64 = \"\";\n\n for (i = 0; i < len; i+=3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n\n if ((len % 3) === 2) {\n base64 = base64.substring(0, base64.length - 1) + \"=\";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + \"==\";\n }\n\n return base64;\n };\n\n exports.decode = function(base64) {\n var bufferLength = base64.length * 0.75,\n len = base64.length, i, p = 0,\n encoded1, encoded2, encoded3, encoded4;\n\n if (base64[base64.length - 1] === \"=\") {\n bufferLength--;\n if (base64[base64.length - 2] === \"=\") {\n bufferLength--;\n }\n }\n\n var arraybuffer = new ArrayBuffer(bufferLength),\n bytes = new Uint8Array(arraybuffer);\n\n for (i = 0; i < len; i+=4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i+1)];\n encoded3 = lookup[base64.charCodeAt(i+2)];\n encoded4 = lookup[base64.charCodeAt(i+3)];\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return arraybuffer;\n };\n})();\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/base64-arraybuffer/lib/base64-arraybuffer.js\n// module id = 45\n// module chunks = 0","/**\n * Create a blob builder even when vendor prefixes exist\n */\n\nvar BlobBuilder = global.BlobBuilder\n || global.WebKitBlobBuilder\n || global.MSBlobBuilder\n || global.MozBlobBuilder;\n\n/**\n * Check if Blob constructor is supported\n */\n\nvar blobSupported = (function() {\n try {\n var a = new Blob(['hi']);\n return a.size === 2;\n } catch(e) {\n return false;\n }\n})();\n\n/**\n * Check if Blob constructor supports ArrayBufferViews\n * Fails in Safari 6, so we need to map to ArrayBuffers there.\n */\n\nvar blobSupportsArrayBufferView = blobSupported && (function() {\n try {\n var b = new Blob([new Uint8Array([1,2])]);\n return b.size === 2;\n } catch(e) {\n return false;\n }\n})();\n\n/**\n * Check if BlobBuilder is supported\n */\n\nvar blobBuilderSupported = BlobBuilder\n && BlobBuilder.prototype.append\n && BlobBuilder.prototype.getBlob;\n\n/**\n * Helper function that maps ArrayBufferViews to ArrayBuffers\n * Used by BlobBuilder constructor and old browsers that didn't\n * support it in the Blob constructor.\n */\n\nfunction mapArrayBufferViews(ary) {\n for (var i = 0; i < ary.length; i++) {\n var chunk = ary[i];\n if (chunk.buffer instanceof ArrayBuffer) {\n var buf = chunk.buffer;\n\n // if this is a subarray, make a copy so we only\n // include the subarray region from the underlying buffer\n if (chunk.byteLength !== buf.byteLength) {\n var copy = new Uint8Array(chunk.byteLength);\n copy.set(new Uint8Array(buf, chunk.byteOffset, chunk.byteLength));\n buf = copy.buffer;\n }\n\n ary[i] = buf;\n }\n }\n}\n\nfunction BlobBuilderConstructor(ary, options) {\n options = options || {};\n\n var bb = new BlobBuilder();\n mapArrayBufferViews(ary);\n\n for (var i = 0; i < ary.length; i++) {\n bb.append(ary[i]);\n }\n\n return (options.type) ? bb.getBlob(options.type) : bb.getBlob();\n};\n\nfunction BlobConstructor(ary, options) {\n mapArrayBufferViews(ary);\n return new Blob(ary, options || {});\n};\n\nmodule.exports = (function() {\n if (blobSupported) {\n return blobSupportsArrayBufferView ? global.Blob : BlobConstructor;\n } else if (blobBuilderSupported) {\n return BlobBuilderConstructor;\n } else {\n return undefined;\n }\n})();\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/blob/index.js\n// module id = 46\n// module chunks = 0","/**\r\n * Compiles a querystring\r\n * Returns string representation of the object\r\n *\r\n * @param {Object}\r\n * @api private\r\n */\r\n\r\nexports.encode = function (obj) {\r\n var str = '';\r\n\r\n for (var i in obj) {\r\n if (obj.hasOwnProperty(i)) {\r\n if (str.length) str += '&';\r\n str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]);\r\n }\r\n }\r\n\r\n return str;\r\n};\r\n\r\n/**\r\n * Parses a simple querystring into an object\r\n *\r\n * @param {String} qs\r\n * @api private\r\n */\r\n\r\nexports.decode = function(qs){\r\n var qry = {};\r\n var pairs = qs.split('&');\r\n for (var i = 0, l = pairs.length; i < l; i++) {\r\n var pair = pairs[i].split('=');\r\n qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);\r\n }\r\n return qry;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/parseqs/index.js\n// module id = 47\n// module chunks = 0","\nmodule.exports = function(a, b){\n var fn = function(){};\n fn.prototype = b.prototype;\n a.prototype = new fn;\n a.prototype.constructor = a;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/component-inherit/index.js\n// module id = 48\n// module chunks = 0","'use strict';\n\nvar alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split('')\n , length = 64\n , map = {}\n , seed = 0\n , i = 0\n , prev;\n\n/**\n * Return a string representing the specified number.\n *\n * @param {Number} num The number to convert.\n * @returns {String} The string representation of the number.\n * @api public\n */\nfunction encode(num) {\n var encoded = '';\n\n do {\n encoded = alphabet[num % length] + encoded;\n num = Math.floor(num / length);\n } while (num > 0);\n\n return encoded;\n}\n\n/**\n * Return the integer value specified by the given string.\n *\n * @param {String} str The string to convert.\n * @returns {Number} The integer value represented by the string.\n * @api public\n */\nfunction decode(str) {\n var decoded = 0;\n\n for (i = 0; i < str.length; i++) {\n decoded = decoded * length + map[str.charAt(i)];\n }\n\n return decoded;\n}\n\n/**\n * Yeast: A tiny growing id generator.\n *\n * @returns {String} A unique id.\n * @api public\n */\nfunction yeast() {\n var now = encode(+new Date());\n\n if (now !== prev) return seed = 0, prev = now;\n return now +'.'+ encode(seed++);\n}\n\n//\n// Map each character to its index.\n//\nfor (; i < length; i++) map[alphabet[i]] = i;\n\n//\n// Expose the `yeast`, `encode` and `decode` functions.\n//\nyeast.encode = encode;\nyeast.decode = decode;\nmodule.exports = yeast;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/yeast/index.js\n// module id = 49\n// module chunks = 0","/**\n * This is the web browser implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = require('./debug');\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = 'undefined' != typeof chrome\n && 'undefined' != typeof chrome.storage\n ? chrome.storage.local\n : localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n 'lightseagreen',\n 'forestgreen',\n 'goldenrod',\n 'dodgerblue',\n 'darkorchid',\n 'crimson'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\nfunction useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nexports.formatters.j = function(v) {\n try {\n return JSON.stringify(v);\n } catch (err) {\n return '[UnexpectedJSONParseError]: ' + err.message;\n }\n};\n\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return;\n\n var c = 'color: ' + this.color;\n args.splice(1, 0, c, 'color: inherit')\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-zA-Z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\nfunction log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console\n && console.log\n && Function.prototype.apply.call(console.log, console, arguments);\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n try {\n if (null == namespaces) {\n exports.storage.removeItem('debug');\n } else {\n exports.storage.debug = namespaces;\n }\n } catch(e) {}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n var r;\n try {\n r = exports.storage.debug;\n } catch(e) {}\n\n // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n if (!r && typeof process !== 'undefined' && 'env' in process) {\n r = process.env.DEBUG;\n }\n\n return r;\n}\n\n/**\n * Enable namespaces listed in `localStorage.debug` initially.\n */\n\nexports.enable(load());\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n try {\n return window.localStorage;\n } catch (e) {}\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/engine.io-client/~/debug/src/browser.js\n// module id = 50\n// module chunks = 0","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = createDebug.debug = createDebug['default'] = createDebug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\nexports.humanize = require('ms');\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\nexports.formatters = {};\n\n/**\n * Previous log timestamp.\n */\n\nvar prevTime;\n\n/**\n * Select a color.\n * @param {String} namespace\n * @return {Number}\n * @api private\n */\n\nfunction selectColor(namespace) {\n var hash = 0, i;\n\n for (i in namespace) {\n hash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n\n return exports.colors[Math.abs(hash) % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction createDebug(namespace) {\n\n function debug() {\n // disabled?\n if (!debug.enabled) return;\n\n var self = debug;\n\n // set `diff` timestamp\n var curr = +new Date();\n var ms = curr - (prevTime || curr);\n self.diff = ms;\n self.prev = prevTime;\n self.curr = curr;\n prevTime = curr;\n\n // turn the `arguments` into a proper Array\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n args[0] = exports.coerce(args[0]);\n\n if ('string' !== typeof args[0]) {\n // anything else let's inspect with %O\n args.unshift('%O');\n }\n\n // apply any `formatters` transformations\n var index = 0;\n args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {\n // if we encounter an escaped % then don't increase the array index\n if (match === '%%') return match;\n index++;\n var formatter = exports.formatters[format];\n if ('function' === typeof formatter) {\n var val = args[index];\n match = formatter.call(self, val);\n\n // now we need to remove `args[index]` since it's inlined in the `format`\n args.splice(index, 1);\n index--;\n }\n return match;\n });\n\n // apply env-specific formatting (colors, etc.)\n exports.formatArgs.call(self, args);\n\n var logFn = debug.log || exports.log || console.log.bind(console);\n logFn.apply(self, args);\n }\n\n debug.namespace = namespace;\n debug.enabled = exports.enabled(namespace);\n debug.useColors = exports.useColors();\n debug.color = selectColor(namespace);\n\n // env-specific initialization logic for debug instances\n if ('function' === typeof exports.init) {\n exports.init(debug);\n }\n\n return debug;\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n exports.save(namespaces);\n\n exports.names = [];\n exports.skips = [];\n\n var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n var len = split.length;\n\n for (var i = 0; i < len; i++) {\n if (!split[i]) continue; // ignore empty strings\n namespaces = split[i].replace(/\\*/g, '.*?');\n if (namespaces[0] === '-') {\n exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n exports.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n var i, len;\n for (i = 0, len = exports.skips.length; i < len; i++) {\n if (exports.skips[i].test(name)) {\n return false;\n }\n }\n for (i = 0, len = exports.names.length; i < len; i++) {\n if (exports.names[i].test(name)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n if (val instanceof Error) return val.stack || val.message;\n return val;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/engine.io-client/~/debug/src/debug.js\n// module id = 51\n// module chunks = 0","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isNaN(val) === false) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n if (ms >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (ms >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (ms >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (ms >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n return plural(ms, d, 'day') ||\n plural(ms, h, 'hour') ||\n plural(ms, m, 'minute') ||\n plural(ms, s, 'second') ||\n ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, n, name) {\n if (ms < n) {\n return;\n }\n if (ms < n * 1.5) {\n return Math.floor(ms / n) + ' ' + name;\n }\n return Math.ceil(ms / n) + ' ' + name + 's';\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/engine.io-client/~/ms/index.js\n// module id = 52\n// module chunks = 0","\n/**\n * Module requirements.\n */\n\nvar Polling = require('./polling');\nvar inherit = require('component-inherit');\n\n/**\n * Module exports.\n */\n\nmodule.exports = JSONPPolling;\n\n/**\n * Cached regular expressions.\n */\n\nvar rNewline = /\\n/g;\nvar rEscapedNewline = /\\\\n/g;\n\n/**\n * Global JSONP callbacks.\n */\n\nvar callbacks;\n\n/**\n * Noop.\n */\n\nfunction empty () { }\n\n/**\n * JSONP Polling constructor.\n *\n * @param {Object} opts.\n * @api public\n */\n\nfunction JSONPPolling (opts) {\n Polling.call(this, opts);\n\n this.query = this.query || {};\n\n // define global callbacks array if not present\n // we do this here (lazily) to avoid unneeded global pollution\n if (!callbacks) {\n // we need to consider multiple engines in the same page\n if (!global.___eio) global.___eio = [];\n callbacks = global.___eio;\n }\n\n // callback identifier\n this.index = callbacks.length;\n\n // add callback to jsonp global\n var self = this;\n callbacks.push(function (msg) {\n self.onData(msg);\n });\n\n // append to query string\n this.query.j = this.index;\n\n // prevent spurious errors from being emitted when the window is unloaded\n if (global.document && global.addEventListener) {\n global.addEventListener('beforeunload', function () {\n if (self.script) self.script.onerror = empty;\n }, false);\n }\n}\n\n/**\n * Inherits from Polling.\n */\n\ninherit(JSONPPolling, Polling);\n\n/*\n * JSONP only supports binary as base64 encoded strings\n */\n\nJSONPPolling.prototype.supportsBinary = false;\n\n/**\n * Closes the socket.\n *\n * @api private\n */\n\nJSONPPolling.prototype.doClose = function () {\n if (this.script) {\n this.script.parentNode.removeChild(this.script);\n this.script = null;\n }\n\n if (this.form) {\n this.form.parentNode.removeChild(this.form);\n this.form = null;\n this.iframe = null;\n }\n\n Polling.prototype.doClose.call(this);\n};\n\n/**\n * Starts a poll cycle.\n *\n * @api private\n */\n\nJSONPPolling.prototype.doPoll = function () {\n var self = this;\n var script = document.createElement('script');\n\n if (this.script) {\n this.script.parentNode.removeChild(this.script);\n this.script = null;\n }\n\n script.async = true;\n script.src = this.uri();\n script.onerror = function (e) {\n self.onError('jsonp poll error', e);\n };\n\n var insertAt = document.getElementsByTagName('script')[0];\n if (insertAt) {\n insertAt.parentNode.insertBefore(script, insertAt);\n } else {\n (document.head || document.body).appendChild(script);\n }\n this.script = script;\n\n var isUAgecko = 'undefined' !== typeof navigator && /gecko/i.test(navigator.userAgent);\n\n if (isUAgecko) {\n setTimeout(function () {\n var iframe = document.createElement('iframe');\n document.body.appendChild(iframe);\n document.body.removeChild(iframe);\n }, 100);\n }\n};\n\n/**\n * Writes with a hidden iframe.\n *\n * @param {String} data to send\n * @param {Function} called upon flush.\n * @api private\n */\n\nJSONPPolling.prototype.doWrite = function (data, fn) {\n var self = this;\n\n if (!this.form) {\n var form = document.createElement('form');\n var area = document.createElement('textarea');\n var id = this.iframeId = 'eio_iframe_' + this.index;\n var iframe;\n\n form.className = 'socketio';\n form.style.position = 'absolute';\n form.style.top = '-1000px';\n form.style.left = '-1000px';\n form.target = id;\n form.method = 'POST';\n form.setAttribute('accept-charset', 'utf-8');\n area.name = 'd';\n form.appendChild(area);\n document.body.appendChild(form);\n\n this.form = form;\n this.area = area;\n }\n\n this.form.action = this.uri();\n\n function complete () {\n initIframe();\n fn();\n }\n\n function initIframe () {\n if (self.iframe) {\n try {\n self.form.removeChild(self.iframe);\n } catch (e) {\n self.onError('jsonp polling iframe removal error', e);\n }\n }\n\n try {\n // ie6 dynamic iframes with target=\"\" support (thanks Chris Lambacher)\n var html = '<iframe src=\"javascript:0\" name=\"' + self.iframeId + '\">';\n iframe = document.createElement(html);\n } catch (e) {\n iframe = document.createElement('iframe');\n iframe.name = self.iframeId;\n iframe.src = 'javascript:0';\n }\n\n iframe.id = self.iframeId;\n\n self.form.appendChild(iframe);\n self.iframe = iframe;\n }\n\n initIframe();\n\n // escape \\n to prevent it from being converted into \\r\\n by some UAs\n // double escaping is required for escaped new lines because unescaping of new lines can be done safely on server-side\n data = data.replace(rEscapedNewline, '\\\\\\n');\n this.area.value = data.replace(rNewline, '\\\\n');\n\n try {\n this.form.submit();\n } catch (e) {}\n\n if (this.iframe.attachEvent) {\n this.iframe.onreadystatechange = function () {\n if (self.iframe.readyState === 'complete') {\n complete();\n }\n };\n } else {\n this.iframe.onload = complete;\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/engine.io-client/lib/transports/polling-jsonp.js\n// module id = 53\n// module chunks = 0","/**\n * Module dependencies.\n */\n\nvar Transport = require('../transport');\nvar parser = require('engine.io-parser');\nvar parseqs = require('parseqs');\nvar inherit = require('component-inherit');\nvar yeast = require('yeast');\nvar debug = require('debug')('engine.io-client:websocket');\nvar BrowserWebSocket = global.WebSocket || global.MozWebSocket;\nvar NodeWebSocket;\nif (typeof window === 'undefined') {\n try {\n NodeWebSocket = require('ws');\n } catch (e) { }\n}\n\n/**\n * Get either the `WebSocket` or `MozWebSocket` globals\n * in the browser or try to resolve WebSocket-compatible\n * interface exposed by `ws` for Node-like environment.\n */\n\nvar WebSocket = BrowserWebSocket;\nif (!WebSocket && typeof window === 'undefined') {\n WebSocket = NodeWebSocket;\n}\n\n/**\n * Module exports.\n */\n\nmodule.exports = WS;\n\n/**\n * WebSocket transport constructor.\n *\n * @api {Object} connection options\n * @api public\n */\n\nfunction WS (opts) {\n var forceBase64 = (opts && opts.forceBase64);\n if (forceBase64) {\n this.supportsBinary = false;\n }\n this.perMessageDeflate = opts.perMessageDeflate;\n this.usingBrowserWebSocket = BrowserWebSocket && !opts.forceNode;\n this.protocols = opts.protocols;\n if (!this.usingBrowserWebSocket) {\n WebSocket = NodeWebSocket;\n }\n Transport.call(this, opts);\n}\n\n/**\n * Inherits from Transport.\n */\n\ninherit(WS, Transport);\n\n/**\n * Transport name.\n *\n * @api public\n */\n\nWS.prototype.name = 'websocket';\n\n/*\n * WebSockets support binary\n */\n\nWS.prototype.supportsBinary = true;\n\n/**\n * Opens socket.\n *\n * @api private\n */\n\nWS.prototype.doOpen = function () {\n if (!this.check()) {\n // let probe timeout\n return;\n }\n\n var uri = this.uri();\n var protocols = this.protocols;\n var opts = {\n agent: this.agent,\n perMessageDeflate: this.perMessageDeflate\n };\n\n // SSL options for Node.js client\n opts.pfx = this.pfx;\n opts.key = this.key;\n opts.passphrase = this.passphrase;\n opts.cert = this.cert;\n opts.ca = this.ca;\n opts.ciphers = this.ciphers;\n opts.rejectUnauthorized = this.rejectUnauthorized;\n if (this.extraHeaders) {\n opts.headers = this.extraHeaders;\n }\n if (this.localAddress) {\n opts.localAddress = this.localAddress;\n }\n\n try {\n this.ws = this.usingBrowserWebSocket ? (protocols ? new WebSocket(uri, protocols) : new WebSocket(uri)) : new WebSocket(uri, protocols, opts);\n } catch (err) {\n return this.emit('error', err);\n }\n\n if (this.ws.binaryType === undefined) {\n this.supportsBinary = false;\n }\n\n if (this.ws.supports && this.ws.supports.binary) {\n this.supportsBinary = true;\n this.ws.binaryType = 'nodebuffer';\n } else {\n this.ws.binaryType = 'arraybuffer';\n }\n\n this.addEventListeners();\n};\n\n/**\n * Adds event listeners to the socket\n *\n * @api private\n */\n\nWS.prototype.addEventListeners = function () {\n var self = this;\n\n this.ws.onopen = function () {\n self.onOpen();\n };\n this.ws.onclose = function () {\n self.onClose();\n };\n this.ws.onmessage = function (ev) {\n self.onData(ev.data);\n };\n this.ws.onerror = function (e) {\n self.onError('websocket error', e);\n };\n};\n\n/**\n * Writes data to socket.\n *\n * @param {Array} array of packets.\n * @api private\n */\n\nWS.prototype.write = function (packets) {\n var self = this;\n this.writable = false;\n\n // encodePacket efficient as it uses WS framing\n // no need for encodePayload\n var total = packets.length;\n for (var i = 0, l = total; i < l; i++) {\n (function (packet) {\n parser.encodePacket(packet, self.supportsBinary, function (data) {\n if (!self.usingBrowserWebSocket) {\n // always create a new object (GH-437)\n var opts = {};\n if (packet.options) {\n opts.compress = packet.options.compress;\n }\n\n if (self.perMessageDeflate) {\n var len = 'string' === typeof data ? global.Buffer.byteLength(data) : data.length;\n if (len < self.perMessageDeflate.threshold) {\n opts.compress = false;\n }\n }\n }\n\n // Sometimes the websocket has already been closed but the browser didn't\n // have a chance of informing us about it yet, in that case send will\n // throw an error\n try {\n if (self.usingBrowserWebSocket) {\n // TypeError is thrown when passing the second argument on Safari\n self.ws.send(data);\n } else {\n self.ws.send(data, opts);\n }\n } catch (e) {\n debug('websocket closed before onclose event');\n }\n\n --total || done();\n });\n })(packets[i]);\n }\n\n function done () {\n self.emit('flush');\n\n // fake drain\n // defer to next tick to allow Socket to clear writeBuffer\n setTimeout(function () {\n self.writable = true;\n self.emit('drain');\n }, 0);\n }\n};\n\n/**\n * Called upon close\n *\n * @api private\n */\n\nWS.prototype.onClose = function () {\n Transport.prototype.onClose.call(this);\n};\n\n/**\n * Closes socket.\n *\n * @api private\n */\n\nWS.prototype.doClose = function () {\n if (typeof this.ws !== 'undefined') {\n this.ws.close();\n }\n};\n\n/**\n * Generates uri for connection.\n *\n * @api private\n */\n\nWS.prototype.uri = function () {\n var query = this.query || {};\n var schema = this.secure ? 'wss' : 'ws';\n var port = '';\n\n // avoid port if default for schema\n if (this.port && (('wss' === schema && Number(this.port) !== 443) ||\n ('ws' === schema && Number(this.port) !== 80))) {\n port = ':' + this.port;\n }\n\n // append timestamp to URI\n if (this.timestampRequests) {\n query[this.timestampParam] = yeast();\n }\n\n // communicate binary support capabilities\n if (!this.supportsBinary) {\n query.b64 = 1;\n }\n\n query = parseqs.encode(query);\n\n // prepend ? to query\n if (query.length) {\n query = '?' + query;\n }\n\n var ipv6 = this.hostname.indexOf(':') !== -1;\n return schema + '://' + (ipv6 ? '[' + this.hostname + ']' : this.hostname) + port + this.path + query;\n};\n\n/**\n * Feature detection for WebSocket.\n *\n * @return {Boolean} whether this transport is available.\n * @api public\n */\n\nWS.prototype.check = function () {\n return !!WebSocket && !('__initialize' in WebSocket && this.name === WS.prototype.name);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/engine.io-client/lib/transports/websocket.js\n// module id = 54\n// module chunks = 0","\nvar indexOf = [].indexOf;\n\nmodule.exports = function(arr, obj){\n if (indexOf) return arr.indexOf(obj);\n for (var i = 0; i < arr.length; ++i) {\n if (arr[i] === obj) return i;\n }\n return -1;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/indexof/index.js\n// module id = 56\n// module chunks = 0","/**\r\n * Parses an URI\r\n *\r\n * @author Steven Levithan <stevenlevithan.com> (MIT license)\r\n * @api private\r\n */\r\n\r\nvar re = /^(?:(?![^:@]+:[^:@\\/]*@)(http|https|ws|wss):\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/;\r\n\r\nvar parts = [\r\n 'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'\r\n];\r\n\r\nmodule.exports = function parseuri(str) {\r\n var src = str,\r\n b = str.indexOf('['),\r\n e = str.indexOf(']');\r\n\r\n if (b != -1 && e != -1) {\r\n str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length);\r\n }\r\n\r\n var m = re.exec(str || ''),\r\n uri = {},\r\n i = 14;\r\n\r\n while (i--) {\r\n uri[parts[i]] = m[i] || '';\r\n }\r\n\r\n if (b != -1 && e != -1) {\r\n uri.source = src;\r\n uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':');\r\n uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':');\r\n uri.ipv6uri = true;\r\n }\r\n\r\n return uri;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/engine.io-client/~/parseuri/index.js\n// module id = 57\n// module chunks = 0","\n/**\n * Module dependencies.\n */\n\nvar parser = require('socket.io-parser');\nvar Emitter = require('component-emitter');\nvar toArray = require('to-array');\nvar on = require('./on');\nvar bind = require('component-bind');\nvar debug = require('debug')('socket.io-client:socket');\nvar parseqs = require('parseqs');\n\n/**\n * Module exports.\n */\n\nmodule.exports = exports = Socket;\n\n/**\n * Internal events (blacklisted).\n * These events can't be emitted by the user.\n *\n * @api private\n */\n\nvar events = {\n connect: 1,\n connect_error: 1,\n connect_timeout: 1,\n connecting: 1,\n disconnect: 1,\n error: 1,\n reconnect: 1,\n reconnect_attempt: 1,\n reconnect_failed: 1,\n reconnect_error: 1,\n reconnecting: 1,\n ping: 1,\n pong: 1\n};\n\n/**\n * Shortcut to `Emitter#emit`.\n */\n\nvar emit = Emitter.prototype.emit;\n\n/**\n * `Socket` constructor.\n *\n * @api public\n */\n\nfunction Socket (io, nsp, opts) {\n this.io = io;\n this.nsp = nsp;\n this.json = this; // compat\n this.ids = 0;\n this.acks = {};\n this.receiveBuffer = [];\n this.sendBuffer = [];\n this.connected = false;\n this.disconnected = true;\n if (opts && opts.query) {\n this.query = opts.query;\n }\n if (this.io.autoConnect) this.open();\n}\n\n/**\n * Mix in `Emitter`.\n */\n\nEmitter(Socket.prototype);\n\n/**\n * Subscribe to open, close and packet events\n *\n * @api private\n */\n\nSocket.prototype.subEvents = function () {\n if (this.subs) return;\n\n var io = this.io;\n this.subs = [\n on(io, 'open', bind(this, 'onopen')),\n on(io, 'packet', bind(this, 'onpacket')),\n on(io, 'close', bind(this, 'onclose'))\n ];\n};\n\n/**\n * \"Opens\" the socket.\n *\n * @api public\n */\n\nSocket.prototype.open =\nSocket.prototype.connect = function () {\n if (this.connected) return this;\n\n this.subEvents();\n this.io.open(); // ensure open\n if ('open' === this.io.readyState) this.onopen();\n this.emit('connecting');\n return this;\n};\n\n/**\n * Sends a `message` event.\n *\n * @return {Socket} self\n * @api public\n */\n\nSocket.prototype.send = function () {\n var args = toArray(arguments);\n args.unshift('message');\n this.emit.apply(this, args);\n return this;\n};\n\n/**\n * Override `emit`.\n * If the event is in `events`, it's emitted normally.\n *\n * @param {String} event name\n * @return {Socket} self\n * @api public\n */\n\nSocket.prototype.emit = function (ev) {\n if (events.hasOwnProperty(ev)) {\n emit.apply(this, arguments);\n return this;\n }\n\n var args = toArray(arguments);\n var packet = { type: parser.EVENT, data: args };\n\n packet.options = {};\n packet.options.compress = !this.flags || false !== this.flags.compress;\n\n // event ack callback\n if ('function' === typeof args[args.length - 1]) {\n debug('emitting packet with ack id %d', this.ids);\n this.acks[this.ids] = args.pop();\n packet.id = this.ids++;\n }\n\n if (this.connected) {\n this.packet(packet);\n } else {\n this.sendBuffer.push(packet);\n }\n\n delete this.flags;\n\n return this;\n};\n\n/**\n * Sends a packet.\n *\n * @param {Object} packet\n * @api private\n */\n\nSocket.prototype.packet = function (packet) {\n packet.nsp = this.nsp;\n this.io.packet(packet);\n};\n\n/**\n * Called upon engine `open`.\n *\n * @api private\n */\n\nSocket.prototype.onopen = function () {\n debug('transport is open - connecting');\n\n // write connect packet if necessary\n if ('/' !== this.nsp) {\n if (this.query) {\n var query = typeof this.query === 'object' ? parseqs.encode(this.query) : this.query;\n debug('sending connect packet with query %s', query);\n this.packet({type: parser.CONNECT, query: query});\n } else {\n this.packet({type: parser.CONNECT});\n }\n }\n};\n\n/**\n * Called upon engine `close`.\n *\n * @param {String} reason\n * @api private\n */\n\nSocket.prototype.onclose = function (reason) {\n debug('close (%s)', reason);\n this.connected = false;\n this.disconnected = true;\n delete this.id;\n this.emit('disconnect', reason);\n};\n\n/**\n * Called with socket packet.\n *\n * @param {Object} packet\n * @api private\n */\n\nSocket.prototype.onpacket = function (packet) {\n if (packet.nsp !== this.nsp) return;\n\n switch (packet.type) {\n case parser.CONNECT:\n this.onconnect();\n break;\n\n case parser.EVENT:\n this.onevent(packet);\n break;\n\n case parser.BINARY_EVENT:\n this.onevent(packet);\n break;\n\n case parser.ACK:\n this.onack(packet);\n break;\n\n case parser.BINARY_ACK:\n this.onack(packet);\n break;\n\n case parser.DISCONNECT:\n this.ondisconnect();\n break;\n\n case parser.ERROR:\n this.emit('error', packet.data);\n break;\n }\n};\n\n/**\n * Called upon a server event.\n *\n * @param {Object} packet\n * @api private\n */\n\nSocket.prototype.onevent = function (packet) {\n var args = packet.data || [];\n debug('emitting event %j', args);\n\n if (null != packet.id) {\n debug('attaching ack callback to event');\n args.push(this.ack(packet.id));\n }\n\n if (this.connected) {\n emit.apply(this, args);\n } else {\n this.receiveBuffer.push(args);\n }\n};\n\n/**\n * Produces an ack callback to emit with an event.\n *\n * @api private\n */\n\nSocket.prototype.ack = function (id) {\n var self = this;\n var sent = false;\n return function () {\n // prevent double callbacks\n if (sent) return;\n sent = true;\n var args = toArray(arguments);\n debug('sending ack %j', args);\n\n self.packet({\n type: parser.ACK,\n id: id,\n data: args\n });\n };\n};\n\n/**\n * Called upon a server acknowlegement.\n *\n * @param {Object} packet\n * @api private\n */\n\nSocket.prototype.onack = function (packet) {\n var ack = this.acks[packet.id];\n if ('function' === typeof ack) {\n debug('calling ack %s with %j', packet.id, packet.data);\n ack.apply(this, packet.data);\n delete this.acks[packet.id];\n } else {\n debug('bad ack %s', packet.id);\n }\n};\n\n/**\n * Called upon server connect.\n *\n * @api private\n */\n\nSocket.prototype.onconnect = function () {\n this.connected = true;\n this.disconnected = false;\n this.emit('connect');\n this.emitBuffered();\n};\n\n/**\n * Emit buffered events (received and emitted).\n *\n * @api private\n */\n\nSocket.prototype.emitBuffered = function () {\n var i;\n for (i = 0; i < this.receiveBuffer.length; i++) {\n emit.apply(this, this.receiveBuffer[i]);\n }\n this.receiveBuffer = [];\n\n for (i = 0; i < this.sendBuffer.length; i++) {\n this.packet(this.sendBuffer[i]);\n }\n this.sendBuffer = [];\n};\n\n/**\n * Called upon server disconnect.\n *\n * @api private\n */\n\nSocket.prototype.ondisconnect = function () {\n debug('server disconnect (%s)', this.nsp);\n this.destroy();\n this.onclose('io server disconnect');\n};\n\n/**\n * Called upon forced client/server side disconnections,\n * this method ensures the manager stops tracking us and\n * that reconnections don't get triggered for this.\n *\n * @api private.\n */\n\nSocket.prototype.destroy = function () {\n if (this.subs) {\n // clean subscriptions to avoid reconnections\n for (var i = 0; i < this.subs.length; i++) {\n this.subs[i].destroy();\n }\n this.subs = null;\n }\n\n this.io.destroy(this);\n};\n\n/**\n * Disconnects the socket manually.\n *\n * @return {Socket} self\n * @api public\n */\n\nSocket.prototype.close =\nSocket.prototype.disconnect = function () {\n if (this.connected) {\n debug('performing disconnect (%s)', this.nsp);\n this.packet({ type: parser.DISCONNECT });\n }\n\n // remove socket from pool\n this.destroy();\n\n if (this.connected) {\n // fire events\n this.onclose('io client disconnect');\n }\n return this;\n};\n\n/**\n * Sets the compress flag.\n *\n * @param {Boolean} if `true`, compresses the sending data\n * @return {Socket} self\n * @api public\n */\n\nSocket.prototype.compress = function (compress) {\n this.flags = this.flags || {};\n this.flags.compress = compress;\n return this;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/socket.io-client/lib/socket.js\n// module id = 58\n// module chunks = 0","module.exports = toArray\n\nfunction toArray(list, index) {\n var array = []\n\n index = index || 0\n\n for (var i = index || 0; i < list.length; i++) {\n array[i - index] = list[i]\n }\n\n return array\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/to-array/index.js\n// module id = 59\n// module chunks = 0","\n/**\n * Module exports.\n */\n\nmodule.exports = on;\n\n/**\n * Helper for subscriptions.\n *\n * @param {Object|EventEmitter} obj with `Emitter` mixin or `EventEmitter`\n * @param {String} event name\n * @param {Function} callback\n * @api public\n */\n\nfunction on (obj, ev, fn) {\n obj.on(ev, fn);\n return {\n destroy: function () {\n obj.removeListener(ev, fn);\n }\n };\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/socket.io-client/lib/on.js\n// module id = 60\n// module chunks = 0","/**\n * Slice reference.\n */\n\nvar slice = [].slice;\n\n/**\n * Bind `obj` to `fn`.\n *\n * @param {Object} obj\n * @param {Function|String} fn or string\n * @return {Function}\n * @api public\n */\n\nmodule.exports = function(obj, fn){\n if ('string' == typeof fn) fn = obj[fn];\n if ('function' != typeof fn) throw new Error('bind() requires a function');\n var args = slice.call(arguments, 2);\n return function(){\n return fn.apply(obj, args.concat(slice.call(arguments)));\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/component-bind/index.js\n// module id = 61\n// module chunks = 0","\n/**\n * Expose `Backoff`.\n */\n\nmodule.exports = Backoff;\n\n/**\n * Initialize backoff timer with `opts`.\n *\n * - `min` initial timeout in milliseconds [100]\n * - `max` max timeout [10000]\n * - `jitter` [0]\n * - `factor` [2]\n *\n * @param {Object} opts\n * @api public\n */\n\nfunction Backoff(opts) {\n opts = opts || {};\n this.ms = opts.min || 100;\n this.max = opts.max || 10000;\n this.factor = opts.factor || 2;\n this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0;\n this.attempts = 0;\n}\n\n/**\n * Return the backoff duration.\n *\n * @return {Number}\n * @api public\n */\n\nBackoff.prototype.duration = function(){\n var ms = this.ms * Math.pow(this.factor, this.attempts++);\n if (this.jitter) {\n var rand = Math.random();\n var deviation = Math.floor(rand * this.jitter * ms);\n ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation;\n }\n return Math.min(ms, this.max) | 0;\n};\n\n/**\n * Reset the number of attempts.\n *\n * @api public\n */\n\nBackoff.prototype.reset = function(){\n this.attempts = 0;\n};\n\n/**\n * Set the minimum duration\n *\n * @api public\n */\n\nBackoff.prototype.setMin = function(min){\n this.ms = min;\n};\n\n/**\n * Set the maximum duration\n *\n * @api public\n */\n\nBackoff.prototype.setMax = function(max){\n this.max = max;\n};\n\n/**\n * Set the jitter\n *\n * @api public\n */\n\nBackoff.prototype.setJitter = function(jitter){\n this.jitter = jitter;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/backo2/index.js\n// module id = 62\n// module chunks = 0","/**\n * @type {angular}\n */\nvar app = require(\"../module\");\n\napp.service(\"Pages\", [\"pagesConfig\", \"$location\", ContentSections]);\n\n/**\n * @param pagesConfig\n * @param $location\n * @returns {{enable: Function, transform: Function, current: Function}}\n * @constructor\n */\nfunction ContentSections(pagesConfig, $location) {\n\n return {\n /**\n * Enable a single Item\n * @param $section\n * @returns {*}\n */\n enable: function ($section) {\n angular.forEach(pagesConfig, function (item) {\n item.active = false;\n });\n $section.active = true;\n return pagesConfig;\n },\n /**\n * Transform an item\n */\n transform: function ($section, fn) {\n if (typeof fn === \"function\") {\n return $section = fn($section);\n } else {\n throw new TypeError(\"Noooo\");\n }\n },\n /**\n * Get the current section based on the path\n * @returns {*}\n */\n current: function () {\n if ($location.path() === \"/\") {\n return pagesConfig[\"overview\"];\n }\n var match;\n angular.forEach(pagesConfig, function (item) {\n if (item.path === $location.path()) {\n match = item;\n }\n });\n return match;\n }\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./services/Pages.js\n// module id = 63\n// module chunks = 0","/**\n * @type {angular}\n */\nmodule.exports = window.angular.module(\"BrowserSync\");\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./module.js\n// module id = 64\n// module chunks = 0","var app = require(\"../module\");\n\napp.factory(\"Options\", [\"Socket\", OptionsService]);\n\n/**\n * @param Socket\n * @returns {{all: Function}}\n * @constructor\n */\nfunction OptionsService(Socket) {\n\n return {\n all: function () {\n return Socket.getData(\"options\");\n }\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./services/Options.js\n// module id = 65\n// module chunks = 0","var angular = require('../angular');\nvar store = require('store');\nvar objectPath = require('object-path');\n\nangular\n .module(\"bsStore\", [])\n .service(\"Store\", [\"$q\", \"$rootScope\", StoreModule]);\n\nfunction Store (ns) {\n var bs = store.get('bs', {});\n if (!Object.keys(bs).length) {\n store.set('bs', {});\n }\n this.ns = ns;\n this.get = function (path) {\n var bs = store.get('bs', {});\n if (!Object.keys(bs).length) {\n store.set('bs', {});\n }\n return objectPath.get(bs, [ns].concat(path).join('.'));\n };\n this.set = function (path, value) {\n var bs = store.get('bs', {});\n if (!Object.keys(bs).length) {\n store.set('bs', {});\n }\n if (!bs[ns]) {\n bs[ns] = {};\n }\n bs[ns][path] = value;\n store.set('bs', bs);\n },\n this.remove = function (path) {\n var bs = store.get('bs', {});\n if (!Object.keys(bs).length) {\n store.set('bs', {});\n }\n if (!bs[ns]) {\n bs[ns] = {};\n }\n if (bs[ns][path]) {\n delete bs[ns][path];\n }\n store.set('bs', bs);\n }\n}\n\nfunction StoreModule () {\n\n return {\n create: function (ns) {\n var store = new Store(ns);\n return store;\n }\n }\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./modules/bsStore.js\n// module id = 66\n// module chunks = 0","\"use strict\"\n// Module export pattern from\n// https://github.com/umdjs/umd/blob/master/returnExports.js\n;(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define([], factory);\n } else if (typeof exports === 'object') {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory();\n } else {\n // Browser globals (root is window)\n root.store = factory();\n }\n}(this, function () {\n\t\n\t// Store.js\n\tvar store = {},\n\t\twin = (typeof window != 'undefined' ? window : global),\n\t\tdoc = win.document,\n\t\tlocalStorageName = 'localStorage',\n\t\tscriptTag = 'script',\n\t\tstorage\n\n\tstore.disabled = false\n\tstore.version = '1.3.20'\n\tstore.set = function(key, value) {}\n\tstore.get = function(key, defaultVal) {}\n\tstore.has = function(key) { return store.get(key) !== undefined }\n\tstore.remove = function(key) {}\n\tstore.clear = function() {}\n\tstore.transact = function(key, defaultVal, transactionFn) {\n\t\tif (transactionFn == null) {\n\t\t\ttransactionFn = defaultVal\n\t\t\tdefaultVal = null\n\t\t}\n\t\tif (defaultVal == null) {\n\t\t\tdefaultVal = {}\n\t\t}\n\t\tvar val = store.get(key, defaultVal)\n\t\ttransactionFn(val)\n\t\tstore.set(key, val)\n\t}\n\tstore.getAll = function() {}\n\tstore.forEach = function() {}\n\n\tstore.serialize = function(value) {\n\t\treturn JSON.stringify(value)\n\t}\n\tstore.deserialize = function(value) {\n\t\tif (typeof value != 'string') { return undefined }\n\t\ttry { return JSON.parse(value) }\n\t\tcatch(e) { return value || undefined }\n\t}\n\n\t// Functions to encapsulate questionable FireFox 3.6.13 behavior\n\t// when about.config::dom.storage.enabled === false\n\t// See https://github.com/marcuswestin/store.js/issues#issue/13\n\tfunction isLocalStorageNameSupported() {\n\t\ttry { return (localStorageName in win && win[localStorageName]) }\n\t\tcatch(err) { return false }\n\t}\n\n\tif (isLocalStorageNameSupported()) {\n\t\tstorage = win[localStorageName]\n\t\tstore.set = function(key, val) {\n\t\t\tif (val === undefined) { return store.remove(key) }\n\t\t\tstorage.setItem(key, store.serialize(val))\n\t\t\treturn val\n\t\t}\n\t\tstore.get = function(key, defaultVal) {\n\t\t\tvar val = store.deserialize(storage.getItem(key))\n\t\t\treturn (val === undefined ? defaultVal : val)\n\t\t}\n\t\tstore.remove = function(key) { storage.removeItem(key) }\n\t\tstore.clear = function() { storage.clear() }\n\t\tstore.getAll = function() {\n\t\t\tvar ret = {}\n\t\t\tstore.forEach(function(key, val) {\n\t\t\t\tret[key] = val\n\t\t\t})\n\t\t\treturn ret\n\t\t}\n\t\tstore.forEach = function(callback) {\n\t\t\tfor (var i=0; i<storage.length; i++) {\n\t\t\t\tvar key = storage.key(i)\n\t\t\t\tcallback(key, store.get(key))\n\t\t\t}\n\t\t}\n\t} else if (doc && doc.documentElement.addBehavior) {\n\t\tvar storageOwner,\n\t\t\tstorageContainer\n\t\t// Since #userData storage applies only to specific paths, we need to\n\t\t// somehow link our data to a specific path. We choose /favicon.ico\n\t\t// as a pretty safe option, since all browsers already make a request to\n\t\t// this URL anyway and being a 404 will not hurt us here. We wrap an\n\t\t// iframe pointing to the favicon in an ActiveXObject(htmlfile) object\n\t\t// (see: http://msdn.microsoft.com/en-us/library/aa752574(v=VS.85).aspx)\n\t\t// since the iframe access rules appear to allow direct access and\n\t\t// manipulation of the document element, even for a 404 page. This\n\t\t// document can be used instead of the current document (which would\n\t\t// have been limited to the current path) to perform #userData storage.\n\t\ttry {\n\t\t\tstorageContainer = new ActiveXObject('htmlfile')\n\t\t\tstorageContainer.open()\n\t\t\tstorageContainer.write('<'+scriptTag+'>document.w=window</'+scriptTag+'><iframe src=\"/favicon.ico\"></iframe>')\n\t\t\tstorageContainer.close()\n\t\t\tstorageOwner = storageContainer.w.frames[0].document\n\t\t\tstorage = storageOwner.createElement('div')\n\t\t} catch(e) {\n\t\t\t// somehow ActiveXObject instantiation failed (perhaps some special\n\t\t\t// security settings or otherwse), fall back to per-path storage\n\t\t\tstorage = doc.createElement('div')\n\t\t\tstorageOwner = doc.body\n\t\t}\n\t\tvar withIEStorage = function(storeFunction) {\n\t\t\treturn function() {\n\t\t\t\tvar args = Array.prototype.slice.call(arguments, 0)\n\t\t\t\targs.unshift(storage)\n\t\t\t\t// See http://msdn.microsoft.com/en-us/library/ms531081(v=VS.85).aspx\n\t\t\t\t// and http://msdn.microsoft.com/en-us/library/ms531424(v=VS.85).aspx\n\t\t\t\tstorageOwner.appendChild(storage)\n\t\t\t\tstorage.addBehavior('#default#userData')\n\t\t\t\tstorage.load(localStorageName)\n\t\t\t\tvar result = storeFunction.apply(store, args)\n\t\t\t\tstorageOwner.removeChild(storage)\n\t\t\t\treturn result\n\t\t\t}\n\t\t}\n\n\t\t// In IE7, keys cannot start with a digit or contain certain chars.\n\t\t// See https://github.com/marcuswestin/store.js/issues/40\n\t\t// See https://github.com/marcuswestin/store.js/issues/83\n\t\tvar forbiddenCharsRegex = new RegExp(\"[!\\\"#$%&'()*+,/\\\\\\\\:;<=>?@[\\\\]^`{|}~]\", \"g\")\n\t\tvar ieKeyFix = function(key) {\n\t\t\treturn key.replace(/^d/, '___$&').replace(forbiddenCharsRegex, '___')\n\t\t}\n\t\tstore.set = withIEStorage(function(storage, key, val) {\n\t\t\tkey = ieKeyFix(key)\n\t\t\tif (val === undefined) { return store.remove(key) }\n\t\t\tstorage.setAttribute(key, store.serialize(val))\n\t\t\tstorage.save(localStorageName)\n\t\t\treturn val\n\t\t})\n\t\tstore.get = withIEStorage(function(storage, key, defaultVal) {\n\t\t\tkey = ieKeyFix(key)\n\t\t\tvar val = store.deserialize(storage.getAttribute(key))\n\t\t\treturn (val === undefined ? defaultVal : val)\n\t\t})\n\t\tstore.remove = withIEStorage(function(storage, key) {\n\t\t\tkey = ieKeyFix(key)\n\t\t\tstorage.removeAttribute(key)\n\t\t\tstorage.save(localStorageName)\n\t\t})\n\t\tstore.clear = withIEStorage(function(storage) {\n\t\t\tvar attributes = storage.XMLDocument.documentElement.attributes\n\t\t\tstorage.load(localStorageName)\n\t\t\tfor (var i=attributes.length-1; i>=0; i--) {\n\t\t\t\tstorage.removeAttribute(attributes[i].name)\n\t\t\t}\n\t\t\tstorage.save(localStorageName)\n\t\t})\n\t\tstore.getAll = function(storage) {\n\t\t\tvar ret = {}\n\t\t\tstore.forEach(function(key, val) {\n\t\t\t\tret[key] = val\n\t\t\t})\n\t\t\treturn ret\n\t\t}\n\t\tstore.forEach = withIEStorage(function(storage, callback) {\n\t\t\tvar attributes = storage.XMLDocument.documentElement.attributes\n\t\t\tfor (var i=0, attr; attr=attributes[i]; ++i) {\n\t\t\t\tcallback(attr.name, store.deserialize(storage.getAttribute(attr.name)))\n\t\t\t}\n\t\t})\n\t}\n\n\ttry {\n\t\tvar testKey = '__storejs__'\n\t\tstore.set(testKey, testKey)\n\t\tif (store.get(testKey) != testKey) { store.disabled = true }\n\t\tstore.remove(testKey)\n\t} catch(e) {\n\t\tstore.disabled = true\n\t}\n\tstore.enabled = !store.disabled\n\t\n\treturn store\n}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/store/store.js\n// module id = 67\n// module chunks = 0","(function (root, factory){\n 'use strict';\n\n /*istanbul ignore next:cant test*/\n if (typeof module === 'object' && typeof module.exports === 'object') {\n module.exports = factory();\n } else if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define([], factory);\n } else {\n // Browser globals\n root.objectPath = factory();\n }\n})(this, function(){\n 'use strict';\n\n var\n toStr = Object.prototype.toString,\n _hasOwnProperty = Object.prototype.hasOwnProperty;\n\n function isEmpty(value){\n if (!value) {\n return true;\n }\n if (isArray(value) && value.length === 0) {\n return true;\n } else if (!isString(value)) {\n for (var i in value) {\n if (_hasOwnProperty.call(value, i)) {\n return false;\n }\n }\n return true;\n }\n return false;\n }\n\n function toString(type){\n return toStr.call(type);\n }\n\n function isNumber(value){\n return typeof value === 'number' || toString(value) === \"[object Number]\";\n }\n\n function isString(obj){\n return typeof obj === 'string' || toString(obj) === \"[object String]\";\n }\n\n function isObject(obj){\n return typeof obj === 'object' && toString(obj) === \"[object Object]\";\n }\n\n function isArray(obj){\n return typeof obj === 'object' && typeof obj.length === 'number' && toString(obj) === '[object Array]';\n }\n\n function isBoolean(obj){\n return typeof obj === 'boolean' || toString(obj) === '[object Boolean]';\n }\n\n function getKey(key){\n var intKey = parseInt(key);\n if (intKey.toString() === key) {\n return intKey;\n }\n return key;\n }\n\n function set(obj, path, value, doNotReplace){\n if (isNumber(path)) {\n path = [path];\n }\n if (isEmpty(path)) {\n return obj;\n }\n if (isString(path)) {\n return set(obj, path.split('.').map(getKey), value, doNotReplace);\n }\n var currentPath = path[0];\n\n if (path.length === 1) {\n var oldVal = obj[currentPath];\n if (oldVal === void 0 || !doNotReplace) {\n obj[currentPath] = value;\n }\n return oldVal;\n }\n\n if (obj[currentPath] === void 0) {\n //check if we assume an array\n if(isNumber(path[1])) {\n obj[currentPath] = [];\n } else {\n obj[currentPath] = {};\n }\n }\n\n return set(obj[currentPath], path.slice(1), value, doNotReplace);\n }\n\n function del(obj, path) {\n if (isNumber(path)) {\n path = [path];\n }\n\n if (isEmpty(obj)) {\n return void 0;\n }\n\n if (isEmpty(path)) {\n return obj;\n }\n if(isString(path)) {\n return del(obj, path.split('.'));\n }\n\n var currentPath = getKey(path[0]);\n var oldVal = obj[currentPath];\n\n if(path.length === 1) {\n if (oldVal !== void 0) {\n if (isArray(obj)) {\n obj.splice(currentPath, 1);\n } else {\n delete obj[currentPath];\n }\n }\n } else {\n if (obj[currentPath] !== void 0) {\n return del(obj[currentPath], path.slice(1));\n }\n }\n\n return obj;\n }\n\n var objectPath = function(obj) {\n return Object.keys(objectPath).reduce(function(proxy, prop) {\n if (typeof objectPath[prop] === 'function') {\n proxy[prop] = objectPath[prop].bind(objectPath, obj);\n }\n\n return proxy;\n }, {});\n };\n\n objectPath.has = function (obj, path) {\n if (isEmpty(obj)) {\n return false;\n }\n\n if (isNumber(path)) {\n path = [path];\n } else if (isString(path)) {\n path = path.split('.');\n }\n\n if (isEmpty(path) || path.length === 0) {\n return false;\n }\n\n for (var i = 0; i < path.length; i++) {\n var j = path[i];\n if ((isObject(obj) || isArray(obj)) && _hasOwnProperty.call(obj, j)) {\n obj = obj[j];\n } else {\n return false;\n }\n }\n\n return true;\n };\n\n objectPath.ensureExists = function (obj, path, value){\n return set(obj, path, value, true);\n };\n\n objectPath.set = function (obj, path, value, doNotReplace){\n return set(obj, path, value, doNotReplace);\n };\n\n objectPath.insert = function (obj, path, value, at){\n var arr = objectPath.get(obj, path);\n at = ~~at;\n if (!isArray(arr)) {\n arr = [];\n objectPath.set(obj, path, arr);\n }\n arr.splice(at, 0, value);\n };\n\n objectPath.empty = function(obj, path) {\n if (isEmpty(path)) {\n return obj;\n }\n if (isEmpty(obj)) {\n return void 0;\n }\n\n var value, i;\n if (!(value = objectPath.get(obj, path))) {\n return obj;\n }\n\n if (isString(value)) {\n return objectPath.set(obj, path, '');\n } else if (isBoolean(value)) {\n return objectPath.set(obj, path, false);\n } else if (isNumber(value)) {\n return objectPath.set(obj, path, 0);\n } else if (isArray(value)) {\n value.length = 0;\n } else if (isObject(value)) {\n for (i in value) {\n if (_hasOwnProperty.call(value, i)) {\n delete value[i];\n }\n }\n } else {\n return objectPath.set(obj, path, null);\n }\n };\n\n objectPath.push = function (obj, path /*, values */){\n var arr = objectPath.get(obj, path);\n if (!isArray(arr)) {\n arr = [];\n objectPath.set(obj, path, arr);\n }\n\n arr.push.apply(arr, Array.prototype.slice.call(arguments, 2));\n };\n\n objectPath.coalesce = function (obj, paths, defaultValue) {\n var value;\n\n for (var i = 0, len = paths.length; i < len; i++) {\n if ((value = objectPath.get(obj, paths[i])) !== void 0) {\n return value;\n }\n }\n\n return defaultValue;\n };\n\n objectPath.get = function (obj, path, defaultValue){\n if (isNumber(path)) {\n path = [path];\n }\n if (isEmpty(path)) {\n return obj;\n }\n if (isEmpty(obj)) {\n return defaultValue;\n }\n if (isString(path)) {\n return objectPath.get(obj, path.split('.'), defaultValue);\n }\n\n var currentPath = getKey(path[0]);\n\n if (path.length === 1) {\n if (obj[currentPath] === void 0) {\n return defaultValue;\n }\n return obj[currentPath];\n }\n\n return objectPath.get(obj[currentPath], path.slice(1), defaultValue);\n };\n\n objectPath.del = function(obj, path) {\n return del(obj, path);\n };\n\n return objectPath;\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/shakyshane/Sites/oss/UI/~/object-path/index.js\n// module id = 68\n// module chunks = 0","var app = require(\"../module\");\n\napp.controller(\"MainController\", [\n \"$scope\",\n \"$rootScope\",\n \"$location\",\n \"$injector\",\n MainController\n]);\n\n\n/**\n * @param $scope\n * @param $rootScope\n * @param $location\n * @param $injector\n * @constructor\n */\nfunction MainController ($scope, $rootScope, $location, $injector) {\n\n var ctrl = this;\n ctrl.options = false;\n ctrl.browsers = [];\n ctrl.socketId = \"\";\n\n var pagesConfig = $injector.get(\"pagesConfig\");\n var Pages = $injector.get(\"Pages\");\n var Socket = $injector.get(\"Socket\");\n var Clients = $injector.get(\"Clients\");\n\n ctrl.ui = {\n menu: pagesConfig,\n sectionMenu: false,\n disconnected: false\n };\n\n /**\n * @param $section\n */\n ctrl.setActiveSection = function ($section) {\n Pages.enable($section);\n $location.path($section.path);\n ctrl.ui.sectionMenu = false;\n };\n\n /**\n * Refresh all event\n */\n ctrl.reloadAll = function () {\n Clients.reloadAll();\n $rootScope.$emit(\"notify:flash\", {\n heading: \"Instruction sent:\",\n message: \"Reload All Browsers ✔\"\n });\n };\n\n /**\n * @param value\n */\n ctrl.scrollAllTo = function () {\n Clients.scrollAllTo(0);\n $rootScope.$emit(\"notify:flash\", {\n heading: \"Instruction sent:\",\n message: \"Scroll all browsers to Y=0 ✔\"\n });\n };\n\n /**\n * Emit the socket event\n */\n ctrl.sendAllTo = function (path) {\n Clients.sendAllTo(path);\n $rootScope.$emit(\"notify:flash\", {\n heading: \"Instruction sent:\",\n message: \"Reset all Browsers to /\"\n });\n };\n\n /**\n *\n */\n ctrl.toggleMenu = function () {\n ctrl.ui.sectionMenu = !ctrl.ui.sectionMenu;\n };\n\n /**\n * @type {{connection: connection, addBrowsers: addBrowsers}}\n */\n ctrl.socketEvents = {\n\n /**\n * @param options\n */\n connection: function (options) {\n ctrl.update(options);\n },\n /**\n *\n */\n disconnect: function () {\n ctrl.ui.disconnected = true;\n }\n };\n\n /**\n * Update the current $scope\n */\n ctrl.update = function (options) {\n\n ctrl.options = transformOptions(options);\n ctrl.ui.disconnected = false;\n\n Pages.transform(pagesConfig[\"overview\"], function ($section) {\n return $section;\n });\n };\n\n /**\n * Set the currently active page\n */\n ctrl.setActiveSection(Pages.current());\n\n /**\n * Get options from socket connection\n */\n Socket.options().then(ctrl.socketEvents.connection);\n\n /**\n * React to disconnects\n */\n $rootScope.$on(\"ui:disconnect\", ctrl.socketEvents.disconnect);\n $rootScope.$on(\"ui:connection\", function (evt, options) {\n ctrl.socketEvents.connection(options);\n $scope.$digest();\n });\n}\n\n/**\n * Options transformations\n * @param options\n * @returns {*}\n */\nfunction transformOptions(options) {\n\n options.displayUrl = getDisplayUrl(options.urls);\n\n return options;\n}\n\n/**\n * @param urls\n * @returns {*}\n */\nfunction getDisplayUrl (urls) {\n if (!urls) {\n return false;\n }\n return urls.external || urls.local;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./main/controller.js\n// module id = 69\n// module chunks = 0","var module = require(\"./module\"); //jshint ignore:line\nvar utils = require(\"./utils\"); //jshint ignore:line\n\nmodule\n .filter(\"ucfirst\", function () { return utils.ucfirst; })\n .filter(\"localRootUrl\", function () { return utils.localRootUrl; })\n .filter(\"localUrl\", function () { return utils.localRootUrl; })\n .filter(\"orderObjectBy\", function () { return utils.orderObjectBy; });\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./filters.js\n// module id = 70\n// module chunks = 0","module.exports = {\n ucfirst: function (string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n },\n localRootUrl: function (port, scheme) {\n return [scheme, \"://\", window.location.hostname, \":\", port].join(\"\");\n },\n localUrl: function(path, port, mode) {\n if (mode === \"snippet\") {\n return path;\n }\n return [\"//\", window.location.hostname, \":\", port, path].join(\"\");\n },\n orderObjectBy: function (items, field, reverse) {\n var filtered = [];\n Object.keys(items).forEach(function(key) {\n filtered.push(items[key]);\n });\n filtered.sort(function (a, b) {\n return (a[field] > b[field] ? 1 : -1);\n });\n if (reverse) {\n filtered.reverse();\n }\n return filtered;\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./utils.js\n// module id = 71\n// module chunks = 0","var module = require(\"./module\"); //jshint ignore:line\n\nmodule.directive(\"icon\", require(\"./directives/icon\"));\nmodule.directive(\"linkTo\", require(\"./directives/link-to\"));\nmodule.directive(\"switch\", require(\"./directives/switch\"));\nmodule.directive(\"newTab\", require(\"./directives/new-tab\"));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./directives.js\n// module id = 72\n// module chunks = 0","module.exports = function () {\n return {\n scope: {\n icon: \"@\"\n },\n restrict: \"E\",\n replace: true,\n template: \"<svg bs-svg-icon><use xlink:href=\\\"{{iconName}}\\\"></use></svg>\",\n link: function (scope, elem, attrs) {\n scope.iconName = \"#svg-\" + scope.icon;\n return scope;\n }\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./directives/icon.js\n// module id = 73\n// module chunks = 0","module.exports = function () {\n return {\n restrict: \"E\",\n replace: false,\n transclude: true,\n scope: {\n \"path\": \"@\"\n },\n template: \"<a href='#' ng-click='navi(path)' ng-transclude=''>as</a>\",\n controller: [\"$scope\", \"$location\", \"$injector\", function ($scope, $location, $injector) {\n\n var pages = $injector.get(\"pagesConfig\");\n var Pages = $injector.get(\"Pages\");\n\n $scope.navi = function (path) {\n var item = pages[path];\n Pages.enable(item);\n $location.path(path);\n };\n }]\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./directives/link-to.js\n// module id = 74\n// module chunks = 0","module.exports = function () {\n return {\n scope: {\n toggle: \"&\",\n item: \"=\",\n switchid: \"@\",\n title: \"@\",\n tagline: \"@\",\n active: \"=\",\n prop: \"@\"\n },\n restrict: \"E\",\n replace: true,\n transclude: true,\n templateUrl: \"bs-switch.html\",\n controllerAs: \"ctrl\",\n controller: [\"$scope\", function ($scope) {\n var ctrl = this;\n ctrl.item = $scope.item;\n }]\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./directives/switch.js\n// module id = 75\n// module chunks = 0","module.exports = function () {\n return {\n scope: {\n url: \"@\",\n mode: \"@\"\n },\n restrict: \"E\",\n replace: true,\n template: '<a href=\"{{url}}\" bs-button=\"subtle-alt icon\" target=\"_blank\" title=\"Open a new tab\" ng-show=\"mode !== \\'snippet\\'\"><icon icon=\"newtab\"></icon> New Tab </a>' //jshint:ignore\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./directives/new-tab.js\n// module id = 76\n// module chunks = 0"],"sourceRoot":""}