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,4BACAE,WACAvrB,qCACA0X,cAEA8T,CACA,EAE+BH,uBAAyB,EAASA,mBAAyBA,6BCnB1F,MAAiCI,EAAQ,MA2DzCJ,WAzDA,gBACA,6DAEA,OACA,gEACAK,SACA,SAEAnlB,gBAEA,OACA3L,KACApC,aACA,qBACAmzB,SAEA,CACAA,QACAr4B,cAEA,EACAF,eACA,QACA,EACAuI,KAEA,CAEA,4JACA,CAEA,IAEA+T,GAFAkc,MACAC,MAEA,OACAjxB,aACA8wB,WACA,EACAlzB,aACA,gBACA,kBACAszB,EACA,EACA14B,eACAy4B,MACAnc,KACA,EACA/T,aACA,KACAiwB,8BAGA,CAFA,QACA,cACA,CACA,EAEA,EAE6CP,uBAAyB,EAASA,mBAAyBA,6BC3DxG,MAAuBI,EAAQ,MAW/BJ,WATA,gBACA,KACA,qCACA,oDAEA,GADA,oDACA,0CACA,qFACA,EAE8CA,uBAAyB,EAASA,mBAAyBA,0CCX1F,iBACf,mCAEA,2BAAyC15B,IAASA,IAClD25B,UAGA,QACA,kDCRe,cACf,4BACA,kDCFe,cACf,cACA,sFAGA,QACA,kDCNe,gBACf,qBACA,wDAEA,yFCFe,mBACf,OACAS,GADA,EAAMC,OACNxsB,yBAEA,mBACA,cACApG,qBACA,IACAmgB,OADA9pB,4BAEA,cAAiBw8B,KAAc1S,iBAC/BA,EACA,GAGA3d,qBACA,iCCjBA,gBACA,YAAkBjK,WAAkBA,KACpC,YACA20B,gCACAA,mBACA,+BACAtmB,kCACA,CACA,CAEe,kBACf,2BACAurB,UACAvrB,qCACA0X,cAEA8T,CACA,kFChBe,gBACf,6DAEA,OACA,2BAAkCU,KAA0BjyB,sCAC5DyxB,SACA,SAEAnlB,gBAEA,OACA3L,KACApC,aACA,qBACAmzB,SAEA,CACAA,QACAr4B,cAEA,EACAF,eACA,QACA,EACAuI,KAEA,CAEA,4JACA,CAEA,IAEA+T,GAFAkc,MACAC,MAEA,OACAjxB,aACA8wB,WACA,EACAlzB,aACA,gBACA,kBACAszB,EACA,EACA14B,eACAy4B,MACAnc,KACA,EACA/T,aACA,KACAiwB,8BAGA,CAFA,QACA,cACA,CACA,EAEA,oFCrDe,cACf,UAAkCI,OAClC,kBACA,IACA7T,GADAgU,MAAgBC,KAAcC,GAG9B,OACA,UAAsBD,KAAcn9B,kBACpCkpB,qCACA,MACAA,4BAGA,SAAWmU,KAAyBr9B,QACpC,CACA,iCClBe,kBACf,cACA+Q,2BACA1M,QACAwlB,cACAxZ,gBACAoY,cAGAiB,OAGAA,CACA,iFCZe,gBACf,iDAEA,QADA4T,KAAa7kB,KAAc6kB,MAI3B,QACA,CCPe,aACf,OACAC,SADAhtB,yBACAA,mBAEA,kBACA,OAAiBitB,EAAavyB,MAC9B,MACA,+CAEA,cACA2e,qCAGAA,SACA,EAGA2T,uBACA,gCCnBe,cACf,wEACA,4CACA,GACAvyB,EACA,+ECJe,gBACf,kCACA,0EAGAyyB,0CACAruB,aACA/K,QACAokB,YACApY,mBAGAU,qCACA0X,cAEAiV,MAAkBC,KAAcF,IAChC,iCCjBe,aAEf,UADAltB,iCACAA,gCACA,qCAEA,IACA,mFACA,CAGA,CAFA,MACA,QACA,CACA,kDCXe,cACf,0FACA,kDCFe,aACf,gKACA,kFCAA,gBACA,sBAEA,iCACA,uCACAqtB,8BACA,uDACA,IAAKtH,oBACL,CAEA,SACA,CAEe,cACf,YAAkB5zB,mBAAsBA,KACxC,0CACAA,2CACM,OAAcuI,YACpB,GAAK8F,oIACLA,kEACA,EACA,CAEA,QACA,2ECxBe,gBACf,OAAsB,YAAtBnH,EAAei0B,KAAOj0B,0BACtB,SACI,cACJ,gFAGA,SAASk0B,KAAqBt1B,EAC9B,8BCVe,gBACf,2EACA,sBACAwC,CACA,GACAA,IACA,sGCFe,kBACf,SAAS+yB,KAAcC,KCLR,kBACf,8EAEA,YACA,KAIAC,MAJAC,MACAC,MACAC,MAIA,IACA,qBAA4BD,0BAC5BD,mBAEAx7B,oBAH2Dy7B,OAc3D,CATA,MAAI1d,IACJ2d,MACA7vB,KACA,SACA,KACA4vB,gCAGA,CAFA,QACA,cACA,CACA,CAEA,UACA,CDvBgCE,CAAoBL,WAAYM,KAA0BN,WAAYO,MACtG,8FEFe,eACf,SAASC,KAAcR,QAASS,KAAeT,QAASU,KAA0BV,QAASW,MAC3F,sFCFe,gBACf,OCJe,eACf,8BAAiCC,KAAgBZ,GACjD,CDESa,CAAiBb,QAASc,KAAed,QAASM,KAA0BN,KELtE,aACf,2JACA,CFG8Fe,EAC9F,iCGNe,cAGf,iFACA,eACA,EAAI,YACJ,mGACA,GAAGrV,EACH,kFCPe,gBACf,KACA,gCAAoCsV,KAAgBh0B,KACpD,oDAEA,GADA,oDACA,0CACA,gFAAsFg0B,KAAgBh0B,KACtG,iFCJe,eACf,6CAEA,sBACA,eCRe,eACf,8DACA,CDM2Bi0B,CAAgBC,cAE3C,yBACA,0EAGA,kBACA,gCAEAC,aACA,CAEA,cACA,SAAa3uB,KAAS0uB,gBAAmBzmB,KAAczY,kBACvD,CAEA,gDACAoP,aACA/K,SACAwlB,cACApB,YACApY,oBAEK,EACMsI,KAAcymB,MACzB,EAEAC,KACA","names":["TypeModifier","None","Const","Type","modifiers","arguments","this","modifier","BuiltinTypeName","Dynamic","Bool","String","Int","Number","Function","Inferred","INFERRED_TYPE","BuiltinType","name","_this6","visitor","context","visitBuiltinType","BinaryOperator","Equals","NotEquals","Identical","NotIdentical","Minus","Plus","Divide","Multiply","Modulo","And","Or","BitwiseAnd","Lower","LowerEquals","Bigger","BiggerEquals","NullishCoalesce","areAllEquivalent","base","other","areAllEquivalentPredicate","equivalentPredicate","len","length","i","baseElement","otherElement","isEquivalent","Expression","type","sourceSpan","ReadPropExpr","index","ReadKeyExpr","params","pure","InvokeFunctionExpr","InstantiateExpr","trueCase","falseCase","ConditionalExpr","rhs","BinaryOperatorExpr","parens","equals","TYPED_NULL_EXPR","ExpressionStatement","ReadVarExpr","_this10","e","visitReadVarExpr","value","WriteVarExpr","_this13","visitWriteVarExpr","DeclareVarStmt","toDeclStmt","StmtModifier","Final","WriteKeyExpr","receiver","_this14","visitWriteKeyExpr","WritePropExpr","_this15","visitWritePropExpr","fn","args","_this16","visitInvokeFunctionExpr","classExpr","_this18","visitInstantiateExpr","LiteralExpr","_this19","visitLiteralExpr","condition","_this22","nullSafeIsEquivalent","visitConditionalExpr","operator","lhs","_this26","visitBinaryOperatorExpr","_this27","visitReadPropExpr","_this28","visitReadKeyExpr","Private","Exported","Static","Statement","leadingComments","leadingComment","push","_this33","stmt","visitDeclareVarStmt","expr","_this35","visitExpressionStmt","variable","EventHandlerVars","event","stripBlock","messagePart","rawMessagePart","charAt","substring","findEndOfBlock","cooked","raw","cookedIndex","rawIndex","Error","globalThis","global","window","self","WorkerGlobalScope","ɵ_global","$localize$1","messageParts","expressions","_key","translate","translation","message","SVGElement","prototype","contains","HTMLDivElement","t","n","A","splice","et","shift","call","r","T","l","ke","ie","querySelectorAll","a","Ge","nodeName","toUpperCase","ce","le","ne","te","indexOf","u","currentTarget","attrChange","attrName","o","target","Q","W","at","j","prevValue","newValue","c","clearTimeout","setTimeout","s","lt","removeEventListener","J","y","detail","B","x","Ue","p","xe","ue","m","Xe","O","f","apply","V","ae","pop","d","Se","I","observe","Ye","ot","setAttribute","_","D","k","ee","Y","X","created","h","Ze","S","q","L","M","Z","Fe","observedAttributes","pe","_e","Ae","He","Oe","De","get","be","create","H","z","G","K","$","constructor","Ie","set","R","toLowerCase","g","Ne","E","v","is","attributes","nodeValue","we","b","ge","customElements","de","configurable","w","Reflect","construct","createElement","We","tt","rt","document","C","Object","concat","test","collections","HTMLAllCollection","HTMLCollection","HTMLFormControlsCollection","HTMLOptionsCollection","elements","Element","HTMLAnchorElement","HTMLAppletElement","HTMLAreaElement","HTMLAttachmentElement","HTMLAudioElement","HTMLBRElement","HTMLBaseElement","HTMLBodyElement","HTMLButtonElement","HTMLCanvasElement","HTMLContentElement","HTMLDListElement","HTMLDataElement","HTMLDataListElement","HTMLDetailsElement","HTMLDialogElement","HTMLDirectoryElement","HTMLDocument","HTMLElement","HTMLEmbedElement","HTMLFieldSetElement","HTMLFontElement","HTMLFormElement","HTMLFrameElement","HTMLFrameSetElement","HTMLHRElement","HTMLHeadElement","HTMLHeadingElement","HTMLHtmlElement","HTMLIFrameElement","HTMLImageElement","HTMLInputElement","HTMLKeygenElement","HTMLLIElement","HTMLLabelElement","HTMLLegendElement","HTMLLinkElement","HTMLMapElement","HTMLMarqueeElement","HTMLMediaElement","HTMLMenuElement","HTMLMenuItemElement","HTMLMetaElement","HTMLMeterElement","HTMLModElement","HTMLOListElement","HTMLObjectElement","HTMLOptGroupElement","HTMLOptionElement","HTMLOutputElement","HTMLParagraphElement","HTMLParamElement","HTMLPictureElement","HTMLPreElement","HTMLProgressElement","HTMLQuoteElement","HTMLScriptElement","HTMLSelectElement","HTMLShadowElement","HTMLSlotElement","HTMLSourceElement","HTMLSpanElement","HTMLStyleElement","HTMLTableCaptionElement","HTMLTableCellElement","HTMLTableColElement","HTMLTableElement","HTMLTableRowElement","HTMLTableSectionElement","HTMLTemplateElement","HTMLTextAreaElement","HTMLTimeElement","HTMLTitleElement","HTMLTrackElement","HTMLUListElement","HTMLUnknownElement","HTMLVideoElement","nodes","Attr","Audio","CDATASection","CharacterData","Comment","Document","DocumentFragment","DocumentType","Image","Option","ProcessingInstruction","ShadowRoot","Text","XMLDocument","N","F","P","U","Math","random","re","oe","documentElement","se","me","hasOwnProperty","fe","isPrototypeOf","defineProperty","he","getOwnPropertyDescriptor","Te","getOwnPropertyNames","Le","getPrototypeOf","Me","setPrototypeOf","Ee","__proto__","define","whenDefined","ye","Ce","Map","Promise","catch","then","ct","Ve","MutationObserver","WebKitMutationObserver","Pe","Re","Node","nodeType","qe","attachShadow","Be","cloneNode","closest","parentNode","je","dispatchEvent","getAttribute","ze","hasAttribute","Ke","removeAttribute","$e","Qe","importNode","characterData","attributeOldValue","Je","nt","innerHTML","removedNodes","childNodes","lastChild","removeChild","disconnect","childList","subtree","CustomEvent","bubbles","MODIFICATION","propertyName","className","addedNodes","attributeName","oldValue","createDocumentFragment","appendChild","innerHTMLHelper","addEventListener","race","noBuiltIn","RegExp","outerHTML","st","performance","mark","performanceMeasure","label","measure","symbolPrefix","__Zone_symbol_prefix","__symbol__","checkDuplicate","Zone","nativeMicroTaskQueuePromise","parent","zoneSpec","_classCallCheck","_parent","_name","_properties","properties","_zoneDelegate","_ZoneDelegate","key","zone","getZoneWith","current","fork","callback","source","_callback","intercept","runGuarded","applyThis","applyArgs","_currentZoneFrame","invoke","error","handleError","task","NO_ZONE","state","notScheduled","eventTask","macroTask","reEntryGuard","running","_transitionTo","scheduled","runCount","previousTask","_currentTask","data","isPeriodic","cancelFn","undefined","invokeTask","unknown","_updateTaskCount","newZone","scheduling","zoneDelegates","_zoneDelegates","_zone","scheduleTask","err","customSchedule","ZoneTask","microTask","customCancel","canceling","cancelTask","count","patches","ZoneAwarePromise","ignoreDuplicate","perfName","_api","DELEGATE_ZS","onHasTask","delegate","hasTaskState","hasTask","onScheduleTask","onInvokeTask","onCancelTask","parentDelegate","_taskCounts","_parentDelegate","_forkZS","onFork","_forkDlgt","_forkCurrZone","_interceptZS","onIntercept","_interceptDlgt","_interceptCurrZone","_invokeZS","onInvoke","_invokeDlgt","_invokeCurrZone","_handleErrorZS","onHandleError","_handleErrorDlgt","_handleErrorCurrZone","_scheduleTaskZS","_scheduleTaskDlgt","_scheduleTaskCurrZone","_invokeTaskZS","_invokeTaskDlgt","_invokeTaskCurrZone","_cancelTaskZS","_cancelTaskDlgt","_cancelTaskCurrZone","_hasTaskZS","_hasTaskDlgt","_hasTaskDlgtOwner","_hasTaskCurrZone","zoneSpecHasTask","targetZone","returnTask","scheduleFn","scheduleMicroTask","isEmpty","counts","prev","next","change","options","_state","useG","toState","fromState1","fromState2","handleId","toString","_numberOfNestedTaskFrames","runTask","drainMicroTaskQueue","symbolSetTimeout","symbolPromise","symbolThen","_microTaskQueue","_isDrainingMicrotaskQueue","nativeScheduleMicroTask","func","resolve","nativeThen","queue","onUnhandledError","microtaskDrainDone","symbol","currentZoneFrame","noop","showUncaughtError","patchEventTarget","patchOnProperties","patchMethod","bindArguments","patchThen","patchMacroTask","patchEventPrototype","isIEOrEdge","getGlobalObjects","ObjectDefineProperty","ObjectGetOwnPropertyDescriptor","ObjectCreate","ArraySlice","patchClass","wrapWithCurrentZone","filterProperties","attachOriginToPatched","_redefineProperty","patchCallbacks","ObjectGetPrototypeOf","Array","slice","ADD_EVENT_LISTENER_STR","REMOVE_EVENT_LISTENER_STR","ZONE_SYMBOL_ADD_EVENT_LISTENER","ZONE_SYMBOL_REMOVE_EVENT_LISTENER","TRUE_STR","FALSE_STR","ZONE_SYMBOL_PREFIX","wrap","scheduleMacroTaskWithCurrentZone","scheduleMacroTask","zoneSymbol","isWindowExists","internalWindow","_global","isPropertyWritable","propertyDesc","writable","isWebWorker","isNode","process","isBrowser","isMix","zoneSymbolEventNames$1","wrapFn","eventNameSymbol","result","listener","errorEvent","filename","lineno","colno","preventDefault","patchProperty","obj","prop","desc","enumerable","onPropPatchedSymbol","originalDescGet","originalDescSet","eventName","REMOVE_ATTRIBUTE","onProperties","originalInstanceKey","OriginalClass","instance","patchFn","proto","delegateName","patchDelegate","funcName","metaCreator","setNative","cbIdx","meta","patched","original","isDetectedIEOrEdge","ieOrEdge","ua","navigator","userAgent","__load_patch","api","_uncaughtPromiseErrors","isDisableWrappingUncaughtPromiseRejection","rejection","console","stack","_loop2","uncaughtPromiseError","throwOriginal","handleUnhandledRejection","handler","UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL","isThenable","forwardResolution","forwardRejection","reject","symbolState","symbolValue","symbolFinally","symbolParentPromiseValue","symbolParentPromiseState","UNRESOLVED","REJECTED","makeResolver","promise","resolvePromise","once","wasCalled","wrappedFunction","CURRENT_TASK_TRACE_SYMBOL","onceWrapper","TypeError","clearRejectedNoCatch","trace","currentTask","creationTrace","scheduleResolveOrReject","readableObjectToString","JSON","stringify","REJECTION_HANDLED_HANDLER","chainPromise","onFulfilled","onRejected","promiseState","parentPromiseValue","isFinallyPromise","run","AggregateError","executor","_a","Symbol","species","onFinally","values","iterator","promises","_step","finished","errors","res","rej","onResolve","onReject","_step2","allWithCallback","thenCallback","status","errorCallback","reason","_step3","unresolvedCount","valueIndex","resolvedValues","_iterator3","_this","curValueIndex","thenErr","toStringTag","all","NativePromise","symbolThenPatched","Ctor","originalThen","_this2","zoneify","resultPromise","ctor","originalFunctionToString","ORIGINAL_DELEGATE_SYMBOL","PROMISE_SYMBOL","ERROR_SYMBOL","newFunctionToString","originalDelegate","nativePromise","nativeError","originalObjectToString","passiveSupported","OPTIMIZED_ZONE_EVENT_TASK_DATA","zoneSymbolEventNames","globalSources","EVENT_NAME_SYMBOL_REGX","IMMEDIATE_PROPAGATION_SYMBOL","prepareEventNames","eventNameToString","falseEventName","trueEventName","symbolCapture","apis","patchOptions","ADD_EVENT_LISTENER","add","REMOVE_EVENT_LISTENER","rm","LISTENERS_EVENT_LISTENER","listeners","REMOVE_ALL_LISTENERS_EVENT_LISTENER","rmAll","zoneSymbolAddEventListener","ADD_EVENT_LISTENER_SOURCE","isRemoved","handleEvent","globalCallback","isCapture","tasks","copyTasks","_loop4","globalZoneAwareCallback","globalZoneAwareCaptureCallback","patchEventTargetMethods","useGlobalCallback","validateHandler","vh","chkDup","returnTarget","nativePrependEventListener","taskData","nativeAddEventListener","nativeRemoveEventListener","nativeListeners","nativeRemoveAllListeners","buildEventListenerOptions","passive","capture","assign","prepend","isExisting","symbolEventName","symbolEventNames","existingTasks","allRemoved","compare","diff","typeOfDelegate","unpatchedEvents","passiveEvents","makeAddListener","nativeListener","addSource","customScheduleFn","customCancelFn","transferEventName","isHandleEvent","constructorName","targetSource","scheduleEventTask","unshift","PREPEND_EVENT_LISTENER","existingTask","onPropertySymbol","findEventTasks","symbolCaptureEventName","captureTasks","removeTasks","keys","match","exec","evtName","results","foundTasks","captureFalseTasks","captureTrueTasks","Event","targetName","method","callbacks","nativeDelegate","opts","forEach","descriptor","ignoreProperties","tip","filter","ip","targetIgnoreProperties","op","patchFilteredProperties","getOnEventNames","startsWith","map","eventNames","SYMBOL_BLACK_LISTED_EVENTS","SYMBOL_UNPATCHED_EVENTS","taskSymbol","patchTimer","setName","cancelName","nameSuffix","clearNative","tasksByHandleId","clearTask","delay","handle","ref","unref","bind","id","legacyPatch","clear","blockingMethods","patchEvent","eventTargetPatch","_api$getGlobalObjects2","EVENT_TARGET","EventTarget","XMLHttpRequestEventTarget","propertyDescriptorPatch","__Zone_ignore_on_properties","patchTargets","ignoreErrorProperties","isIE","patchCustomElements","_api$getGlobalObjects","patchXHR","XMLHttpRequest","XMLHttpRequestPrototype","oriAddListener","oriRemoveListener","XMLHttpRequestEventTargetPrototype","READY_STATE_CHANGE","SCHEDULED","openNative","XHR_SYNC","XHR_URL","fetchTaskAborting","fetchTaskScheduling","sendNative","url","aborted","placeholderCallback","XHR_ERROR_BEFORE_SCHEDULED","abortNative","findPendingTask","XHR_TASK","XHR_SCHEDULED","XHR_LISTENER","newListener","readyState","DONE","loadTasks","oriInvoke","geolocation","patchPrototype","fnNames","_loop","findPromiseRejectionHandler","PromiseRejectionEvent","evt","module","arr2","staticProps","Constructor","__webpack_require__","it","done","normalCompletion","didErr","step","_construct","_isNativeReflectConstruct_js__WEBPACK_IMPORTED_MODULE_0__","_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_1__","_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_0__","Super","_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_1__","Derived","_possibleConstructorReturn_js__WEBPACK_IMPORTED_MODULE_2__","object","_get","_superPropBase","subClass","superClass","_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__","enumerableOnly","_typeof_js__WEBPACK_IMPORTED_MODULE_0__","_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__","arrayWithHoles","arr","_s","_arr","_n","_d","_iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","_arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__","_iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__","_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__","_nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__","arrayLikeToArray","_arrayWithoutHoles","iterableToArray","_nonIterableSpread","_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__","_isNativeFunction","Class","_cache","Wrapper","_wrapNativeSuper"],"sourceRoot":"webpack:///","sources":["./node_modules/@angular/compiler/fesm2020/compiler.mjs","./node_modules/@angular/localize/fesm2020/localize.mjs","./node_modules/@angular/localize/fesm2020/init.mjs","./src/polyfills.ts","./node_modules/document-register-element/build/document-register-element.js","./node_modules/zone.js/fesm2015/zone.js","./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","./node_modules/@babel/runtime/helpers/classCallCheck.js","./node_modules/@babel/runtime/helpers/createClass.js","./node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js","./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","./node_modules/@babel/runtime/helpers/esm/construct.js","./node_modules/@babel/runtime/helpers/esm/createClass.js","./node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js","./node_modules/@babel/runtime/helpers/esm/createSuper.js","./node_modules/@babel/runtime/helpers/esm/defineProperty.js","./node_modules/@babel/runtime/helpers/esm/superPropBase.js","./node_modules/@babel/runtime/helpers/esm/get.js","./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","./node_modules/@babel/runtime/helpers/esm/inherits.js","./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","./node_modules/@babel/runtime/helpers/esm/objectSpread2.js","./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","./node_modules/@babel/runtime/helpers/esm/toArray.js","./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","./node_modules/@babel/runtime/helpers/esm/typeof.js","./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js"],"sourcesContent":["/**\n * @license Angular v14.3.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar TagContentType;\n(function (TagContentType) {\n TagContentType[TagContentType[\"RAW_TEXT\"] = 0] = \"RAW_TEXT\";\n TagContentType[TagContentType[\"ESCAPABLE_RAW_TEXT\"] = 1] = \"ESCAPABLE_RAW_TEXT\";\n TagContentType[TagContentType[\"PARSABLE_DATA\"] = 2] = \"PARSABLE_DATA\";\n})(TagContentType || (TagContentType = {}));\nfunction splitNsName(elementName) {\n if (elementName[0] != ':') {\n return [null, elementName];\n }\n const colonIndex = elementName.indexOf(':', 1);\n if (colonIndex === -1) {\n throw new Error(`Unsupported format \"${elementName}\" expecting \":namespace:name\"`);\n }\n return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];\n}\n// `` tags work the same regardless the namespace\nfunction isNgContainer(tagName) {\n return splitNsName(tagName)[1] === 'ng-container';\n}\n// `` tags work the same regardless the namespace\nfunction isNgContent(tagName) {\n return splitNsName(tagName)[1] === 'ng-content';\n}\n// `` tags work the same regardless the namespace\nfunction isNgTemplate(tagName) {\n return splitNsName(tagName)[1] === 'ng-template';\n}\nfunction getNsPrefix(fullName) {\n return fullName === null ? null : splitNsName(fullName)[0];\n}\nfunction mergeNsAndName(prefix, localName) {\n return prefix ? `:${prefix}:${localName}` : localName;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass HtmlTagDefinition {\n constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false } = {}) {\n this.closedByChildren = {};\n this.closedByParent = false;\n this.canSelfClose = false;\n if (closedByChildren && closedByChildren.length > 0) {\n closedByChildren.forEach(tagName => this.closedByChildren[tagName] = true);\n }\n this.isVoid = isVoid;\n this.closedByParent = closedByParent || isVoid;\n this.implicitNamespacePrefix = implicitNamespacePrefix || null;\n this.contentType = contentType;\n this.ignoreFirstLf = ignoreFirstLf;\n this.preventNamespaceInheritance = preventNamespaceInheritance;\n }\n isClosedByChild(name) {\n return this.isVoid || name.toLowerCase() in this.closedByChildren;\n }\n getContentType(prefix) {\n if (typeof this.contentType === 'object') {\n const overrideType = prefix === undefined ? undefined : this.contentType[prefix];\n return overrideType ?? this.contentType.default;\n }\n return this.contentType;\n }\n}\nlet _DEFAULT_TAG_DEFINITION;\n// see https://www.w3.org/TR/html51/syntax.html#optional-tags\n// This implementation does not fully conform to the HTML5 spec.\nlet TAG_DEFINITIONS;\nfunction getHtmlTagDefinition(tagName) {\n if (!TAG_DEFINITIONS) {\n _DEFAULT_TAG_DEFINITION = new HtmlTagDefinition();\n TAG_DEFINITIONS = {\n 'base': new HtmlTagDefinition({ isVoid: true }),\n 'meta': new HtmlTagDefinition({ isVoid: true }),\n 'area': new HtmlTagDefinition({ isVoid: true }),\n 'embed': new HtmlTagDefinition({ isVoid: true }),\n 'link': new HtmlTagDefinition({ isVoid: true }),\n 'img': new HtmlTagDefinition({ isVoid: true }),\n 'input': new HtmlTagDefinition({ isVoid: true }),\n 'param': new HtmlTagDefinition({ isVoid: true }),\n 'hr': new HtmlTagDefinition({ isVoid: true }),\n 'br': new HtmlTagDefinition({ isVoid: true }),\n 'source': new HtmlTagDefinition({ isVoid: true }),\n 'track': new HtmlTagDefinition({ isVoid: true }),\n 'wbr': new HtmlTagDefinition({ isVoid: true }),\n 'p': new HtmlTagDefinition({\n closedByChildren: [\n 'address', 'article', 'aside', 'blockquote', 'div', 'dl', 'fieldset',\n 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5',\n 'h6', 'header', 'hgroup', 'hr', 'main', 'nav', 'ol',\n 'p', 'pre', 'section', 'table', 'ul'\n ],\n closedByParent: true\n }),\n 'thead': new HtmlTagDefinition({ closedByChildren: ['tbody', 'tfoot'] }),\n 'tbody': new HtmlTagDefinition({ closedByChildren: ['tbody', 'tfoot'], closedByParent: true }),\n 'tfoot': new HtmlTagDefinition({ closedByChildren: ['tbody'], closedByParent: true }),\n 'tr': new HtmlTagDefinition({ closedByChildren: ['tr'], closedByParent: true }),\n 'td': new HtmlTagDefinition({ closedByChildren: ['td', 'th'], closedByParent: true }),\n 'th': new HtmlTagDefinition({ closedByChildren: ['td', 'th'], closedByParent: true }),\n 'col': new HtmlTagDefinition({ isVoid: true }),\n 'svg': new HtmlTagDefinition({ implicitNamespacePrefix: 'svg' }),\n 'foreignObject': new HtmlTagDefinition({\n // Usually the implicit namespace here would be redundant since it will be inherited from\n // the parent `svg`, but we have to do it for `foreignObject`, because the way the parser\n // works is that the parent node of an end tag is its own start tag which means that\n // the `preventNamespaceInheritance` on `foreignObject` would have it default to the\n // implicit namespace which is `html`, unless specified otherwise.\n implicitNamespacePrefix: 'svg',\n // We want to prevent children of foreignObject from inheriting its namespace, because\n // the point of the element is to allow nodes from other namespaces to be inserted.\n preventNamespaceInheritance: true,\n }),\n 'math': new HtmlTagDefinition({ implicitNamespacePrefix: 'math' }),\n 'li': new HtmlTagDefinition({ closedByChildren: ['li'], closedByParent: true }),\n 'dt': new HtmlTagDefinition({ closedByChildren: ['dt', 'dd'] }),\n 'dd': new HtmlTagDefinition({ closedByChildren: ['dt', 'dd'], closedByParent: true }),\n 'rb': new HtmlTagDefinition({ closedByChildren: ['rb', 'rt', 'rtc', 'rp'], closedByParent: true }),\n 'rt': new HtmlTagDefinition({ closedByChildren: ['rb', 'rt', 'rtc', 'rp'], closedByParent: true }),\n 'rtc': new HtmlTagDefinition({ closedByChildren: ['rb', 'rtc', 'rp'], closedByParent: true }),\n 'rp': new HtmlTagDefinition({ closedByChildren: ['rb', 'rt', 'rtc', 'rp'], closedByParent: true }),\n 'optgroup': new HtmlTagDefinition({ closedByChildren: ['optgroup'], closedByParent: true }),\n 'option': new HtmlTagDefinition({ closedByChildren: ['option', 'optgroup'], closedByParent: true }),\n 'pre': new HtmlTagDefinition({ ignoreFirstLf: true }),\n 'listing': new HtmlTagDefinition({ ignoreFirstLf: true }),\n 'style': new HtmlTagDefinition({ contentType: TagContentType.RAW_TEXT }),\n 'script': new HtmlTagDefinition({ contentType: TagContentType.RAW_TEXT }),\n 'title': new HtmlTagDefinition({\n // The browser supports two separate `title` tags which have to use\n // a different content type: `HTMLTitleElement` and `SVGTitleElement`\n contentType: { default: TagContentType.ESCAPABLE_RAW_TEXT, svg: TagContentType.PARSABLE_DATA }\n }),\n 'textarea': new HtmlTagDefinition({ contentType: TagContentType.ESCAPABLE_RAW_TEXT, ignoreFirstLf: true }),\n };\n }\n // We have to make both a case-sensitive and a case-insensitive lookup, because\n // HTML tag names are case insensitive, whereas some SVG tags are case sensitive.\n return TAG_DEFINITIONS[tagName] ?? TAG_DEFINITIONS[tagName.toLowerCase()] ??\n _DEFAULT_TAG_DEFINITION;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _SELECTOR_REGEXP = new RegExp('(\\\\:not\\\\()|' + // 1: \":not(\"\n '(([\\\\.\\\\#]?)[-\\\\w]+)|' + // 2: \"tag\"; 3: \".\"/\"#\";\n // \"-\" should appear first in the regexp below as FF31 parses \"[.-\\w]\" as a range\n // 4: attribute; 5: attribute_string; 6: attribute_value\n '(?:\\\\[([-.\\\\w*\\\\\\\\$]+)(?:=([\\\"\\']?)([^\\\\]\\\"\\']*)\\\\5)?\\\\])|' + // \"[name]\", \"[name=value]\",\n // \"[name=\"value\"]\",\n // \"[name='value']\"\n '(\\\\))|' + // 7: \")\"\n '(\\\\s*,\\\\s*)', // 8: \",\"\n'g');\n/**\n * A css selector contains an element name,\n * css classes and attribute/value pairs with the purpose\n * of selecting subsets out of them.\n */\nclass CssSelector {\n constructor() {\n this.element = null;\n this.classNames = [];\n /**\n * The selectors are encoded in pairs where:\n * - even locations are attribute names\n * - odd locations are attribute values.\n *\n * Example:\n * Selector: `[key1=value1][key2]` would parse to:\n * ```\n * ['key1', 'value1', 'key2', '']\n * ```\n */\n this.attrs = [];\n this.notSelectors = [];\n }\n static parse(selector) {\n const results = [];\n const _addResult = (res, cssSel) => {\n if (cssSel.notSelectors.length > 0 && !cssSel.element && cssSel.classNames.length == 0 &&\n cssSel.attrs.length == 0) {\n cssSel.element = '*';\n }\n res.push(cssSel);\n };\n let cssSelector = new CssSelector();\n let match;\n let current = cssSelector;\n let inNot = false;\n _SELECTOR_REGEXP.lastIndex = 0;\n while (match = _SELECTOR_REGEXP.exec(selector)) {\n if (match[1 /* SelectorRegexp.NOT */]) {\n if (inNot) {\n throw new Error('Nesting :not in a selector is not allowed');\n }\n inNot = true;\n current = new CssSelector();\n cssSelector.notSelectors.push(current);\n }\n const tag = match[2 /* SelectorRegexp.TAG */];\n if (tag) {\n const prefix = match[3 /* SelectorRegexp.PREFIX */];\n if (prefix === '#') {\n // #hash\n current.addAttribute('id', tag.slice(1));\n }\n else if (prefix === '.') {\n // Class\n current.addClassName(tag.slice(1));\n }\n else {\n // Element\n current.setElement(tag);\n }\n }\n const attribute = match[4 /* SelectorRegexp.ATTRIBUTE */];\n if (attribute) {\n current.addAttribute(current.unescapeAttribute(attribute), match[6 /* SelectorRegexp.ATTRIBUTE_VALUE */]);\n }\n if (match[7 /* SelectorRegexp.NOT_END */]) {\n inNot = false;\n current = cssSelector;\n }\n if (match[8 /* SelectorRegexp.SEPARATOR */]) {\n if (inNot) {\n throw new Error('Multiple selectors in :not are not supported');\n }\n _addResult(results, cssSelector);\n cssSelector = current = new CssSelector();\n }\n }\n _addResult(results, cssSelector);\n return results;\n }\n /**\n * Unescape `\\$` sequences from the CSS attribute selector.\n *\n * This is needed because `$` can have a special meaning in CSS selectors,\n * but we might want to match an attribute that contains `$`.\n * [MDN web link for more\n * info](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).\n * @param attr the attribute to unescape.\n * @returns the unescaped string.\n */\n unescapeAttribute(attr) {\n let result = '';\n let escaping = false;\n for (let i = 0; i < attr.length; i++) {\n const char = attr.charAt(i);\n if (char === '\\\\') {\n escaping = true;\n continue;\n }\n if (char === '$' && !escaping) {\n throw new Error(`Error in attribute selector \"${attr}\". ` +\n `Unescaped \"$\" is not supported. Please escape with \"\\\\$\".`);\n }\n escaping = false;\n result += char;\n }\n return result;\n }\n /**\n * Escape `$` sequences from the CSS attribute selector.\n *\n * This is needed because `$` can have a special meaning in CSS selectors,\n * with this method we are escaping `$` with `\\$'.\n * [MDN web link for more\n * info](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).\n * @param attr the attribute to escape.\n * @returns the escaped string.\n */\n escapeAttribute(attr) {\n return attr.replace(/\\\\/g, '\\\\\\\\').replace(/\\$/g, '\\\\$');\n }\n isElementSelector() {\n return this.hasElementSelector() && this.classNames.length == 0 && this.attrs.length == 0 &&\n this.notSelectors.length === 0;\n }\n hasElementSelector() {\n return !!this.element;\n }\n setElement(element = null) {\n this.element = element;\n }\n /** Gets a template string for an element that matches the selector. */\n getMatchingElementTemplate() {\n const tagName = this.element || 'div';\n const classAttr = this.classNames.length > 0 ? ` class=\"${this.classNames.join(' ')}\"` : '';\n let attrs = '';\n for (let i = 0; i < this.attrs.length; i += 2) {\n const attrName = this.attrs[i];\n const attrValue = this.attrs[i + 1] !== '' ? `=\"${this.attrs[i + 1]}\"` : '';\n attrs += ` ${attrName}${attrValue}`;\n }\n return getHtmlTagDefinition(tagName).isVoid ? `<${tagName}${classAttr}${attrs}/>` :\n `<${tagName}${classAttr}${attrs}>`;\n }\n getAttrs() {\n const result = [];\n if (this.classNames.length > 0) {\n result.push('class', this.classNames.join(' '));\n }\n return result.concat(this.attrs);\n }\n addAttribute(name, value = '') {\n this.attrs.push(name, value && value.toLowerCase() || '');\n }\n addClassName(name) {\n this.classNames.push(name.toLowerCase());\n }\n toString() {\n let res = this.element || '';\n if (this.classNames) {\n this.classNames.forEach(klass => res += `.${klass}`);\n }\n if (this.attrs) {\n for (let i = 0; i < this.attrs.length; i += 2) {\n const name = this.escapeAttribute(this.attrs[i]);\n const value = this.attrs[i + 1];\n res += `[${name}${value ? '=' + value : ''}]`;\n }\n }\n this.notSelectors.forEach(notSelector => res += `:not(${notSelector})`);\n return res;\n }\n}\n/**\n * Reads a list of CssSelectors and allows to calculate which ones\n * are contained in a given CssSelector.\n */\nclass SelectorMatcher {\n constructor() {\n this._elementMap = new Map();\n this._elementPartialMap = new Map();\n this._classMap = new Map();\n this._classPartialMap = new Map();\n this._attrValueMap = new Map();\n this._attrValuePartialMap = new Map();\n this._listContexts = [];\n }\n static createNotMatcher(notSelectors) {\n const notMatcher = new SelectorMatcher();\n notMatcher.addSelectables(notSelectors, null);\n return notMatcher;\n }\n addSelectables(cssSelectors, callbackCtxt) {\n let listContext = null;\n if (cssSelectors.length > 1) {\n listContext = new SelectorListContext(cssSelectors);\n this._listContexts.push(listContext);\n }\n for (let i = 0; i < cssSelectors.length; i++) {\n this._addSelectable(cssSelectors[i], callbackCtxt, listContext);\n }\n }\n /**\n * Add an object that can be found later on by calling `match`.\n * @param cssSelector A css selector\n * @param callbackCtxt An opaque object that will be given to the callback of the `match` function\n */\n _addSelectable(cssSelector, callbackCtxt, listContext) {\n let matcher = this;\n const element = cssSelector.element;\n const classNames = cssSelector.classNames;\n const attrs = cssSelector.attrs;\n const selectable = new SelectorContext(cssSelector, callbackCtxt, listContext);\n if (element) {\n const isTerminal = attrs.length === 0 && classNames.length === 0;\n if (isTerminal) {\n this._addTerminal(matcher._elementMap, element, selectable);\n }\n else {\n matcher = this._addPartial(matcher._elementPartialMap, element);\n }\n }\n if (classNames) {\n for (let i = 0; i < classNames.length; i++) {\n const isTerminal = attrs.length === 0 && i === classNames.length - 1;\n const className = classNames[i];\n if (isTerminal) {\n this._addTerminal(matcher._classMap, className, selectable);\n }\n else {\n matcher = this._addPartial(matcher._classPartialMap, className);\n }\n }\n }\n if (attrs) {\n for (let i = 0; i < attrs.length; i += 2) {\n const isTerminal = i === attrs.length - 2;\n const name = attrs[i];\n const value = attrs[i + 1];\n if (isTerminal) {\n const terminalMap = matcher._attrValueMap;\n let terminalValuesMap = terminalMap.get(name);\n if (!terminalValuesMap) {\n terminalValuesMap = new Map();\n terminalMap.set(name, terminalValuesMap);\n }\n this._addTerminal(terminalValuesMap, value, selectable);\n }\n else {\n const partialMap = matcher._attrValuePartialMap;\n let partialValuesMap = partialMap.get(name);\n if (!partialValuesMap) {\n partialValuesMap = new Map();\n partialMap.set(name, partialValuesMap);\n }\n matcher = this._addPartial(partialValuesMap, value);\n }\n }\n }\n }\n _addTerminal(map, name, selectable) {\n let terminalList = map.get(name);\n if (!terminalList) {\n terminalList = [];\n map.set(name, terminalList);\n }\n terminalList.push(selectable);\n }\n _addPartial(map, name) {\n let matcher = map.get(name);\n if (!matcher) {\n matcher = new SelectorMatcher();\n map.set(name, matcher);\n }\n return matcher;\n }\n /**\n * Find the objects that have been added via `addSelectable`\n * whose css selector is contained in the given css selector.\n * @param cssSelector A css selector\n * @param matchedCallback This callback will be called with the object handed into `addSelectable`\n * @return boolean true if a match was found\n */\n match(cssSelector, matchedCallback) {\n let result = false;\n const element = cssSelector.element;\n const classNames = cssSelector.classNames;\n const attrs = cssSelector.attrs;\n for (let i = 0; i < this._listContexts.length; i++) {\n this._listContexts[i].alreadyMatched = false;\n }\n result = this._matchTerminal(this._elementMap, element, cssSelector, matchedCallback) || result;\n result = this._matchPartial(this._elementPartialMap, element, cssSelector, matchedCallback) ||\n result;\n if (classNames) {\n for (let i = 0; i < classNames.length; i++) {\n const className = classNames[i];\n result =\n this._matchTerminal(this._classMap, className, cssSelector, matchedCallback) || result;\n result =\n this._matchPartial(this._classPartialMap, className, cssSelector, matchedCallback) ||\n result;\n }\n }\n if (attrs) {\n for (let i = 0; i < attrs.length; i += 2) {\n const name = attrs[i];\n const value = attrs[i + 1];\n const terminalValuesMap = this._attrValueMap.get(name);\n if (value) {\n result =\n this._matchTerminal(terminalValuesMap, '', cssSelector, matchedCallback) || result;\n }\n result =\n this._matchTerminal(terminalValuesMap, value, cssSelector, matchedCallback) || result;\n const partialValuesMap = this._attrValuePartialMap.get(name);\n if (value) {\n result = this._matchPartial(partialValuesMap, '', cssSelector, matchedCallback) || result;\n }\n result =\n this._matchPartial(partialValuesMap, value, cssSelector, matchedCallback) || result;\n }\n }\n return result;\n }\n /** @internal */\n _matchTerminal(map, name, cssSelector, matchedCallback) {\n if (!map || typeof name !== 'string') {\n return false;\n }\n let selectables = map.get(name) || [];\n const starSelectables = map.get('*');\n if (starSelectables) {\n selectables = selectables.concat(starSelectables);\n }\n if (selectables.length === 0) {\n return false;\n }\n let selectable;\n let result = false;\n for (let i = 0; i < selectables.length; i++) {\n selectable = selectables[i];\n result = selectable.finalize(cssSelector, matchedCallback) || result;\n }\n return result;\n }\n /** @internal */\n _matchPartial(map, name, cssSelector, matchedCallback) {\n if (!map || typeof name !== 'string') {\n return false;\n }\n const nestedSelector = map.get(name);\n if (!nestedSelector) {\n return false;\n }\n // TODO(perf): get rid of recursion and measure again\n // TODO(perf): don't pass the whole selector into the recursion,\n // but only the not processed parts\n return nestedSelector.match(cssSelector, matchedCallback);\n }\n}\nclass SelectorListContext {\n constructor(selectors) {\n this.selectors = selectors;\n this.alreadyMatched = false;\n }\n}\n// Store context to pass back selector and context when a selector is matched\nclass SelectorContext {\n constructor(selector, cbContext, listContext) {\n this.selector = selector;\n this.cbContext = cbContext;\n this.listContext = listContext;\n this.notSelectors = selector.notSelectors;\n }\n finalize(cssSelector, callback) {\n let result = true;\n if (this.notSelectors.length > 0 && (!this.listContext || !this.listContext.alreadyMatched)) {\n const notMatcher = SelectorMatcher.createNotMatcher(this.notSelectors);\n result = !notMatcher.match(cssSelector, null);\n }\n if (result && callback && (!this.listContext || !this.listContext.alreadyMatched)) {\n if (this.listContext) {\n this.listContext.alreadyMatched = true;\n }\n callback(this.selector, this.cbContext);\n }\n return result;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not\n// explicitly set.\nconst emitDistinctChangesOnlyDefaultValue = true;\nvar ViewEncapsulation;\n(function (ViewEncapsulation) {\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n})(ViewEncapsulation || (ViewEncapsulation = {}));\nvar ChangeDetectionStrategy;\n(function (ChangeDetectionStrategy) {\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));\nconst CUSTOM_ELEMENTS_SCHEMA = {\n name: 'custom-elements'\n};\nconst NO_ERRORS_SCHEMA = {\n name: 'no-errors-schema'\n};\nconst Type$1 = Function;\nvar SecurityContext;\n(function (SecurityContext) {\n SecurityContext[SecurityContext[\"NONE\"] = 0] = \"NONE\";\n SecurityContext[SecurityContext[\"HTML\"] = 1] = \"HTML\";\n SecurityContext[SecurityContext[\"STYLE\"] = 2] = \"STYLE\";\n SecurityContext[SecurityContext[\"SCRIPT\"] = 3] = \"SCRIPT\";\n SecurityContext[SecurityContext[\"URL\"] = 4] = \"URL\";\n SecurityContext[SecurityContext[\"RESOURCE_URL\"] = 5] = \"RESOURCE_URL\";\n})(SecurityContext || (SecurityContext = {}));\nvar MissingTranslationStrategy;\n(function (MissingTranslationStrategy) {\n MissingTranslationStrategy[MissingTranslationStrategy[\"Error\"] = 0] = \"Error\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Warning\"] = 1] = \"Warning\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Ignore\"] = 2] = \"Ignore\";\n})(MissingTranslationStrategy || (MissingTranslationStrategy = {}));\nfunction parserSelectorToSimpleSelector(selector) {\n const classes = selector.classNames && selector.classNames.length ?\n [8 /* SelectorFlags.CLASS */, ...selector.classNames] :\n [];\n const elementName = selector.element && selector.element !== '*' ? selector.element : '';\n return [elementName, ...selector.attrs, ...classes];\n}\nfunction parserSelectorToNegativeSelector(selector) {\n const classes = selector.classNames && selector.classNames.length ?\n [8 /* SelectorFlags.CLASS */, ...selector.classNames] :\n [];\n if (selector.element) {\n return [\n 1 /* SelectorFlags.NOT */ | 4 /* SelectorFlags.ELEMENT */, selector.element, ...selector.attrs, ...classes\n ];\n }\n else if (selector.attrs.length) {\n return [1 /* SelectorFlags.NOT */ | 2 /* SelectorFlags.ATTRIBUTE */, ...selector.attrs, ...classes];\n }\n else {\n return selector.classNames && selector.classNames.length ?\n [1 /* SelectorFlags.NOT */ | 8 /* SelectorFlags.CLASS */, ...selector.classNames] :\n [];\n }\n}\nfunction parserSelectorToR3Selector(selector) {\n const positive = parserSelectorToSimpleSelector(selector);\n const negative = selector.notSelectors && selector.notSelectors.length ?\n selector.notSelectors.map(notSelector => parserSelectorToNegativeSelector(notSelector)) :\n [];\n return positive.concat(...negative);\n}\nfunction parseSelectorToR3Selector(selector) {\n return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];\n}\n\nvar core = /*#__PURE__*/Object.freeze({\n __proto__: null,\n emitDistinctChangesOnlyDefaultValue: emitDistinctChangesOnlyDefaultValue,\n get ViewEncapsulation () { return ViewEncapsulation; },\n get ChangeDetectionStrategy () { return ChangeDetectionStrategy; },\n CUSTOM_ELEMENTS_SCHEMA: CUSTOM_ELEMENTS_SCHEMA,\n NO_ERRORS_SCHEMA: NO_ERRORS_SCHEMA,\n Type: Type$1,\n get SecurityContext () { return SecurityContext; },\n get MissingTranslationStrategy () { return MissingTranslationStrategy; },\n parseSelectorToR3Selector: parseSelectorToR3Selector\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nfunction dashCaseToCamelCase(input) {\n return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());\n}\nfunction splitAtColon(input, defaultValues) {\n return _splitAt(input, ':', defaultValues);\n}\nfunction splitAtPeriod(input, defaultValues) {\n return _splitAt(input, '.', defaultValues);\n}\nfunction _splitAt(input, character, defaultValues) {\n const characterIndex = input.indexOf(character);\n if (characterIndex == -1)\n return defaultValues;\n return [input.slice(0, characterIndex).trim(), input.slice(characterIndex + 1).trim()];\n}\nfunction noUndefined(val) {\n return val === undefined ? null : val;\n}\nfunction error(msg) {\n throw new Error(`Internal Error: ${msg}`);\n}\n// Escape characters that have a special meaning in Regular Expressions\nfunction escapeRegExp(s) {\n return s.replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g, '\\\\$1');\n}\nfunction utf8Encode(str) {\n let encoded = [];\n for (let index = 0; index < str.length; index++) {\n let codePoint = str.charCodeAt(index);\n // decode surrogate\n // see https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n if (codePoint >= 0xd800 && codePoint <= 0xdbff && str.length > (index + 1)) {\n const low = str.charCodeAt(index + 1);\n if (low >= 0xdc00 && low <= 0xdfff) {\n index++;\n codePoint = ((codePoint - 0xd800) << 10) + low - 0xdc00 + 0x10000;\n }\n }\n if (codePoint <= 0x7f) {\n encoded.push(codePoint);\n }\n else if (codePoint <= 0x7ff) {\n encoded.push(((codePoint >> 6) & 0x1F) | 0xc0, (codePoint & 0x3f) | 0x80);\n }\n else if (codePoint <= 0xffff) {\n encoded.push((codePoint >> 12) | 0xe0, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);\n }\n else if (codePoint <= 0x1fffff) {\n encoded.push(((codePoint >> 18) & 0x07) | 0xf0, ((codePoint >> 12) & 0x3f) | 0x80, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);\n }\n }\n return encoded;\n}\nfunction stringify(token) {\n if (typeof token === 'string') {\n return token;\n }\n if (Array.isArray(token)) {\n return '[' + token.map(stringify).join(', ') + ']';\n }\n if (token == null) {\n return '' + token;\n }\n if (token.overriddenName) {\n return `${token.overriddenName}`;\n }\n if (token.name) {\n return `${token.name}`;\n }\n if (!token.toString) {\n return 'object';\n }\n // WARNING: do not try to `JSON.stringify(token)` here\n // see https://github.com/angular/angular/issues/23440\n const res = token.toString();\n if (res == null) {\n return '' + res;\n }\n const newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\nclass Version {\n constructor(full) {\n this.full = full;\n const splits = full.split('.');\n this.major = splits[0];\n this.minor = splits[1];\n this.patch = splits.slice(2).join('.');\n }\n}\n// Check `global` first, because in Node tests both `global` and `window` may be defined and our\n// `_global` variable should point to the NodeJS `global` in that case. Note: Typeof/Instanceof\n// checks are considered side-effects in Terser. We explicitly mark this as side-effect free:\n// https://github.com/terser/terser/issues/250.\nconst _global = ( /* @__PURE__ */(() => (typeof global !== 'undefined' && global) || (typeof window !== 'undefined' && window) ||\n (typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self))());\nfunction newArray(size, value) {\n const list = [];\n for (let i = 0; i < size; i++) {\n list.push(value);\n }\n return list;\n}\n/**\n * Partitions a given array into 2 arrays, based on a boolean value returned by the condition\n * function.\n *\n * @param arr Input array that should be partitioned\n * @param conditionFn Condition function that is called for each item in a given array and returns a\n * boolean value.\n */\nfunction partitionArray(arr, conditionFn) {\n const truthy = [];\n const falsy = [];\n for (const item of arr) {\n (conditionFn(item) ? truthy : falsy).push(item);\n }\n return [truthy, falsy];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents a big integer using a buffer of its individual digits, with the least significant\n * digit stored at the beginning of the array (little endian).\n *\n * For performance reasons, each instance is mutable. The addition operation can be done in-place\n * to reduce memory pressure of allocation for the digits array.\n */\nclass BigInteger {\n /**\n * Creates a big integer using its individual digits in little endian storage.\n */\n constructor(digits) {\n this.digits = digits;\n }\n static zero() {\n return new BigInteger([0]);\n }\n static one() {\n return new BigInteger([1]);\n }\n /**\n * Creates a clone of this instance.\n */\n clone() {\n return new BigInteger(this.digits.slice());\n }\n /**\n * Returns a new big integer with the sum of `this` and `other` as its value. This does not mutate\n * `this` but instead returns a new instance, unlike `addToSelf`.\n */\n add(other) {\n const result = this.clone();\n result.addToSelf(other);\n return result;\n }\n /**\n * Adds `other` to the instance itself, thereby mutating its value.\n */\n addToSelf(other) {\n const maxNrOfDigits = Math.max(this.digits.length, other.digits.length);\n let carry = 0;\n for (let i = 0; i < maxNrOfDigits; i++) {\n let digitSum = carry;\n if (i < this.digits.length) {\n digitSum += this.digits[i];\n }\n if (i < other.digits.length) {\n digitSum += other.digits[i];\n }\n if (digitSum >= 10) {\n this.digits[i] = digitSum - 10;\n carry = 1;\n }\n else {\n this.digits[i] = digitSum;\n carry = 0;\n }\n }\n // Apply a remaining carry if needed.\n if (carry > 0) {\n this.digits[maxNrOfDigits] = 1;\n }\n }\n /**\n * Builds the decimal string representation of the big integer. As this is stored in\n * little endian, the digits are concatenated in reverse order.\n */\n toString() {\n let res = '';\n for (let i = this.digits.length - 1; i >= 0; i--) {\n res += this.digits[i];\n }\n return res;\n }\n}\n/**\n * Represents a big integer which is optimized for multiplication operations, as its power-of-twos\n * are memoized. See `multiplyBy()` for details on the multiplication algorithm.\n */\nclass BigIntForMultiplication {\n constructor(value) {\n this.powerOfTwos = [value];\n }\n /**\n * Returns the big integer itself.\n */\n getValue() {\n return this.powerOfTwos[0];\n }\n /**\n * Computes the value for `num * b`, where `num` is a JS number and `b` is a big integer. The\n * value for `b` is represented by a storage model that is optimized for this computation.\n *\n * This operation is implemented in N(log2(num)) by continuous halving of the number, where the\n * least-significant bit (LSB) is tested in each iteration. If the bit is set, the bit's index is\n * used as exponent into the power-of-two multiplication of `b`.\n *\n * As an example, consider the multiplication num=42, b=1337. In binary 42 is 0b00101010 and the\n * algorithm unrolls into the following iterations:\n *\n * Iteration | num | LSB | b * 2^iter | Add? | product\n * -----------|------------|------|------------|------|--------\n * 0 | 0b00101010 | 0 | 1337 | No | 0\n * 1 | 0b00010101 | 1 | 2674 | Yes | 2674\n * 2 | 0b00001010 | 0 | 5348 | No | 2674\n * 3 | 0b00000101 | 1 | 10696 | Yes | 13370\n * 4 | 0b00000010 | 0 | 21392 | No | 13370\n * 5 | 0b00000001 | 1 | 42784 | Yes | 56154\n * 6 | 0b00000000 | 0 | 85568 | No | 56154\n *\n * The computed product of 56154 is indeed the correct result.\n *\n * The `BigIntForMultiplication` representation for a big integer provides memoized access to the\n * power-of-two values to reduce the workload in computing those values.\n */\n multiplyBy(num) {\n const product = BigInteger.zero();\n this.multiplyByAndAddTo(num, product);\n return product;\n }\n /**\n * See `multiplyBy()` for details. This function allows for the computed product to be added\n * directly to the provided result big integer.\n */\n multiplyByAndAddTo(num, result) {\n for (let exponent = 0; num !== 0; num = num >>> 1, exponent++) {\n if (num & 1) {\n const value = this.getMultipliedByPowerOfTwo(exponent);\n result.addToSelf(value);\n }\n }\n }\n /**\n * Computes and memoizes the big integer value for `this.number * 2^exponent`.\n */\n getMultipliedByPowerOfTwo(exponent) {\n // Compute the powers up until the requested exponent, where each value is computed from its\n // predecessor. This is simple as `this.number * 2^(exponent - 1)` only has to be doubled (i.e.\n // added to itself) to reach `this.number * 2^exponent`.\n for (let i = this.powerOfTwos.length; i <= exponent; i++) {\n const previousPower = this.powerOfTwos[i - 1];\n this.powerOfTwos[i] = previousPower.add(previousPower);\n }\n return this.powerOfTwos[exponent];\n }\n}\n/**\n * Represents an exponentiation operation for the provided base, of which exponents are computed and\n * memoized. The results are represented by a `BigIntForMultiplication` which is tailored for\n * multiplication operations by memoizing the power-of-twos. This effectively results in a matrix\n * representation that is lazily computed upon request.\n */\nclass BigIntExponentiation {\n constructor(base) {\n this.base = base;\n this.exponents = [new BigIntForMultiplication(BigInteger.one())];\n }\n /**\n * Compute the value for `this.base^exponent`, resulting in a big integer that is optimized for\n * further multiplication operations.\n */\n toThePowerOf(exponent) {\n // Compute the results up until the requested exponent, where every value is computed from its\n // predecessor. This is because `this.base^(exponent - 1)` only has to be multiplied by `base`\n // to reach `this.base^exponent`.\n for (let i = this.exponents.length; i <= exponent; i++) {\n const value = this.exponents[i - 1].multiplyBy(this.base);\n this.exponents[i] = new BigIntForMultiplication(value);\n }\n return this.exponents[exponent];\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Return the message id or compute it using the XLIFF1 digest.\n */\nfunction digest$1(message) {\n return message.id || computeDigest(message);\n}\n/**\n * Compute the message id using the XLIFF1 digest.\n */\nfunction computeDigest(message) {\n return sha1(serializeNodes(message.nodes).join('') + `[${message.meaning}]`);\n}\n/**\n * Return the message id or compute it using the XLIFF2/XMB/$localize digest.\n */\nfunction decimalDigest(message) {\n return message.id || computeDecimalDigest(message);\n}\n/**\n * Compute the message id using the XLIFF2/XMB/$localize digest.\n */\nfunction computeDecimalDigest(message) {\n const visitor = new _SerializerIgnoreIcuExpVisitor();\n const parts = message.nodes.map(a => a.visit(visitor, null));\n return computeMsgId(parts.join(''), message.meaning);\n}\n/**\n * Serialize the i18n ast to something xml-like in order to generate an UID.\n *\n * The visitor is also used in the i18n parser tests\n *\n * @internal\n */\nclass _SerializerVisitor {\n visitText(text, context) {\n return text.value;\n }\n visitContainer(container, context) {\n return `[${container.children.map(child => child.visit(this)).join(', ')}]`;\n }\n visitIcu(icu, context) {\n const strCases = Object.keys(icu.cases).map((k) => `${k} {${icu.cases[k].visit(this)}}`);\n return `{${icu.expression}, ${icu.type}, ${strCases.join(', ')}}`;\n }\n visitTagPlaceholder(ph, context) {\n return ph.isVoid ?\n `` :\n `${ph.children.map(child => child.visit(this)).join(', ')}`;\n }\n visitPlaceholder(ph, context) {\n return ph.value ? `${ph.value}` : ``;\n }\n visitIcuPlaceholder(ph, context) {\n return `${ph.value.visit(this)}`;\n }\n}\nconst serializerVisitor$1 = new _SerializerVisitor();\nfunction serializeNodes(nodes) {\n return nodes.map(a => a.visit(serializerVisitor$1, null));\n}\n/**\n * Serialize the i18n ast to something xml-like in order to generate an UID.\n *\n * Ignore the ICU expressions so that message IDs stays identical if only the expression changes.\n *\n * @internal\n */\nclass _SerializerIgnoreIcuExpVisitor extends _SerializerVisitor {\n visitIcu(icu, context) {\n let strCases = Object.keys(icu.cases).map((k) => `${k} {${icu.cases[k].visit(this)}}`);\n // Do not take the expression into account\n return `{${icu.type}, ${strCases.join(', ')}}`;\n }\n}\n/**\n * Compute the SHA1 of the given string\n *\n * see https://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf\n *\n * WARNING: this function has not been designed not tested with security in mind.\n * DO NOT USE IT IN A SECURITY SENSITIVE CONTEXT.\n */\nfunction sha1(str) {\n const utf8 = utf8Encode(str);\n const words32 = bytesToWords32(utf8, Endian.Big);\n const len = utf8.length * 8;\n const w = newArray(80);\n let a = 0x67452301, b = 0xefcdab89, c = 0x98badcfe, d = 0x10325476, e = 0xc3d2e1f0;\n words32[len >> 5] |= 0x80 << (24 - len % 32);\n words32[((len + 64 >> 9) << 4) + 15] = len;\n for (let i = 0; i < words32.length; i += 16) {\n const h0 = a, h1 = b, h2 = c, h3 = d, h4 = e;\n for (let j = 0; j < 80; j++) {\n if (j < 16) {\n w[j] = words32[i + j];\n }\n else {\n w[j] = rol32(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);\n }\n const fkVal = fk(j, b, c, d);\n const f = fkVal[0];\n const k = fkVal[1];\n const temp = [rol32(a, 5), f, e, k, w[j]].reduce(add32);\n e = d;\n d = c;\n c = rol32(b, 30);\n b = a;\n a = temp;\n }\n a = add32(a, h0);\n b = add32(b, h1);\n c = add32(c, h2);\n d = add32(d, h3);\n e = add32(e, h4);\n }\n return bytesToHexString(words32ToByteString([a, b, c, d, e]));\n}\nfunction fk(index, b, c, d) {\n if (index < 20) {\n return [(b & c) | (~b & d), 0x5a827999];\n }\n if (index < 40) {\n return [b ^ c ^ d, 0x6ed9eba1];\n }\n if (index < 60) {\n return [(b & c) | (b & d) | (c & d), 0x8f1bbcdc];\n }\n return [b ^ c ^ d, 0xca62c1d6];\n}\n/**\n * Compute the fingerprint of the given string\n *\n * The output is 64 bit number encoded as a decimal string\n *\n * based on:\n * https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/GoogleJsMessageIdGenerator.java\n */\nfunction fingerprint(str) {\n const utf8 = utf8Encode(str);\n let hi = hash32(utf8, 0);\n let lo = hash32(utf8, 102072);\n if (hi == 0 && (lo == 0 || lo == 1)) {\n hi = hi ^ 0x130f9bef;\n lo = lo ^ -0x6b5f56d8;\n }\n return [hi, lo];\n}\nfunction computeMsgId(msg, meaning = '') {\n let msgFingerprint = fingerprint(msg);\n if (meaning) {\n const meaningFingerprint = fingerprint(meaning);\n msgFingerprint = add64(rol64(msgFingerprint, 1), meaningFingerprint);\n }\n const hi = msgFingerprint[0];\n const lo = msgFingerprint[1];\n return wordsToDecimalString(hi & 0x7fffffff, lo);\n}\nfunction hash32(bytes, c) {\n let a = 0x9e3779b9, b = 0x9e3779b9;\n let i;\n const len = bytes.length;\n for (i = 0; i + 12 <= len; i += 12) {\n a = add32(a, wordAt(bytes, i, Endian.Little));\n b = add32(b, wordAt(bytes, i + 4, Endian.Little));\n c = add32(c, wordAt(bytes, i + 8, Endian.Little));\n const res = mix(a, b, c);\n a = res[0], b = res[1], c = res[2];\n }\n a = add32(a, wordAt(bytes, i, Endian.Little));\n b = add32(b, wordAt(bytes, i + 4, Endian.Little));\n // the first byte of c is reserved for the length\n c = add32(c, len);\n c = add32(c, wordAt(bytes, i + 8, Endian.Little) << 8);\n return mix(a, b, c)[2];\n}\n// clang-format off\nfunction mix(a, b, c) {\n a = sub32(a, b);\n a = sub32(a, c);\n a ^= c >>> 13;\n b = sub32(b, c);\n b = sub32(b, a);\n b ^= a << 8;\n c = sub32(c, a);\n c = sub32(c, b);\n c ^= b >>> 13;\n a = sub32(a, b);\n a = sub32(a, c);\n a ^= c >>> 12;\n b = sub32(b, c);\n b = sub32(b, a);\n b ^= a << 16;\n c = sub32(c, a);\n c = sub32(c, b);\n c ^= b >>> 5;\n a = sub32(a, b);\n a = sub32(a, c);\n a ^= c >>> 3;\n b = sub32(b, c);\n b = sub32(b, a);\n b ^= a << 10;\n c = sub32(c, a);\n c = sub32(c, b);\n c ^= b >>> 15;\n return [a, b, c];\n}\n// clang-format on\n// Utils\nvar Endian;\n(function (Endian) {\n Endian[Endian[\"Little\"] = 0] = \"Little\";\n Endian[Endian[\"Big\"] = 1] = \"Big\";\n})(Endian || (Endian = {}));\nfunction add32(a, b) {\n return add32to64(a, b)[1];\n}\nfunction add32to64(a, b) {\n const low = (a & 0xffff) + (b & 0xffff);\n const high = (a >>> 16) + (b >>> 16) + (low >>> 16);\n return [high >>> 16, (high << 16) | (low & 0xffff)];\n}\nfunction add64(a, b) {\n const ah = a[0], al = a[1];\n const bh = b[0], bl = b[1];\n const result = add32to64(al, bl);\n const carry = result[0];\n const l = result[1];\n const h = add32(add32(ah, bh), carry);\n return [h, l];\n}\nfunction sub32(a, b) {\n const low = (a & 0xffff) - (b & 0xffff);\n const high = (a >> 16) - (b >> 16) + (low >> 16);\n return (high << 16) | (low & 0xffff);\n}\n// Rotate a 32b number left `count` position\nfunction rol32(a, count) {\n return (a << count) | (a >>> (32 - count));\n}\n// Rotate a 64b number left `count` position\nfunction rol64(num, count) {\n const hi = num[0], lo = num[1];\n const h = (hi << count) | (lo >>> (32 - count));\n const l = (lo << count) | (hi >>> (32 - count));\n return [h, l];\n}\nfunction bytesToWords32(bytes, endian) {\n const size = (bytes.length + 3) >>> 2;\n const words32 = [];\n for (let i = 0; i < size; i++) {\n words32[i] = wordAt(bytes, i * 4, endian);\n }\n return words32;\n}\nfunction byteAt(bytes, index) {\n return index >= bytes.length ? 0 : bytes[index];\n}\nfunction wordAt(bytes, index, endian) {\n let word = 0;\n if (endian === Endian.Big) {\n for (let i = 0; i < 4; i++) {\n word += byteAt(bytes, index + i) << (24 - 8 * i);\n }\n }\n else {\n for (let i = 0; i < 4; i++) {\n word += byteAt(bytes, index + i) << 8 * i;\n }\n }\n return word;\n}\nfunction words32ToByteString(words32) {\n return words32.reduce((bytes, word) => bytes.concat(word32ToByteString(word)), []);\n}\nfunction word32ToByteString(word) {\n let bytes = [];\n for (let i = 0; i < 4; i++) {\n bytes.push((word >>> 8 * (3 - i)) & 0xff);\n }\n return bytes;\n}\nfunction bytesToHexString(bytes) {\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n const b = byteAt(bytes, i);\n hex += (b >>> 4).toString(16) + (b & 0x0f).toString(16);\n }\n return hex.toLowerCase();\n}\n/**\n * Create a shared exponentiation pool for base-256 computations. This shared pool provides memoized\n * power-of-256 results with memoized power-of-two computations for efficient multiplication.\n *\n * For our purposes, this can be safely stored as a global without memory concerns. The reason is\n * that we encode two words, so only need the 0th (for the low word) and 4th (for the high word)\n * exponent.\n */\nconst base256 = new BigIntExponentiation(256);\n/**\n * Represents two 32-bit words as a single decimal number. This requires a big integer storage\n * model as JS numbers are not accurate enough to represent the 64-bit number.\n *\n * Based on https://www.danvk.org/hex2dec.html\n */\nfunction wordsToDecimalString(hi, lo) {\n // Encode the four bytes in lo in the lower digits of the decimal number.\n // Note: the multiplication results in lo itself but represented by a big integer using its\n // decimal digits.\n const decimal = base256.toThePowerOf(0).multiplyBy(lo);\n // Encode the four bytes in hi above the four lo bytes. lo is a maximum of (2^8)^4, which is why\n // this multiplication factor is applied.\n base256.toThePowerOf(4).multiplyByAndAddTo(hi, decimal);\n return decimal.toString();\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n//// Types\nvar TypeModifier;\n(function (TypeModifier) {\n TypeModifier[TypeModifier[\"None\"] = 0] = \"None\";\n TypeModifier[TypeModifier[\"Const\"] = 1] = \"Const\";\n})(TypeModifier || (TypeModifier = {}));\nclass Type {\n constructor(modifiers = TypeModifier.None) {\n this.modifiers = modifiers;\n }\n hasModifier(modifier) {\n return (this.modifiers & modifier) !== 0;\n }\n}\nvar BuiltinTypeName;\n(function (BuiltinTypeName) {\n BuiltinTypeName[BuiltinTypeName[\"Dynamic\"] = 0] = \"Dynamic\";\n BuiltinTypeName[BuiltinTypeName[\"Bool\"] = 1] = \"Bool\";\n BuiltinTypeName[BuiltinTypeName[\"String\"] = 2] = \"String\";\n BuiltinTypeName[BuiltinTypeName[\"Int\"] = 3] = \"Int\";\n BuiltinTypeName[BuiltinTypeName[\"Number\"] = 4] = \"Number\";\n BuiltinTypeName[BuiltinTypeName[\"Function\"] = 5] = \"Function\";\n BuiltinTypeName[BuiltinTypeName[\"Inferred\"] = 6] = \"Inferred\";\n BuiltinTypeName[BuiltinTypeName[\"None\"] = 7] = \"None\";\n})(BuiltinTypeName || (BuiltinTypeName = {}));\nclass BuiltinType extends Type {\n constructor(name, modifiers) {\n super(modifiers);\n this.name = name;\n }\n visitType(visitor, context) {\n return visitor.visitBuiltinType(this, context);\n }\n}\nclass ExpressionType extends Type {\n constructor(value, modifiers, typeParams = null) {\n super(modifiers);\n this.value = value;\n this.typeParams = typeParams;\n }\n visitType(visitor, context) {\n return visitor.visitExpressionType(this, context);\n }\n}\nclass ArrayType extends Type {\n constructor(of, modifiers) {\n super(modifiers);\n this.of = of;\n }\n visitType(visitor, context) {\n return visitor.visitArrayType(this, context);\n }\n}\nclass MapType extends Type {\n constructor(valueType, modifiers) {\n super(modifiers);\n this.valueType = valueType || null;\n }\n visitType(visitor, context) {\n return visitor.visitMapType(this, context);\n }\n}\nconst DYNAMIC_TYPE = new BuiltinType(BuiltinTypeName.Dynamic);\nconst INFERRED_TYPE = new BuiltinType(BuiltinTypeName.Inferred);\nconst BOOL_TYPE = new BuiltinType(BuiltinTypeName.Bool);\nconst INT_TYPE = new BuiltinType(BuiltinTypeName.Int);\nconst NUMBER_TYPE = new BuiltinType(BuiltinTypeName.Number);\nconst STRING_TYPE = new BuiltinType(BuiltinTypeName.String);\nconst FUNCTION_TYPE = new BuiltinType(BuiltinTypeName.Function);\nconst NONE_TYPE = new BuiltinType(BuiltinTypeName.None);\n///// Expressions\nvar UnaryOperator;\n(function (UnaryOperator) {\n UnaryOperator[UnaryOperator[\"Minus\"] = 0] = \"Minus\";\n UnaryOperator[UnaryOperator[\"Plus\"] = 1] = \"Plus\";\n})(UnaryOperator || (UnaryOperator = {}));\nvar BinaryOperator;\n(function (BinaryOperator) {\n BinaryOperator[BinaryOperator[\"Equals\"] = 0] = \"Equals\";\n BinaryOperator[BinaryOperator[\"NotEquals\"] = 1] = \"NotEquals\";\n BinaryOperator[BinaryOperator[\"Identical\"] = 2] = \"Identical\";\n BinaryOperator[BinaryOperator[\"NotIdentical\"] = 3] = \"NotIdentical\";\n BinaryOperator[BinaryOperator[\"Minus\"] = 4] = \"Minus\";\n BinaryOperator[BinaryOperator[\"Plus\"] = 5] = \"Plus\";\n BinaryOperator[BinaryOperator[\"Divide\"] = 6] = \"Divide\";\n BinaryOperator[BinaryOperator[\"Multiply\"] = 7] = \"Multiply\";\n BinaryOperator[BinaryOperator[\"Modulo\"] = 8] = \"Modulo\";\n BinaryOperator[BinaryOperator[\"And\"] = 9] = \"And\";\n BinaryOperator[BinaryOperator[\"Or\"] = 10] = \"Or\";\n BinaryOperator[BinaryOperator[\"BitwiseAnd\"] = 11] = \"BitwiseAnd\";\n BinaryOperator[BinaryOperator[\"Lower\"] = 12] = \"Lower\";\n BinaryOperator[BinaryOperator[\"LowerEquals\"] = 13] = \"LowerEquals\";\n BinaryOperator[BinaryOperator[\"Bigger\"] = 14] = \"Bigger\";\n BinaryOperator[BinaryOperator[\"BiggerEquals\"] = 15] = \"BiggerEquals\";\n BinaryOperator[BinaryOperator[\"NullishCoalesce\"] = 16] = \"NullishCoalesce\";\n})(BinaryOperator || (BinaryOperator = {}));\nfunction nullSafeIsEquivalent(base, other) {\n if (base == null || other == null) {\n return base == other;\n }\n return base.isEquivalent(other);\n}\nfunction areAllEquivalentPredicate(base, other, equivalentPredicate) {\n const len = base.length;\n if (len !== other.length) {\n return false;\n }\n for (let i = 0; i < len; i++) {\n if (!equivalentPredicate(base[i], other[i])) {\n return false;\n }\n }\n return true;\n}\nfunction areAllEquivalent(base, other) {\n return areAllEquivalentPredicate(base, other, (baseElement, otherElement) => baseElement.isEquivalent(otherElement));\n}\nclass Expression {\n constructor(type, sourceSpan) {\n this.type = type || null;\n this.sourceSpan = sourceSpan || null;\n }\n prop(name, sourceSpan) {\n return new ReadPropExpr(this, name, null, sourceSpan);\n }\n key(index, type, sourceSpan) {\n return new ReadKeyExpr(this, index, type, sourceSpan);\n }\n callFn(params, sourceSpan, pure) {\n return new InvokeFunctionExpr(this, params, null, sourceSpan, pure);\n }\n instantiate(params, type, sourceSpan) {\n return new InstantiateExpr(this, params, type, sourceSpan);\n }\n conditional(trueCase, falseCase = null, sourceSpan) {\n return new ConditionalExpr(this, trueCase, falseCase, null, sourceSpan);\n }\n equals(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Equals, this, rhs, null, sourceSpan);\n }\n notEquals(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.NotEquals, this, rhs, null, sourceSpan);\n }\n identical(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Identical, this, rhs, null, sourceSpan);\n }\n notIdentical(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.NotIdentical, this, rhs, null, sourceSpan);\n }\n minus(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Minus, this, rhs, null, sourceSpan);\n }\n plus(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Plus, this, rhs, null, sourceSpan);\n }\n divide(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Divide, this, rhs, null, sourceSpan);\n }\n multiply(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Multiply, this, rhs, null, sourceSpan);\n }\n modulo(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Modulo, this, rhs, null, sourceSpan);\n }\n and(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.And, this, rhs, null, sourceSpan);\n }\n bitwiseAnd(rhs, sourceSpan, parens = true) {\n return new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, this, rhs, null, sourceSpan, parens);\n }\n or(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Or, this, rhs, null, sourceSpan);\n }\n lower(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Lower, this, rhs, null, sourceSpan);\n }\n lowerEquals(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.LowerEquals, this, rhs, null, sourceSpan);\n }\n bigger(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Bigger, this, rhs, null, sourceSpan);\n }\n biggerEquals(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.BiggerEquals, this, rhs, null, sourceSpan);\n }\n isBlank(sourceSpan) {\n // Note: We use equals by purpose here to compare to null and undefined in JS.\n // We use the typed null to allow strictNullChecks to narrow types.\n return this.equals(TYPED_NULL_EXPR, sourceSpan);\n }\n nullishCoalesce(rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.NullishCoalesce, this, rhs, null, sourceSpan);\n }\n toStmt() {\n return new ExpressionStatement(this, null);\n }\n}\nclass ReadVarExpr extends Expression {\n constructor(name, type, sourceSpan) {\n super(type, sourceSpan);\n this.name = name;\n }\n isEquivalent(e) {\n return e instanceof ReadVarExpr && this.name === e.name;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitReadVarExpr(this, context);\n }\n set(value) {\n return new WriteVarExpr(this.name, value, null, this.sourceSpan);\n }\n}\nclass TypeofExpr extends Expression {\n constructor(expr, type, sourceSpan) {\n super(type, sourceSpan);\n this.expr = expr;\n }\n visitExpression(visitor, context) {\n return visitor.visitTypeofExpr(this, context);\n }\n isEquivalent(e) {\n return e instanceof TypeofExpr && e.expr.isEquivalent(this.expr);\n }\n isConstant() {\n return this.expr.isConstant();\n }\n}\nclass WrappedNodeExpr extends Expression {\n constructor(node, type, sourceSpan) {\n super(type, sourceSpan);\n this.node = node;\n }\n isEquivalent(e) {\n return e instanceof WrappedNodeExpr && this.node === e.node;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitWrappedNodeExpr(this, context);\n }\n}\nclass WriteVarExpr extends Expression {\n constructor(name, value, type, sourceSpan) {\n super(type || value.type, sourceSpan);\n this.name = name;\n this.value = value;\n }\n isEquivalent(e) {\n return e instanceof WriteVarExpr && this.name === e.name && this.value.isEquivalent(e.value);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitWriteVarExpr(this, context);\n }\n toDeclStmt(type, modifiers) {\n return new DeclareVarStmt(this.name, this.value, type, modifiers, this.sourceSpan);\n }\n toConstDecl() {\n return this.toDeclStmt(INFERRED_TYPE, StmtModifier.Final);\n }\n}\nclass WriteKeyExpr extends Expression {\n constructor(receiver, index, value, type, sourceSpan) {\n super(type || value.type, sourceSpan);\n this.receiver = receiver;\n this.index = index;\n this.value = value;\n }\n isEquivalent(e) {\n return e instanceof WriteKeyExpr && this.receiver.isEquivalent(e.receiver) &&\n this.index.isEquivalent(e.index) && this.value.isEquivalent(e.value);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitWriteKeyExpr(this, context);\n }\n}\nclass WritePropExpr extends Expression {\n constructor(receiver, name, value, type, sourceSpan) {\n super(type || value.type, sourceSpan);\n this.receiver = receiver;\n this.name = name;\n this.value = value;\n }\n isEquivalent(e) {\n return e instanceof WritePropExpr && this.receiver.isEquivalent(e.receiver) &&\n this.name === e.name && this.value.isEquivalent(e.value);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitWritePropExpr(this, context);\n }\n}\nclass InvokeFunctionExpr extends Expression {\n constructor(fn, args, type, sourceSpan, pure = false) {\n super(type, sourceSpan);\n this.fn = fn;\n this.args = args;\n this.pure = pure;\n }\n isEquivalent(e) {\n return e instanceof InvokeFunctionExpr && this.fn.isEquivalent(e.fn) &&\n areAllEquivalent(this.args, e.args) && this.pure === e.pure;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitInvokeFunctionExpr(this, context);\n }\n}\nclass TaggedTemplateExpr extends Expression {\n constructor(tag, template, type, sourceSpan) {\n super(type, sourceSpan);\n this.tag = tag;\n this.template = template;\n }\n isEquivalent(e) {\n return e instanceof TaggedTemplateExpr && this.tag.isEquivalent(e.tag) &&\n areAllEquivalentPredicate(this.template.elements, e.template.elements, (a, b) => a.text === b.text) &&\n areAllEquivalent(this.template.expressions, e.template.expressions);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitTaggedTemplateExpr(this, context);\n }\n}\nclass InstantiateExpr extends Expression {\n constructor(classExpr, args, type, sourceSpan) {\n super(type, sourceSpan);\n this.classExpr = classExpr;\n this.args = args;\n }\n isEquivalent(e) {\n return e instanceof InstantiateExpr && this.classExpr.isEquivalent(e.classExpr) &&\n areAllEquivalent(this.args, e.args);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitInstantiateExpr(this, context);\n }\n}\nclass LiteralExpr extends Expression {\n constructor(value, type, sourceSpan) {\n super(type, sourceSpan);\n this.value = value;\n }\n isEquivalent(e) {\n return e instanceof LiteralExpr && this.value === e.value;\n }\n isConstant() {\n return true;\n }\n visitExpression(visitor, context) {\n return visitor.visitLiteralExpr(this, context);\n }\n}\nclass TemplateLiteral {\n constructor(elements, expressions) {\n this.elements = elements;\n this.expressions = expressions;\n }\n}\nclass TemplateLiteralElement {\n constructor(text, sourceSpan, rawText) {\n this.text = text;\n this.sourceSpan = sourceSpan;\n // If `rawText` is not provided, try to extract the raw string from its\n // associated `sourceSpan`. If that is also not available, \"fake\" the raw\n // string instead by escaping the following control sequences:\n // - \"\\\" would otherwise indicate that the next character is a control character.\n // - \"`\" and \"${\" are template string control sequences that would otherwise prematurely\n // indicate the end of the template literal element.\n this.rawText =\n rawText ?? sourceSpan?.toString() ?? escapeForTemplateLiteral(escapeSlashes(text));\n }\n}\nclass LiteralPiece {\n constructor(text, sourceSpan) {\n this.text = text;\n this.sourceSpan = sourceSpan;\n }\n}\nclass PlaceholderPiece {\n /**\n * Create a new instance of a `PlaceholderPiece`.\n *\n * @param text the name of this placeholder (e.g. `PH_1`).\n * @param sourceSpan the location of this placeholder in its localized message the source code.\n * @param associatedMessage reference to another message that this placeholder is associated with.\n * The `associatedMessage` is mainly used to provide a relationship to an ICU message that has\n * been extracted out from the message containing the placeholder.\n */\n constructor(text, sourceSpan, associatedMessage) {\n this.text = text;\n this.sourceSpan = sourceSpan;\n this.associatedMessage = associatedMessage;\n }\n}\nconst MEANING_SEPARATOR$1 = '|';\nconst ID_SEPARATOR$1 = '@@';\nconst LEGACY_ID_INDICATOR = '␟';\nclass LocalizedString extends Expression {\n constructor(metaBlock, messageParts, placeHolderNames, expressions, sourceSpan) {\n super(STRING_TYPE, sourceSpan);\n this.metaBlock = metaBlock;\n this.messageParts = messageParts;\n this.placeHolderNames = placeHolderNames;\n this.expressions = expressions;\n }\n isEquivalent(e) {\n // return e instanceof LocalizedString && this.message === e.message;\n return false;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitLocalizedString(this, context);\n }\n /**\n * Serialize the given `meta` and `messagePart` into \"cooked\" and \"raw\" strings that can be used\n * in a `$localize` tagged string. The format of the metadata is the same as that parsed by\n * `parseI18nMeta()`.\n *\n * @param meta The metadata to serialize\n * @param messagePart The first part of the tagged string\n */\n serializeI18nHead() {\n let metaBlock = this.metaBlock.description || '';\n if (this.metaBlock.meaning) {\n metaBlock = `${this.metaBlock.meaning}${MEANING_SEPARATOR$1}${metaBlock}`;\n }\n if (this.metaBlock.customId) {\n metaBlock = `${metaBlock}${ID_SEPARATOR$1}${this.metaBlock.customId}`;\n }\n if (this.metaBlock.legacyIds) {\n this.metaBlock.legacyIds.forEach(legacyId => {\n metaBlock = `${metaBlock}${LEGACY_ID_INDICATOR}${legacyId}`;\n });\n }\n return createCookedRawString(metaBlock, this.messageParts[0].text, this.getMessagePartSourceSpan(0));\n }\n getMessagePartSourceSpan(i) {\n return this.messageParts[i]?.sourceSpan ?? this.sourceSpan;\n }\n getPlaceholderSourceSpan(i) {\n return this.placeHolderNames[i]?.sourceSpan ?? this.expressions[i]?.sourceSpan ??\n this.sourceSpan;\n }\n /**\n * Serialize the given `placeholderName` and `messagePart` into \"cooked\" and \"raw\" strings that\n * can be used in a `$localize` tagged string.\n *\n * The format is `:[@@]:`.\n *\n * The `associated-id` is the message id of the (usually an ICU) message to which this placeholder\n * refers.\n *\n * @param partIndex The index of the message part to serialize.\n */\n serializeI18nTemplatePart(partIndex) {\n const placeholder = this.placeHolderNames[partIndex - 1];\n const messagePart = this.messageParts[partIndex];\n let metaBlock = placeholder.text;\n if (placeholder.associatedMessage?.legacyIds.length === 0) {\n metaBlock += `${ID_SEPARATOR$1}${computeMsgId(placeholder.associatedMessage.messageString, placeholder.associatedMessage.meaning)}`;\n }\n return createCookedRawString(metaBlock, messagePart.text, this.getMessagePartSourceSpan(partIndex));\n }\n}\nconst escapeSlashes = (str) => str.replace(/\\\\/g, '\\\\\\\\');\nconst escapeStartingColon = (str) => str.replace(/^:/, '\\\\:');\nconst escapeColons = (str) => str.replace(/:/g, '\\\\:');\nconst escapeForTemplateLiteral = (str) => str.replace(/`/g, '\\\\`').replace(/\\${/g, '$\\\\{');\n/**\n * Creates a `{cooked, raw}` object from the `metaBlock` and `messagePart`.\n *\n * The `raw` text must have various character sequences escaped:\n * * \"\\\" would otherwise indicate that the next character is a control character.\n * * \"`\" and \"${\" are template string control sequences that would otherwise prematurely indicate\n * the end of a message part.\n * * \":\" inside a metablock would prematurely indicate the end of the metablock.\n * * \":\" at the start of a messagePart with no metablock would erroneously indicate the start of a\n * metablock.\n *\n * @param metaBlock Any metadata that should be prepended to the string\n * @param messagePart The message part of the string\n */\nfunction createCookedRawString(metaBlock, messagePart, range) {\n if (metaBlock === '') {\n return {\n cooked: messagePart,\n raw: escapeForTemplateLiteral(escapeStartingColon(escapeSlashes(messagePart))),\n range,\n };\n }\n else {\n return {\n cooked: `:${metaBlock}:${messagePart}`,\n raw: escapeForTemplateLiteral(`:${escapeColons(escapeSlashes(metaBlock))}:${escapeSlashes(messagePart)}`),\n range,\n };\n }\n}\nclass ExternalExpr extends Expression {\n constructor(value, type, typeParams = null, sourceSpan) {\n super(type, sourceSpan);\n this.value = value;\n this.typeParams = typeParams;\n }\n isEquivalent(e) {\n return e instanceof ExternalExpr && this.value.name === e.value.name &&\n this.value.moduleName === e.value.moduleName && this.value.runtime === e.value.runtime;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitExternalExpr(this, context);\n }\n}\nclass ExternalReference {\n constructor(moduleName, name, runtime) {\n this.moduleName = moduleName;\n this.name = name;\n this.runtime = runtime;\n }\n}\nclass ConditionalExpr extends Expression {\n constructor(condition, trueCase, falseCase = null, type, sourceSpan) {\n super(type || trueCase.type, sourceSpan);\n this.condition = condition;\n this.falseCase = falseCase;\n this.trueCase = trueCase;\n }\n isEquivalent(e) {\n return e instanceof ConditionalExpr && this.condition.isEquivalent(e.condition) &&\n this.trueCase.isEquivalent(e.trueCase) && nullSafeIsEquivalent(this.falseCase, e.falseCase);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitConditionalExpr(this, context);\n }\n}\nclass NotExpr extends Expression {\n constructor(condition, sourceSpan) {\n super(BOOL_TYPE, sourceSpan);\n this.condition = condition;\n }\n isEquivalent(e) {\n return e instanceof NotExpr && this.condition.isEquivalent(e.condition);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitNotExpr(this, context);\n }\n}\nclass FnParam {\n constructor(name, type = null) {\n this.name = name;\n this.type = type;\n }\n isEquivalent(param) {\n return this.name === param.name;\n }\n}\nclass FunctionExpr extends Expression {\n constructor(params, statements, type, sourceSpan, name) {\n super(type, sourceSpan);\n this.params = params;\n this.statements = statements;\n this.name = name;\n }\n isEquivalent(e) {\n return e instanceof FunctionExpr && areAllEquivalent(this.params, e.params) &&\n areAllEquivalent(this.statements, e.statements);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitFunctionExpr(this, context);\n }\n toDeclStmt(name, modifiers) {\n return new DeclareFunctionStmt(name, this.params, this.statements, this.type, modifiers, this.sourceSpan);\n }\n}\nclass UnaryOperatorExpr extends Expression {\n constructor(operator, expr, type, sourceSpan, parens = true) {\n super(type || NUMBER_TYPE, sourceSpan);\n this.operator = operator;\n this.expr = expr;\n this.parens = parens;\n }\n isEquivalent(e) {\n return e instanceof UnaryOperatorExpr && this.operator === e.operator &&\n this.expr.isEquivalent(e.expr);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitUnaryOperatorExpr(this, context);\n }\n}\nclass BinaryOperatorExpr extends Expression {\n constructor(operator, lhs, rhs, type, sourceSpan, parens = true) {\n super(type || lhs.type, sourceSpan);\n this.operator = operator;\n this.rhs = rhs;\n this.parens = parens;\n this.lhs = lhs;\n }\n isEquivalent(e) {\n return e instanceof BinaryOperatorExpr && this.operator === e.operator &&\n this.lhs.isEquivalent(e.lhs) && this.rhs.isEquivalent(e.rhs);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitBinaryOperatorExpr(this, context);\n }\n}\nclass ReadPropExpr extends Expression {\n constructor(receiver, name, type, sourceSpan) {\n super(type, sourceSpan);\n this.receiver = receiver;\n this.name = name;\n }\n isEquivalent(e) {\n return e instanceof ReadPropExpr && this.receiver.isEquivalent(e.receiver) &&\n this.name === e.name;\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitReadPropExpr(this, context);\n }\n set(value) {\n return new WritePropExpr(this.receiver, this.name, value, null, this.sourceSpan);\n }\n}\nclass ReadKeyExpr extends Expression {\n constructor(receiver, index, type, sourceSpan) {\n super(type, sourceSpan);\n this.receiver = receiver;\n this.index = index;\n }\n isEquivalent(e) {\n return e instanceof ReadKeyExpr && this.receiver.isEquivalent(e.receiver) &&\n this.index.isEquivalent(e.index);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitReadKeyExpr(this, context);\n }\n set(value) {\n return new WriteKeyExpr(this.receiver, this.index, value, null, this.sourceSpan);\n }\n}\nclass LiteralArrayExpr extends Expression {\n constructor(entries, type, sourceSpan) {\n super(type, sourceSpan);\n this.entries = entries;\n }\n isConstant() {\n return this.entries.every(e => e.isConstant());\n }\n isEquivalent(e) {\n return e instanceof LiteralArrayExpr && areAllEquivalent(this.entries, e.entries);\n }\n visitExpression(visitor, context) {\n return visitor.visitLiteralArrayExpr(this, context);\n }\n}\nclass LiteralMapEntry {\n constructor(key, value, quoted) {\n this.key = key;\n this.value = value;\n this.quoted = quoted;\n }\n isEquivalent(e) {\n return this.key === e.key && this.value.isEquivalent(e.value);\n }\n}\nclass LiteralMapExpr extends Expression {\n constructor(entries, type, sourceSpan) {\n super(type, sourceSpan);\n this.entries = entries;\n this.valueType = null;\n if (type) {\n this.valueType = type.valueType;\n }\n }\n isEquivalent(e) {\n return e instanceof LiteralMapExpr && areAllEquivalent(this.entries, e.entries);\n }\n isConstant() {\n return this.entries.every(e => e.value.isConstant());\n }\n visitExpression(visitor, context) {\n return visitor.visitLiteralMapExpr(this, context);\n }\n}\nclass CommaExpr extends Expression {\n constructor(parts, sourceSpan) {\n super(parts[parts.length - 1].type, sourceSpan);\n this.parts = parts;\n }\n isEquivalent(e) {\n return e instanceof CommaExpr && areAllEquivalent(this.parts, e.parts);\n }\n isConstant() {\n return false;\n }\n visitExpression(visitor, context) {\n return visitor.visitCommaExpr(this, context);\n }\n}\nconst NULL_EXPR = new LiteralExpr(null, null, null);\nconst TYPED_NULL_EXPR = new LiteralExpr(null, INFERRED_TYPE, null);\n//// Statements\nvar StmtModifier;\n(function (StmtModifier) {\n StmtModifier[StmtModifier[\"None\"] = 0] = \"None\";\n StmtModifier[StmtModifier[\"Final\"] = 1] = \"Final\";\n StmtModifier[StmtModifier[\"Private\"] = 2] = \"Private\";\n StmtModifier[StmtModifier[\"Exported\"] = 4] = \"Exported\";\n StmtModifier[StmtModifier[\"Static\"] = 8] = \"Static\";\n})(StmtModifier || (StmtModifier = {}));\nclass LeadingComment {\n constructor(text, multiline, trailingNewline) {\n this.text = text;\n this.multiline = multiline;\n this.trailingNewline = trailingNewline;\n }\n toString() {\n return this.multiline ? ` ${this.text} ` : this.text;\n }\n}\nclass JSDocComment extends LeadingComment {\n constructor(tags) {\n super('', /* multiline */ true, /* trailingNewline */ true);\n this.tags = tags;\n }\n toString() {\n return serializeTags(this.tags);\n }\n}\nclass Statement {\n constructor(modifiers = StmtModifier.None, sourceSpan = null, leadingComments) {\n this.modifiers = modifiers;\n this.sourceSpan = sourceSpan;\n this.leadingComments = leadingComments;\n }\n hasModifier(modifier) {\n return (this.modifiers & modifier) !== 0;\n }\n addLeadingComment(leadingComment) {\n this.leadingComments = this.leadingComments ?? [];\n this.leadingComments.push(leadingComment);\n }\n}\nclass DeclareVarStmt extends Statement {\n constructor(name, value, type, modifiers, sourceSpan, leadingComments) {\n super(modifiers, sourceSpan, leadingComments);\n this.name = name;\n this.value = value;\n this.type = type || (value && value.type) || null;\n }\n isEquivalent(stmt) {\n return stmt instanceof DeclareVarStmt && this.name === stmt.name &&\n (this.value ? !!stmt.value && this.value.isEquivalent(stmt.value) : !stmt.value);\n }\n visitStatement(visitor, context) {\n return visitor.visitDeclareVarStmt(this, context);\n }\n}\nclass DeclareFunctionStmt extends Statement {\n constructor(name, params, statements, type, modifiers, sourceSpan, leadingComments) {\n super(modifiers, sourceSpan, leadingComments);\n this.name = name;\n this.params = params;\n this.statements = statements;\n this.type = type || null;\n }\n isEquivalent(stmt) {\n return stmt instanceof DeclareFunctionStmt && areAllEquivalent(this.params, stmt.params) &&\n areAllEquivalent(this.statements, stmt.statements);\n }\n visitStatement(visitor, context) {\n return visitor.visitDeclareFunctionStmt(this, context);\n }\n}\nclass ExpressionStatement extends Statement {\n constructor(expr, sourceSpan, leadingComments) {\n super(StmtModifier.None, sourceSpan, leadingComments);\n this.expr = expr;\n }\n isEquivalent(stmt) {\n return stmt instanceof ExpressionStatement && this.expr.isEquivalent(stmt.expr);\n }\n visitStatement(visitor, context) {\n return visitor.visitExpressionStmt(this, context);\n }\n}\nclass ReturnStatement extends Statement {\n constructor(value, sourceSpan = null, leadingComments) {\n super(StmtModifier.None, sourceSpan, leadingComments);\n this.value = value;\n }\n isEquivalent(stmt) {\n return stmt instanceof ReturnStatement && this.value.isEquivalent(stmt.value);\n }\n visitStatement(visitor, context) {\n return visitor.visitReturnStmt(this, context);\n }\n}\nclass IfStmt extends Statement {\n constructor(condition, trueCase, falseCase = [], sourceSpan, leadingComments) {\n super(StmtModifier.None, sourceSpan, leadingComments);\n this.condition = condition;\n this.trueCase = trueCase;\n this.falseCase = falseCase;\n }\n isEquivalent(stmt) {\n return stmt instanceof IfStmt && this.condition.isEquivalent(stmt.condition) &&\n areAllEquivalent(this.trueCase, stmt.trueCase) &&\n areAllEquivalent(this.falseCase, stmt.falseCase);\n }\n visitStatement(visitor, context) {\n return visitor.visitIfStmt(this, context);\n }\n}\nclass RecursiveAstVisitor$1 {\n visitType(ast, context) {\n return ast;\n }\n visitExpression(ast, context) {\n if (ast.type) {\n ast.type.visitType(this, context);\n }\n return ast;\n }\n visitBuiltinType(type, context) {\n return this.visitType(type, context);\n }\n visitExpressionType(type, context) {\n type.value.visitExpression(this, context);\n if (type.typeParams !== null) {\n type.typeParams.forEach(param => this.visitType(param, context));\n }\n return this.visitType(type, context);\n }\n visitArrayType(type, context) {\n return this.visitType(type, context);\n }\n visitMapType(type, context) {\n return this.visitType(type, context);\n }\n visitWrappedNodeExpr(ast, context) {\n return ast;\n }\n visitTypeofExpr(ast, context) {\n return this.visitExpression(ast, context);\n }\n visitReadVarExpr(ast, context) {\n return this.visitExpression(ast, context);\n }\n visitWriteVarExpr(ast, context) {\n ast.value.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitWriteKeyExpr(ast, context) {\n ast.receiver.visitExpression(this, context);\n ast.index.visitExpression(this, context);\n ast.value.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitWritePropExpr(ast, context) {\n ast.receiver.visitExpression(this, context);\n ast.value.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitInvokeFunctionExpr(ast, context) {\n ast.fn.visitExpression(this, context);\n this.visitAllExpressions(ast.args, context);\n return this.visitExpression(ast, context);\n }\n visitTaggedTemplateExpr(ast, context) {\n ast.tag.visitExpression(this, context);\n this.visitAllExpressions(ast.template.expressions, context);\n return this.visitExpression(ast, context);\n }\n visitInstantiateExpr(ast, context) {\n ast.classExpr.visitExpression(this, context);\n this.visitAllExpressions(ast.args, context);\n return this.visitExpression(ast, context);\n }\n visitLiteralExpr(ast, context) {\n return this.visitExpression(ast, context);\n }\n visitLocalizedString(ast, context) {\n return this.visitExpression(ast, context);\n }\n visitExternalExpr(ast, context) {\n if (ast.typeParams) {\n ast.typeParams.forEach(type => type.visitType(this, context));\n }\n return this.visitExpression(ast, context);\n }\n visitConditionalExpr(ast, context) {\n ast.condition.visitExpression(this, context);\n ast.trueCase.visitExpression(this, context);\n ast.falseCase.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitNotExpr(ast, context) {\n ast.condition.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitFunctionExpr(ast, context) {\n this.visitAllStatements(ast.statements, context);\n return this.visitExpression(ast, context);\n }\n visitUnaryOperatorExpr(ast, context) {\n ast.expr.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitBinaryOperatorExpr(ast, context) {\n ast.lhs.visitExpression(this, context);\n ast.rhs.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitReadPropExpr(ast, context) {\n ast.receiver.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitReadKeyExpr(ast, context) {\n ast.receiver.visitExpression(this, context);\n ast.index.visitExpression(this, context);\n return this.visitExpression(ast, context);\n }\n visitLiteralArrayExpr(ast, context) {\n this.visitAllExpressions(ast.entries, context);\n return this.visitExpression(ast, context);\n }\n visitLiteralMapExpr(ast, context) {\n ast.entries.forEach((entry) => entry.value.visitExpression(this, context));\n return this.visitExpression(ast, context);\n }\n visitCommaExpr(ast, context) {\n this.visitAllExpressions(ast.parts, context);\n return this.visitExpression(ast, context);\n }\n visitAllExpressions(exprs, context) {\n exprs.forEach(expr => expr.visitExpression(this, context));\n }\n visitDeclareVarStmt(stmt, context) {\n if (stmt.value) {\n stmt.value.visitExpression(this, context);\n }\n if (stmt.type) {\n stmt.type.visitType(this, context);\n }\n return stmt;\n }\n visitDeclareFunctionStmt(stmt, context) {\n this.visitAllStatements(stmt.statements, context);\n if (stmt.type) {\n stmt.type.visitType(this, context);\n }\n return stmt;\n }\n visitExpressionStmt(stmt, context) {\n stmt.expr.visitExpression(this, context);\n return stmt;\n }\n visitReturnStmt(stmt, context) {\n stmt.value.visitExpression(this, context);\n return stmt;\n }\n visitIfStmt(stmt, context) {\n stmt.condition.visitExpression(this, context);\n this.visitAllStatements(stmt.trueCase, context);\n this.visitAllStatements(stmt.falseCase, context);\n return stmt;\n }\n visitAllStatements(stmts, context) {\n stmts.forEach(stmt => stmt.visitStatement(this, context));\n }\n}\nfunction leadingComment(text, multiline = false, trailingNewline = true) {\n return new LeadingComment(text, multiline, trailingNewline);\n}\nfunction jsDocComment(tags = []) {\n return new JSDocComment(tags);\n}\nfunction variable(name, type, sourceSpan) {\n return new ReadVarExpr(name, type, sourceSpan);\n}\nfunction importExpr(id, typeParams = null, sourceSpan) {\n return new ExternalExpr(id, null, typeParams, sourceSpan);\n}\nfunction importType(id, typeParams, typeModifiers) {\n return id != null ? expressionType(importExpr(id, typeParams, null), typeModifiers) : null;\n}\nfunction expressionType(expr, typeModifiers, typeParams) {\n return new ExpressionType(expr, typeModifiers, typeParams);\n}\nfunction typeofExpr(expr) {\n return new TypeofExpr(expr);\n}\nfunction literalArr(values, type, sourceSpan) {\n return new LiteralArrayExpr(values, type, sourceSpan);\n}\nfunction literalMap(values, type = null) {\n return new LiteralMapExpr(values.map(e => new LiteralMapEntry(e.key, e.value, e.quoted)), type, null);\n}\nfunction unary(operator, expr, type, sourceSpan) {\n return new UnaryOperatorExpr(operator, expr, type, sourceSpan);\n}\nfunction not(expr, sourceSpan) {\n return new NotExpr(expr, sourceSpan);\n}\nfunction fn(params, body, type, sourceSpan, name) {\n return new FunctionExpr(params, body, type, sourceSpan, name);\n}\nfunction ifStmt(condition, thenClause, elseClause, sourceSpan, leadingComments) {\n return new IfStmt(condition, thenClause, elseClause, sourceSpan, leadingComments);\n}\nfunction taggedTemplate(tag, template, type, sourceSpan) {\n return new TaggedTemplateExpr(tag, template, type, sourceSpan);\n}\nfunction literal(value, type, sourceSpan) {\n return new LiteralExpr(value, type, sourceSpan);\n}\nfunction localizedString(metaBlock, messageParts, placeholderNames, expressions, sourceSpan) {\n return new LocalizedString(metaBlock, messageParts, placeholderNames, expressions, sourceSpan);\n}\nfunction isNull(exp) {\n return exp instanceof LiteralExpr && exp.value === null;\n}\n/*\n * Serializes a `Tag` into a string.\n * Returns a string like \" @foo {bar} baz\" (note the leading whitespace before `@foo`).\n */\nfunction tagToString(tag) {\n let out = '';\n if (tag.tagName) {\n out += ` @${tag.tagName}`;\n }\n if (tag.text) {\n if (tag.text.match(/\\/\\*|\\*\\//)) {\n throw new Error('JSDoc text cannot contain \"/*\" and \"*/\"');\n }\n out += ' ' + tag.text.replace(/@/g, '\\\\@');\n }\n return out;\n}\nfunction serializeTags(tags) {\n if (tags.length === 0)\n return '';\n if (tags.length === 1 && tags[0].tagName && !tags[0].text) {\n // The JSDOC comment is a single simple tag: e.g `/** @tagname */`.\n return `*${tagToString(tags[0])} `;\n }\n let out = '*\\n';\n for (const tag of tags) {\n out += ' *';\n // If the tagToString is multi-line, insert \" * \" prefixes on lines.\n out += tagToString(tag).replace(/\\n/g, '\\n * ');\n out += '\\n';\n }\n out += ' ';\n return out;\n}\n\nvar output_ast = /*#__PURE__*/Object.freeze({\n __proto__: null,\n get TypeModifier () { return TypeModifier; },\n Type: Type,\n get BuiltinTypeName () { return BuiltinTypeName; },\n BuiltinType: BuiltinType,\n ExpressionType: ExpressionType,\n ArrayType: ArrayType,\n MapType: MapType,\n DYNAMIC_TYPE: DYNAMIC_TYPE,\n INFERRED_TYPE: INFERRED_TYPE,\n BOOL_TYPE: BOOL_TYPE,\n INT_TYPE: INT_TYPE,\n NUMBER_TYPE: NUMBER_TYPE,\n STRING_TYPE: STRING_TYPE,\n FUNCTION_TYPE: FUNCTION_TYPE,\n NONE_TYPE: NONE_TYPE,\n get UnaryOperator () { return UnaryOperator; },\n get BinaryOperator () { return BinaryOperator; },\n nullSafeIsEquivalent: nullSafeIsEquivalent,\n areAllEquivalent: areAllEquivalent,\n Expression: Expression,\n ReadVarExpr: ReadVarExpr,\n TypeofExpr: TypeofExpr,\n WrappedNodeExpr: WrappedNodeExpr,\n WriteVarExpr: WriteVarExpr,\n WriteKeyExpr: WriteKeyExpr,\n WritePropExpr: WritePropExpr,\n InvokeFunctionExpr: InvokeFunctionExpr,\n TaggedTemplateExpr: TaggedTemplateExpr,\n InstantiateExpr: InstantiateExpr,\n LiteralExpr: LiteralExpr,\n TemplateLiteral: TemplateLiteral,\n TemplateLiteralElement: TemplateLiteralElement,\n LiteralPiece: LiteralPiece,\n PlaceholderPiece: PlaceholderPiece,\n LocalizedString: LocalizedString,\n ExternalExpr: ExternalExpr,\n ExternalReference: ExternalReference,\n ConditionalExpr: ConditionalExpr,\n NotExpr: NotExpr,\n FnParam: FnParam,\n FunctionExpr: FunctionExpr,\n UnaryOperatorExpr: UnaryOperatorExpr,\n BinaryOperatorExpr: BinaryOperatorExpr,\n ReadPropExpr: ReadPropExpr,\n ReadKeyExpr: ReadKeyExpr,\n LiteralArrayExpr: LiteralArrayExpr,\n LiteralMapEntry: LiteralMapEntry,\n LiteralMapExpr: LiteralMapExpr,\n CommaExpr: CommaExpr,\n NULL_EXPR: NULL_EXPR,\n TYPED_NULL_EXPR: TYPED_NULL_EXPR,\n get StmtModifier () { return StmtModifier; },\n LeadingComment: LeadingComment,\n JSDocComment: JSDocComment,\n Statement: Statement,\n DeclareVarStmt: DeclareVarStmt,\n DeclareFunctionStmt: DeclareFunctionStmt,\n ExpressionStatement: ExpressionStatement,\n ReturnStatement: ReturnStatement,\n IfStmt: IfStmt,\n RecursiveAstVisitor: RecursiveAstVisitor$1,\n leadingComment: leadingComment,\n jsDocComment: jsDocComment,\n variable: variable,\n importExpr: importExpr,\n importType: importType,\n expressionType: expressionType,\n typeofExpr: typeofExpr,\n literalArr: literalArr,\n literalMap: literalMap,\n unary: unary,\n not: not,\n fn: fn,\n ifStmt: ifStmt,\n taggedTemplate: taggedTemplate,\n literal: literal,\n localizedString: localizedString,\n isNull: isNull\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst CONSTANT_PREFIX = '_c';\n/**\n * `ConstantPool` tries to reuse literal factories when two or more literals are identical.\n * We determine whether literals are identical by creating a key out of their AST using the\n * `KeyVisitor`. This constant is used to replace dynamic expressions which can't be safely\n * converted into a key. E.g. given an expression `{foo: bar()}`, since we don't know what\n * the result of `bar` will be, we create a key that looks like `{foo: }`. Note\n * that we use a variable, rather than something like `null` in order to avoid collisions.\n */\nconst UNKNOWN_VALUE_KEY = variable('');\n/**\n * Context to use when producing a key.\n *\n * This ensures we see the constant not the reference variable when producing\n * a key.\n */\nconst KEY_CONTEXT = {};\n/**\n * Generally all primitive values are excluded from the `ConstantPool`, but there is an exclusion\n * for strings that reach a certain length threshold. This constant defines the length threshold for\n * strings.\n */\nconst POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS = 50;\n/**\n * A node that is a place-holder that allows the node to be replaced when the actual\n * node is known.\n *\n * This allows the constant pool to change an expression from a direct reference to\n * a constant to a shared constant. It returns a fix-up node that is later allowed to\n * change the referenced expression.\n */\nclass FixupExpression extends Expression {\n constructor(resolved) {\n super(resolved.type);\n this.resolved = resolved;\n this.original = resolved;\n }\n visitExpression(visitor, context) {\n if (context === KEY_CONTEXT) {\n // When producing a key we want to traverse the constant not the\n // variable used to refer to it.\n return this.original.visitExpression(visitor, context);\n }\n else {\n return this.resolved.visitExpression(visitor, context);\n }\n }\n isEquivalent(e) {\n return e instanceof FixupExpression && this.resolved.isEquivalent(e.resolved);\n }\n isConstant() {\n return true;\n }\n fixup(expression) {\n this.resolved = expression;\n this.shared = true;\n }\n}\n/**\n * A constant pool allows a code emitter to share constant in an output context.\n *\n * The constant pool also supports sharing access to ivy definitions references.\n */\nclass ConstantPool {\n constructor(isClosureCompilerEnabled = false) {\n this.isClosureCompilerEnabled = isClosureCompilerEnabled;\n this.statements = [];\n this.literals = new Map();\n this.literalFactories = new Map();\n this.nextNameIndex = 0;\n }\n getConstLiteral(literal, forceShared) {\n if ((literal instanceof LiteralExpr && !isLongStringLiteral(literal)) ||\n literal instanceof FixupExpression) {\n // Do no put simple literals into the constant pool or try to produce a constant for a\n // reference to a constant.\n return literal;\n }\n const key = this.keyOf(literal);\n let fixup = this.literals.get(key);\n let newValue = false;\n if (!fixup) {\n fixup = new FixupExpression(literal);\n this.literals.set(key, fixup);\n newValue = true;\n }\n if ((!newValue && !fixup.shared) || (newValue && forceShared)) {\n // Replace the expression with a variable\n const name = this.freshName();\n let definition;\n let usage;\n if (this.isClosureCompilerEnabled && isLongStringLiteral(literal)) {\n // For string literals, Closure will **always** inline the string at\n // **all** usages, duplicating it each time. For large strings, this\n // unnecessarily bloats bundle size. To work around this restriction, we\n // wrap the string in a function, and call that function for each usage.\n // This tricks Closure into using inline logic for functions instead of\n // string literals. Function calls are only inlined if the body is small\n // enough to be worth it. By doing this, very large strings will be\n // shared across multiple usages, rather than duplicating the string at\n // each usage site.\n //\n // const myStr = function() { return \"very very very long string\"; };\n // const usage1 = myStr();\n // const usage2 = myStr();\n definition = variable(name).set(new FunctionExpr([], // Params.\n [\n // Statements.\n new ReturnStatement(literal),\n ]));\n usage = variable(name).callFn([]);\n }\n else {\n // Just declare and use the variable directly, without a function call\n // indirection. This saves a few bytes and avoids an unnecessary call.\n definition = variable(name).set(literal);\n usage = variable(name);\n }\n this.statements.push(definition.toDeclStmt(INFERRED_TYPE, StmtModifier.Final));\n fixup.fixup(usage);\n }\n return fixup;\n }\n getLiteralFactory(literal) {\n // Create a pure function that builds an array of a mix of constant and variable expressions\n if (literal instanceof LiteralArrayExpr) {\n const argumentsForKey = literal.entries.map(e => e.isConstant() ? e : UNKNOWN_VALUE_KEY);\n const key = this.keyOf(literalArr(argumentsForKey));\n return this._getLiteralFactory(key, literal.entries, entries => literalArr(entries));\n }\n else {\n const expressionForKey = literalMap(literal.entries.map(e => ({\n key: e.key,\n value: e.value.isConstant() ? e.value : UNKNOWN_VALUE_KEY,\n quoted: e.quoted\n })));\n const key = this.keyOf(expressionForKey);\n return this._getLiteralFactory(key, literal.entries.map(e => e.value), entries => literalMap(entries.map((value, index) => ({\n key: literal.entries[index].key,\n value,\n quoted: literal.entries[index].quoted\n }))));\n }\n }\n _getLiteralFactory(key, values, resultMap) {\n let literalFactory = this.literalFactories.get(key);\n const literalFactoryArguments = values.filter((e => !e.isConstant()));\n if (!literalFactory) {\n const resultExpressions = values.map((e, index) => e.isConstant() ? this.getConstLiteral(e, true) : variable(`a${index}`));\n const parameters = resultExpressions.filter(isVariable).map(e => new FnParam(e.name, DYNAMIC_TYPE));\n const pureFunctionDeclaration = fn(parameters, [new ReturnStatement(resultMap(resultExpressions))], INFERRED_TYPE);\n const name = this.freshName();\n this.statements.push(variable(name)\n .set(pureFunctionDeclaration)\n .toDeclStmt(INFERRED_TYPE, StmtModifier.Final));\n literalFactory = variable(name);\n this.literalFactories.set(key, literalFactory);\n }\n return { literalFactory, literalFactoryArguments };\n }\n /**\n * Produce a unique name.\n *\n * The name might be unique among different prefixes if any of the prefixes end in\n * a digit so the prefix should be a constant string (not based on user input) and\n * must not end in a digit.\n */\n uniqueName(prefix) {\n return `${prefix}${this.nextNameIndex++}`;\n }\n freshName() {\n return this.uniqueName(CONSTANT_PREFIX);\n }\n keyOf(expression) {\n return expression.visitExpression(new KeyVisitor(), KEY_CONTEXT);\n }\n}\n/**\n * Visitor used to determine if 2 expressions are equivalent and can be shared in the\n * `ConstantPool`.\n *\n * When the id (string) generated by the visitor is equal, expressions are considered equivalent.\n */\nclass KeyVisitor {\n constructor() {\n this.visitWrappedNodeExpr = invalid$1;\n this.visitWriteVarExpr = invalid$1;\n this.visitWriteKeyExpr = invalid$1;\n this.visitWritePropExpr = invalid$1;\n this.visitInvokeFunctionExpr = invalid$1;\n this.visitTaggedTemplateExpr = invalid$1;\n this.visitInstantiateExpr = invalid$1;\n this.visitConditionalExpr = invalid$1;\n this.visitNotExpr = invalid$1;\n this.visitAssertNotNullExpr = invalid$1;\n this.visitCastExpr = invalid$1;\n this.visitFunctionExpr = invalid$1;\n this.visitUnaryOperatorExpr = invalid$1;\n this.visitBinaryOperatorExpr = invalid$1;\n this.visitReadPropExpr = invalid$1;\n this.visitReadKeyExpr = invalid$1;\n this.visitCommaExpr = invalid$1;\n this.visitLocalizedString = invalid$1;\n }\n visitLiteralExpr(ast) {\n return `${typeof ast.value === 'string' ? '\"' + ast.value + '\"' : ast.value}`;\n }\n visitLiteralArrayExpr(ast, context) {\n return `[${ast.entries.map(entry => entry.visitExpression(this, context)).join(',')}]`;\n }\n visitLiteralMapExpr(ast, context) {\n const mapKey = (entry) => {\n const quote = entry.quoted ? '\"' : '';\n return `${quote}${entry.key}${quote}`;\n };\n const mapEntry = (entry) => `${mapKey(entry)}:${entry.value.visitExpression(this, context)}`;\n return `{${ast.entries.map(mapEntry).join(',')}`;\n }\n visitExternalExpr(ast) {\n return ast.value.moduleName ? `EX:${ast.value.moduleName}:${ast.value.name}` :\n `EX:${ast.value.runtime.name}`;\n }\n visitReadVarExpr(node) {\n return `VAR:${node.name}`;\n }\n visitTypeofExpr(node, context) {\n return `TYPEOF:${node.expr.visitExpression(this, context)}`;\n }\n}\nfunction invalid$1(arg) {\n throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${arg.constructor.name}`);\n}\nfunction isVariable(e) {\n return e instanceof ReadVarExpr;\n}\nfunction isLongStringLiteral(expr) {\n return expr instanceof LiteralExpr && typeof expr.value === 'string' &&\n expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst CORE = '@angular/core';\nclass Identifiers {\n}\n/* Methods */\nIdentifiers.NEW_METHOD = 'factory';\nIdentifiers.TRANSFORM_METHOD = 'transform';\nIdentifiers.PATCH_DEPS = 'patchedDeps';\nIdentifiers.core = { name: null, moduleName: CORE };\n/* Instructions */\nIdentifiers.namespaceHTML = { name: 'ɵɵnamespaceHTML', moduleName: CORE };\nIdentifiers.namespaceMathML = { name: 'ɵɵnamespaceMathML', moduleName: CORE };\nIdentifiers.namespaceSVG = { name: 'ɵɵnamespaceSVG', moduleName: CORE };\nIdentifiers.element = { name: 'ɵɵelement', moduleName: CORE };\nIdentifiers.elementStart = { name: 'ɵɵelementStart', moduleName: CORE };\nIdentifiers.elementEnd = { name: 'ɵɵelementEnd', moduleName: CORE };\nIdentifiers.advance = { name: 'ɵɵadvance', moduleName: CORE };\nIdentifiers.syntheticHostProperty = { name: 'ɵɵsyntheticHostProperty', moduleName: CORE };\nIdentifiers.syntheticHostListener = { name: 'ɵɵsyntheticHostListener', moduleName: CORE };\nIdentifiers.attribute = { name: 'ɵɵattribute', moduleName: CORE };\nIdentifiers.attributeInterpolate1 = { name: 'ɵɵattributeInterpolate1', moduleName: CORE };\nIdentifiers.attributeInterpolate2 = { name: 'ɵɵattributeInterpolate2', moduleName: CORE };\nIdentifiers.attributeInterpolate3 = { name: 'ɵɵattributeInterpolate3', moduleName: CORE };\nIdentifiers.attributeInterpolate4 = { name: 'ɵɵattributeInterpolate4', moduleName: CORE };\nIdentifiers.attributeInterpolate5 = { name: 'ɵɵattributeInterpolate5', moduleName: CORE };\nIdentifiers.attributeInterpolate6 = { name: 'ɵɵattributeInterpolate6', moduleName: CORE };\nIdentifiers.attributeInterpolate7 = { name: 'ɵɵattributeInterpolate7', moduleName: CORE };\nIdentifiers.attributeInterpolate8 = { name: 'ɵɵattributeInterpolate8', moduleName: CORE };\nIdentifiers.attributeInterpolateV = { name: 'ɵɵattributeInterpolateV', moduleName: CORE };\nIdentifiers.classProp = { name: 'ɵɵclassProp', moduleName: CORE };\nIdentifiers.elementContainerStart = { name: 'ɵɵelementContainerStart', moduleName: CORE };\nIdentifiers.elementContainerEnd = { name: 'ɵɵelementContainerEnd', moduleName: CORE };\nIdentifiers.elementContainer = { name: 'ɵɵelementContainer', moduleName: CORE };\nIdentifiers.styleMap = { name: 'ɵɵstyleMap', moduleName: CORE };\nIdentifiers.styleMapInterpolate1 = { name: 'ɵɵstyleMapInterpolate1', moduleName: CORE };\nIdentifiers.styleMapInterpolate2 = { name: 'ɵɵstyleMapInterpolate2', moduleName: CORE };\nIdentifiers.styleMapInterpolate3 = { name: 'ɵɵstyleMapInterpolate3', moduleName: CORE };\nIdentifiers.styleMapInterpolate4 = { name: 'ɵɵstyleMapInterpolate4', moduleName: CORE };\nIdentifiers.styleMapInterpolate5 = { name: 'ɵɵstyleMapInterpolate5', moduleName: CORE };\nIdentifiers.styleMapInterpolate6 = { name: 'ɵɵstyleMapInterpolate6', moduleName: CORE };\nIdentifiers.styleMapInterpolate7 = { name: 'ɵɵstyleMapInterpolate7', moduleName: CORE };\nIdentifiers.styleMapInterpolate8 = { name: 'ɵɵstyleMapInterpolate8', moduleName: CORE };\nIdentifiers.styleMapInterpolateV = { name: 'ɵɵstyleMapInterpolateV', moduleName: CORE };\nIdentifiers.classMap = { name: 'ɵɵclassMap', moduleName: CORE };\nIdentifiers.classMapInterpolate1 = { name: 'ɵɵclassMapInterpolate1', moduleName: CORE };\nIdentifiers.classMapInterpolate2 = { name: 'ɵɵclassMapInterpolate2', moduleName: CORE };\nIdentifiers.classMapInterpolate3 = { name: 'ɵɵclassMapInterpolate3', moduleName: CORE };\nIdentifiers.classMapInterpolate4 = { name: 'ɵɵclassMapInterpolate4', moduleName: CORE };\nIdentifiers.classMapInterpolate5 = { name: 'ɵɵclassMapInterpolate5', moduleName: CORE };\nIdentifiers.classMapInterpolate6 = { name: 'ɵɵclassMapInterpolate6', moduleName: CORE };\nIdentifiers.classMapInterpolate7 = { name: 'ɵɵclassMapInterpolate7', moduleName: CORE };\nIdentifiers.classMapInterpolate8 = { name: 'ɵɵclassMapInterpolate8', moduleName: CORE };\nIdentifiers.classMapInterpolateV = { name: 'ɵɵclassMapInterpolateV', moduleName: CORE };\nIdentifiers.styleProp = { name: 'ɵɵstyleProp', moduleName: CORE };\nIdentifiers.stylePropInterpolate1 = { name: 'ɵɵstylePropInterpolate1', moduleName: CORE };\nIdentifiers.stylePropInterpolate2 = { name: 'ɵɵstylePropInterpolate2', moduleName: CORE };\nIdentifiers.stylePropInterpolate3 = { name: 'ɵɵstylePropInterpolate3', moduleName: CORE };\nIdentifiers.stylePropInterpolate4 = { name: 'ɵɵstylePropInterpolate4', moduleName: CORE };\nIdentifiers.stylePropInterpolate5 = { name: 'ɵɵstylePropInterpolate5', moduleName: CORE };\nIdentifiers.stylePropInterpolate6 = { name: 'ɵɵstylePropInterpolate6', moduleName: CORE };\nIdentifiers.stylePropInterpolate7 = { name: 'ɵɵstylePropInterpolate7', moduleName: CORE };\nIdentifiers.stylePropInterpolate8 = { name: 'ɵɵstylePropInterpolate8', moduleName: CORE };\nIdentifiers.stylePropInterpolateV = { name: 'ɵɵstylePropInterpolateV', moduleName: CORE };\nIdentifiers.nextContext = { name: 'ɵɵnextContext', moduleName: CORE };\nIdentifiers.resetView = { name: 'ɵɵresetView', moduleName: CORE };\nIdentifiers.templateCreate = { name: 'ɵɵtemplate', moduleName: CORE };\nIdentifiers.text = { name: 'ɵɵtext', moduleName: CORE };\nIdentifiers.enableBindings = { name: 'ɵɵenableBindings', moduleName: CORE };\nIdentifiers.disableBindings = { name: 'ɵɵdisableBindings', moduleName: CORE };\nIdentifiers.getCurrentView = { name: 'ɵɵgetCurrentView', moduleName: CORE };\nIdentifiers.textInterpolate = { name: 'ɵɵtextInterpolate', moduleName: CORE };\nIdentifiers.textInterpolate1 = { name: 'ɵɵtextInterpolate1', moduleName: CORE };\nIdentifiers.textInterpolate2 = { name: 'ɵɵtextInterpolate2', moduleName: CORE };\nIdentifiers.textInterpolate3 = { name: 'ɵɵtextInterpolate3', moduleName: CORE };\nIdentifiers.textInterpolate4 = { name: 'ɵɵtextInterpolate4', moduleName: CORE };\nIdentifiers.textInterpolate5 = { name: 'ɵɵtextInterpolate5', moduleName: CORE };\nIdentifiers.textInterpolate6 = { name: 'ɵɵtextInterpolate6', moduleName: CORE };\nIdentifiers.textInterpolate7 = { name: 'ɵɵtextInterpolate7', moduleName: CORE };\nIdentifiers.textInterpolate8 = { name: 'ɵɵtextInterpolate8', moduleName: CORE };\nIdentifiers.textInterpolateV = { name: 'ɵɵtextInterpolateV', moduleName: CORE };\nIdentifiers.restoreView = { name: 'ɵɵrestoreView', moduleName: CORE };\nIdentifiers.pureFunction0 = { name: 'ɵɵpureFunction0', moduleName: CORE };\nIdentifiers.pureFunction1 = { name: 'ɵɵpureFunction1', moduleName: CORE };\nIdentifiers.pureFunction2 = { name: 'ɵɵpureFunction2', moduleName: CORE };\nIdentifiers.pureFunction3 = { name: 'ɵɵpureFunction3', moduleName: CORE };\nIdentifiers.pureFunction4 = { name: 'ɵɵpureFunction4', moduleName: CORE };\nIdentifiers.pureFunction5 = { name: 'ɵɵpureFunction5', moduleName: CORE };\nIdentifiers.pureFunction6 = { name: 'ɵɵpureFunction6', moduleName: CORE };\nIdentifiers.pureFunction7 = { name: 'ɵɵpureFunction7', moduleName: CORE };\nIdentifiers.pureFunction8 = { name: 'ɵɵpureFunction8', moduleName: CORE };\nIdentifiers.pureFunctionV = { name: 'ɵɵpureFunctionV', moduleName: CORE };\nIdentifiers.pipeBind1 = { name: 'ɵɵpipeBind1', moduleName: CORE };\nIdentifiers.pipeBind2 = { name: 'ɵɵpipeBind2', moduleName: CORE };\nIdentifiers.pipeBind3 = { name: 'ɵɵpipeBind3', moduleName: CORE };\nIdentifiers.pipeBind4 = { name: 'ɵɵpipeBind4', moduleName: CORE };\nIdentifiers.pipeBindV = { name: 'ɵɵpipeBindV', moduleName: CORE };\nIdentifiers.hostProperty = { name: 'ɵɵhostProperty', moduleName: CORE };\nIdentifiers.property = { name: 'ɵɵproperty', moduleName: CORE };\nIdentifiers.propertyInterpolate = { name: 'ɵɵpropertyInterpolate', moduleName: CORE };\nIdentifiers.propertyInterpolate1 = { name: 'ɵɵpropertyInterpolate1', moduleName: CORE };\nIdentifiers.propertyInterpolate2 = { name: 'ɵɵpropertyInterpolate2', moduleName: CORE };\nIdentifiers.propertyInterpolate3 = { name: 'ɵɵpropertyInterpolate3', moduleName: CORE };\nIdentifiers.propertyInterpolate4 = { name: 'ɵɵpropertyInterpolate4', moduleName: CORE };\nIdentifiers.propertyInterpolate5 = { name: 'ɵɵpropertyInterpolate5', moduleName: CORE };\nIdentifiers.propertyInterpolate6 = { name: 'ɵɵpropertyInterpolate6', moduleName: CORE };\nIdentifiers.propertyInterpolate7 = { name: 'ɵɵpropertyInterpolate7', moduleName: CORE };\nIdentifiers.propertyInterpolate8 = { name: 'ɵɵpropertyInterpolate8', moduleName: CORE };\nIdentifiers.propertyInterpolateV = { name: 'ɵɵpropertyInterpolateV', moduleName: CORE };\nIdentifiers.i18n = { name: 'ɵɵi18n', moduleName: CORE };\nIdentifiers.i18nAttributes = { name: 'ɵɵi18nAttributes', moduleName: CORE };\nIdentifiers.i18nExp = { name: 'ɵɵi18nExp', moduleName: CORE };\nIdentifiers.i18nStart = { name: 'ɵɵi18nStart', moduleName: CORE };\nIdentifiers.i18nEnd = { name: 'ɵɵi18nEnd', moduleName: CORE };\nIdentifiers.i18nApply = { name: 'ɵɵi18nApply', moduleName: CORE };\nIdentifiers.i18nPostprocess = { name: 'ɵɵi18nPostprocess', moduleName: CORE };\nIdentifiers.pipe = { name: 'ɵɵpipe', moduleName: CORE };\nIdentifiers.projection = { name: 'ɵɵprojection', moduleName: CORE };\nIdentifiers.projectionDef = { name: 'ɵɵprojectionDef', moduleName: CORE };\nIdentifiers.reference = { name: 'ɵɵreference', moduleName: CORE };\nIdentifiers.inject = { name: 'ɵɵinject', moduleName: CORE };\nIdentifiers.injectAttribute = { name: 'ɵɵinjectAttribute', moduleName: CORE };\nIdentifiers.directiveInject = { name: 'ɵɵdirectiveInject', moduleName: CORE };\nIdentifiers.invalidFactory = { name: 'ɵɵinvalidFactory', moduleName: CORE };\nIdentifiers.invalidFactoryDep = { name: 'ɵɵinvalidFactoryDep', moduleName: CORE };\nIdentifiers.templateRefExtractor = { name: 'ɵɵtemplateRefExtractor', moduleName: CORE };\nIdentifiers.forwardRef = { name: 'forwardRef', moduleName: CORE };\nIdentifiers.resolveForwardRef = { name: 'resolveForwardRef', moduleName: CORE };\nIdentifiers.ɵɵdefineInjectable = { name: 'ɵɵdefineInjectable', moduleName: CORE };\nIdentifiers.declareInjectable = { name: 'ɵɵngDeclareInjectable', moduleName: CORE };\nIdentifiers.InjectableDeclaration = { name: 'ɵɵInjectableDeclaration', moduleName: CORE };\nIdentifiers.resolveWindow = { name: 'ɵɵresolveWindow', moduleName: CORE };\nIdentifiers.resolveDocument = { name: 'ɵɵresolveDocument', moduleName: CORE };\nIdentifiers.resolveBody = { name: 'ɵɵresolveBody', moduleName: CORE };\nIdentifiers.defineComponent = { name: 'ɵɵdefineComponent', moduleName: CORE };\nIdentifiers.declareComponent = { name: 'ɵɵngDeclareComponent', moduleName: CORE };\nIdentifiers.setComponentScope = { name: 'ɵɵsetComponentScope', moduleName: CORE };\nIdentifiers.ChangeDetectionStrategy = {\n name: 'ChangeDetectionStrategy',\n moduleName: CORE,\n};\nIdentifiers.ViewEncapsulation = {\n name: 'ViewEncapsulation',\n moduleName: CORE,\n};\nIdentifiers.ComponentDeclaration = {\n name: 'ɵɵComponentDeclaration',\n moduleName: CORE,\n};\nIdentifiers.FactoryDeclaration = {\n name: 'ɵɵFactoryDeclaration',\n moduleName: CORE,\n};\nIdentifiers.declareFactory = { name: 'ɵɵngDeclareFactory', moduleName: CORE };\nIdentifiers.FactoryTarget = { name: 'ɵɵFactoryTarget', moduleName: CORE };\nIdentifiers.defineDirective = { name: 'ɵɵdefineDirective', moduleName: CORE };\nIdentifiers.declareDirective = { name: 'ɵɵngDeclareDirective', moduleName: CORE };\nIdentifiers.DirectiveDeclaration = {\n name: 'ɵɵDirectiveDeclaration',\n moduleName: CORE,\n};\nIdentifiers.InjectorDef = { name: 'ɵɵInjectorDef', moduleName: CORE };\nIdentifiers.InjectorDeclaration = { name: 'ɵɵInjectorDeclaration', moduleName: CORE };\nIdentifiers.defineInjector = { name: 'ɵɵdefineInjector', moduleName: CORE };\nIdentifiers.declareInjector = { name: 'ɵɵngDeclareInjector', moduleName: CORE };\nIdentifiers.NgModuleDeclaration = {\n name: 'ɵɵNgModuleDeclaration',\n moduleName: CORE,\n};\nIdentifiers.ModuleWithProviders = {\n name: 'ModuleWithProviders',\n moduleName: CORE,\n};\nIdentifiers.defineNgModule = { name: 'ɵɵdefineNgModule', moduleName: CORE };\nIdentifiers.declareNgModule = { name: 'ɵɵngDeclareNgModule', moduleName: CORE };\nIdentifiers.setNgModuleScope = { name: 'ɵɵsetNgModuleScope', moduleName: CORE };\nIdentifiers.registerNgModuleType = { name: 'ɵɵregisterNgModuleType', moduleName: CORE };\nIdentifiers.PipeDeclaration = { name: 'ɵɵPipeDeclaration', moduleName: CORE };\nIdentifiers.definePipe = { name: 'ɵɵdefinePipe', moduleName: CORE };\nIdentifiers.declarePipe = { name: 'ɵɵngDeclarePipe', moduleName: CORE };\nIdentifiers.declareClassMetadata = { name: 'ɵɵngDeclareClassMetadata', moduleName: CORE };\nIdentifiers.setClassMetadata = { name: 'ɵsetClassMetadata', moduleName: CORE };\nIdentifiers.queryRefresh = { name: 'ɵɵqueryRefresh', moduleName: CORE };\nIdentifiers.viewQuery = { name: 'ɵɵviewQuery', moduleName: CORE };\nIdentifiers.loadQuery = { name: 'ɵɵloadQuery', moduleName: CORE };\nIdentifiers.contentQuery = { name: 'ɵɵcontentQuery', moduleName: CORE };\nIdentifiers.NgOnChangesFeature = { name: 'ɵɵNgOnChangesFeature', moduleName: CORE };\nIdentifiers.InheritDefinitionFeature = { name: 'ɵɵInheritDefinitionFeature', moduleName: CORE };\nIdentifiers.CopyDefinitionFeature = { name: 'ɵɵCopyDefinitionFeature', moduleName: CORE };\nIdentifiers.StandaloneFeature = { name: 'ɵɵStandaloneFeature', moduleName: CORE };\nIdentifiers.ProvidersFeature = { name: 'ɵɵProvidersFeature', moduleName: CORE };\nIdentifiers.listener = { name: 'ɵɵlistener', moduleName: CORE };\nIdentifiers.getInheritedFactory = {\n name: 'ɵɵgetInheritedFactory',\n moduleName: CORE,\n};\n// sanitization-related functions\nIdentifiers.sanitizeHtml = { name: 'ɵɵsanitizeHtml', moduleName: CORE };\nIdentifiers.sanitizeStyle = { name: 'ɵɵsanitizeStyle', moduleName: CORE };\nIdentifiers.sanitizeResourceUrl = { name: 'ɵɵsanitizeResourceUrl', moduleName: CORE };\nIdentifiers.sanitizeScript = { name: 'ɵɵsanitizeScript', moduleName: CORE };\nIdentifiers.sanitizeUrl = { name: 'ɵɵsanitizeUrl', moduleName: CORE };\nIdentifiers.sanitizeUrlOrResourceUrl = { name: 'ɵɵsanitizeUrlOrResourceUrl', moduleName: CORE };\nIdentifiers.trustConstantHtml = { name: 'ɵɵtrustConstantHtml', moduleName: CORE };\nIdentifiers.trustConstantResourceUrl = { name: 'ɵɵtrustConstantResourceUrl', moduleName: CORE };\nIdentifiers.validateIframeAttribute = { name: 'ɵɵvalidateIframeAttribute', moduleName: CORE };\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit\nconst VERSION$1 = 3;\nconst JS_B64_PREFIX = '# sourceMappingURL=data:application/json;base64,';\nclass SourceMapGenerator {\n constructor(file = null) {\n this.file = file;\n this.sourcesContent = new Map();\n this.lines = [];\n this.lastCol0 = 0;\n this.hasMappings = false;\n }\n // The content is `null` when the content is expected to be loaded using the URL\n addSource(url, content = null) {\n if (!this.sourcesContent.has(url)) {\n this.sourcesContent.set(url, content);\n }\n return this;\n }\n addLine() {\n this.lines.push([]);\n this.lastCol0 = 0;\n return this;\n }\n addMapping(col0, sourceUrl, sourceLine0, sourceCol0) {\n if (!this.currentLine) {\n throw new Error(`A line must be added before mappings can be added`);\n }\n if (sourceUrl != null && !this.sourcesContent.has(sourceUrl)) {\n throw new Error(`Unknown source file \"${sourceUrl}\"`);\n }\n if (col0 == null) {\n throw new Error(`The column in the generated code must be provided`);\n }\n if (col0 < this.lastCol0) {\n throw new Error(`Mapping should be added in output order`);\n }\n if (sourceUrl && (sourceLine0 == null || sourceCol0 == null)) {\n throw new Error(`The source location must be provided when a source url is provided`);\n }\n this.hasMappings = true;\n this.lastCol0 = col0;\n this.currentLine.push({ col0, sourceUrl, sourceLine0, sourceCol0 });\n return this;\n }\n /**\n * @internal strip this from published d.ts files due to\n * https://github.com/microsoft/TypeScript/issues/36216\n */\n get currentLine() {\n return this.lines.slice(-1)[0];\n }\n toJSON() {\n if (!this.hasMappings) {\n return null;\n }\n const sourcesIndex = new Map();\n const sources = [];\n const sourcesContent = [];\n Array.from(this.sourcesContent.keys()).forEach((url, i) => {\n sourcesIndex.set(url, i);\n sources.push(url);\n sourcesContent.push(this.sourcesContent.get(url) || null);\n });\n let mappings = '';\n let lastCol0 = 0;\n let lastSourceIndex = 0;\n let lastSourceLine0 = 0;\n let lastSourceCol0 = 0;\n this.lines.forEach(segments => {\n lastCol0 = 0;\n mappings += segments\n .map(segment => {\n // zero-based starting column of the line in the generated code\n let segAsStr = toBase64VLQ(segment.col0 - lastCol0);\n lastCol0 = segment.col0;\n if (segment.sourceUrl != null) {\n // zero-based index into the “sources” list\n segAsStr +=\n toBase64VLQ(sourcesIndex.get(segment.sourceUrl) - lastSourceIndex);\n lastSourceIndex = sourcesIndex.get(segment.sourceUrl);\n // the zero-based starting line in the original source\n segAsStr += toBase64VLQ(segment.sourceLine0 - lastSourceLine0);\n lastSourceLine0 = segment.sourceLine0;\n // the zero-based starting column in the original source\n segAsStr += toBase64VLQ(segment.sourceCol0 - lastSourceCol0);\n lastSourceCol0 = segment.sourceCol0;\n }\n return segAsStr;\n })\n .join(',');\n mappings += ';';\n });\n mappings = mappings.slice(0, -1);\n return {\n 'file': this.file || '',\n 'version': VERSION$1,\n 'sourceRoot': '',\n 'sources': sources,\n 'sourcesContent': sourcesContent,\n 'mappings': mappings,\n };\n }\n toJsComment() {\n return this.hasMappings ? '//' + JS_B64_PREFIX + toBase64String(JSON.stringify(this, null, 0)) :\n '';\n }\n}\nfunction toBase64String(value) {\n let b64 = '';\n const encoded = utf8Encode(value);\n for (let i = 0; i < encoded.length;) {\n const i1 = encoded[i++];\n const i2 = i < encoded.length ? encoded[i++] : null;\n const i3 = i < encoded.length ? encoded[i++] : null;\n b64 += toBase64Digit(i1 >> 2);\n b64 += toBase64Digit(((i1 & 3) << 4) | (i2 === null ? 0 : i2 >> 4));\n b64 += i2 === null ? '=' : toBase64Digit(((i2 & 15) << 2) | (i3 === null ? 0 : i3 >> 6));\n b64 += i2 === null || i3 === null ? '=' : toBase64Digit(i3 & 63);\n }\n return b64;\n}\nfunction toBase64VLQ(value) {\n value = value < 0 ? ((-value) << 1) + 1 : value << 1;\n let out = '';\n do {\n let digit = value & 31;\n value = value >> 5;\n if (value > 0) {\n digit = digit | 32;\n }\n out += toBase64Digit(digit);\n } while (value > 0);\n return out;\n}\nconst B64_DIGITS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nfunction toBase64Digit(value) {\n if (value < 0 || value >= 64) {\n throw new Error(`Can only encode value in the range [0, 63]`);\n }\n return B64_DIGITS[value];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\\\|\\n|\\r|\\$/g;\nconst _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;\nconst _INDENT_WITH = ' ';\nclass _EmittedLine {\n constructor(indent) {\n this.indent = indent;\n this.partsLength = 0;\n this.parts = [];\n this.srcSpans = [];\n }\n}\nclass EmitterVisitorContext {\n constructor(_indent) {\n this._indent = _indent;\n this._lines = [new _EmittedLine(_indent)];\n }\n static createRoot() {\n return new EmitterVisitorContext(0);\n }\n /**\n * @internal strip this from published d.ts files due to\n * https://github.com/microsoft/TypeScript/issues/36216\n */\n get _currentLine() {\n return this._lines[this._lines.length - 1];\n }\n println(from, lastPart = '') {\n this.print(from || null, lastPart, true);\n }\n lineIsEmpty() {\n return this._currentLine.parts.length === 0;\n }\n lineLength() {\n return this._currentLine.indent * _INDENT_WITH.length + this._currentLine.partsLength;\n }\n print(from, part, newLine = false) {\n if (part.length > 0) {\n this._currentLine.parts.push(part);\n this._currentLine.partsLength += part.length;\n this._currentLine.srcSpans.push(from && from.sourceSpan || null);\n }\n if (newLine) {\n this._lines.push(new _EmittedLine(this._indent));\n }\n }\n removeEmptyLastLine() {\n if (this.lineIsEmpty()) {\n this._lines.pop();\n }\n }\n incIndent() {\n this._indent++;\n if (this.lineIsEmpty()) {\n this._currentLine.indent = this._indent;\n }\n }\n decIndent() {\n this._indent--;\n if (this.lineIsEmpty()) {\n this._currentLine.indent = this._indent;\n }\n }\n toSource() {\n return this.sourceLines\n .map(l => l.parts.length > 0 ? _createIndent(l.indent) + l.parts.join('') : '')\n .join('\\n');\n }\n toSourceMapGenerator(genFilePath, startsAtLine = 0) {\n const map = new SourceMapGenerator(genFilePath);\n let firstOffsetMapped = false;\n const mapFirstOffsetIfNeeded = () => {\n if (!firstOffsetMapped) {\n // Add a single space so that tools won't try to load the file from disk.\n // Note: We are using virtual urls like `ng:///`, so we have to\n // provide a content here.\n map.addSource(genFilePath, ' ').addMapping(0, genFilePath, 0, 0);\n firstOffsetMapped = true;\n }\n };\n for (let i = 0; i < startsAtLine; i++) {\n map.addLine();\n mapFirstOffsetIfNeeded();\n }\n this.sourceLines.forEach((line, lineIdx) => {\n map.addLine();\n const spans = line.srcSpans;\n const parts = line.parts;\n let col0 = line.indent * _INDENT_WITH.length;\n let spanIdx = 0;\n // skip leading parts without source spans\n while (spanIdx < spans.length && !spans[spanIdx]) {\n col0 += parts[spanIdx].length;\n spanIdx++;\n }\n if (spanIdx < spans.length && lineIdx === 0 && col0 === 0) {\n firstOffsetMapped = true;\n }\n else {\n mapFirstOffsetIfNeeded();\n }\n while (spanIdx < spans.length) {\n const span = spans[spanIdx];\n const source = span.start.file;\n const sourceLine = span.start.line;\n const sourceCol = span.start.col;\n map.addSource(source.url, source.content)\n .addMapping(col0, source.url, sourceLine, sourceCol);\n col0 += parts[spanIdx].length;\n spanIdx++;\n // assign parts without span or the same span to the previous segment\n while (spanIdx < spans.length && (span === spans[spanIdx] || !spans[spanIdx])) {\n col0 += parts[spanIdx].length;\n spanIdx++;\n }\n }\n });\n return map;\n }\n spanOf(line, column) {\n const emittedLine = this._lines[line];\n if (emittedLine) {\n let columnsLeft = column - _createIndent(emittedLine.indent).length;\n for (let partIndex = 0; partIndex < emittedLine.parts.length; partIndex++) {\n const part = emittedLine.parts[partIndex];\n if (part.length > columnsLeft) {\n return emittedLine.srcSpans[partIndex];\n }\n columnsLeft -= part.length;\n }\n }\n return null;\n }\n /**\n * @internal strip this from published d.ts files due to\n * https://github.com/microsoft/TypeScript/issues/36216\n */\n get sourceLines() {\n if (this._lines.length && this._lines[this._lines.length - 1].parts.length === 0) {\n return this._lines.slice(0, -1);\n }\n return this._lines;\n }\n}\nclass AbstractEmitterVisitor {\n constructor(_escapeDollarInStrings) {\n this._escapeDollarInStrings = _escapeDollarInStrings;\n }\n printLeadingComments(stmt, ctx) {\n if (stmt.leadingComments === undefined) {\n return;\n }\n for (const comment of stmt.leadingComments) {\n if (comment instanceof JSDocComment) {\n ctx.print(stmt, `/*${comment.toString()}*/`, comment.trailingNewline);\n }\n else {\n if (comment.multiline) {\n ctx.print(stmt, `/* ${comment.text} */`, comment.trailingNewline);\n }\n else {\n comment.text.split('\\n').forEach((line) => {\n ctx.println(stmt, `// ${line}`);\n });\n }\n }\n }\n }\n visitExpressionStmt(stmt, ctx) {\n this.printLeadingComments(stmt, ctx);\n stmt.expr.visitExpression(this, ctx);\n ctx.println(stmt, ';');\n return null;\n }\n visitReturnStmt(stmt, ctx) {\n this.printLeadingComments(stmt, ctx);\n ctx.print(stmt, `return `);\n stmt.value.visitExpression(this, ctx);\n ctx.println(stmt, ';');\n return null;\n }\n visitIfStmt(stmt, ctx) {\n this.printLeadingComments(stmt, ctx);\n ctx.print(stmt, `if (`);\n stmt.condition.visitExpression(this, ctx);\n ctx.print(stmt, `) {`);\n const hasElseCase = stmt.falseCase != null && stmt.falseCase.length > 0;\n if (stmt.trueCase.length <= 1 && !hasElseCase) {\n ctx.print(stmt, ` `);\n this.visitAllStatements(stmt.trueCase, ctx);\n ctx.removeEmptyLastLine();\n ctx.print(stmt, ` `);\n }\n else {\n ctx.println();\n ctx.incIndent();\n this.visitAllStatements(stmt.trueCase, ctx);\n ctx.decIndent();\n if (hasElseCase) {\n ctx.println(stmt, `} else {`);\n ctx.incIndent();\n this.visitAllStatements(stmt.falseCase, ctx);\n ctx.decIndent();\n }\n }\n ctx.println(stmt, `}`);\n return null;\n }\n visitWriteVarExpr(expr, ctx) {\n const lineWasEmpty = ctx.lineIsEmpty();\n if (!lineWasEmpty) {\n ctx.print(expr, '(');\n }\n ctx.print(expr, `${expr.name} = `);\n expr.value.visitExpression(this, ctx);\n if (!lineWasEmpty) {\n ctx.print(expr, ')');\n }\n return null;\n }\n visitWriteKeyExpr(expr, ctx) {\n const lineWasEmpty = ctx.lineIsEmpty();\n if (!lineWasEmpty) {\n ctx.print(expr, '(');\n }\n expr.receiver.visitExpression(this, ctx);\n ctx.print(expr, `[`);\n expr.index.visitExpression(this, ctx);\n ctx.print(expr, `] = `);\n expr.value.visitExpression(this, ctx);\n if (!lineWasEmpty) {\n ctx.print(expr, ')');\n }\n return null;\n }\n visitWritePropExpr(expr, ctx) {\n const lineWasEmpty = ctx.lineIsEmpty();\n if (!lineWasEmpty) {\n ctx.print(expr, '(');\n }\n expr.receiver.visitExpression(this, ctx);\n ctx.print(expr, `.${expr.name} = `);\n expr.value.visitExpression(this, ctx);\n if (!lineWasEmpty) {\n ctx.print(expr, ')');\n }\n return null;\n }\n visitInvokeFunctionExpr(expr, ctx) {\n expr.fn.visitExpression(this, ctx);\n ctx.print(expr, `(`);\n this.visitAllExpressions(expr.args, ctx, ',');\n ctx.print(expr, `)`);\n return null;\n }\n visitTaggedTemplateExpr(expr, ctx) {\n expr.tag.visitExpression(this, ctx);\n ctx.print(expr, '`' + expr.template.elements[0].rawText);\n for (let i = 1; i < expr.template.elements.length; i++) {\n ctx.print(expr, '${');\n expr.template.expressions[i - 1].visitExpression(this, ctx);\n ctx.print(expr, `}${expr.template.elements[i].rawText}`);\n }\n ctx.print(expr, '`');\n return null;\n }\n visitWrappedNodeExpr(ast, ctx) {\n throw new Error('Abstract emitter cannot visit WrappedNodeExpr.');\n }\n visitTypeofExpr(expr, ctx) {\n ctx.print(expr, 'typeof ');\n expr.expr.visitExpression(this, ctx);\n }\n visitReadVarExpr(ast, ctx) {\n ctx.print(ast, ast.name);\n return null;\n }\n visitInstantiateExpr(ast, ctx) {\n ctx.print(ast, `new `);\n ast.classExpr.visitExpression(this, ctx);\n ctx.print(ast, `(`);\n this.visitAllExpressions(ast.args, ctx, ',');\n ctx.print(ast, `)`);\n return null;\n }\n visitLiteralExpr(ast, ctx) {\n const value = ast.value;\n if (typeof value === 'string') {\n ctx.print(ast, escapeIdentifier(value, this._escapeDollarInStrings));\n }\n else {\n ctx.print(ast, `${value}`);\n }\n return null;\n }\n visitLocalizedString(ast, ctx) {\n const head = ast.serializeI18nHead();\n ctx.print(ast, '$localize `' + head.raw);\n for (let i = 1; i < ast.messageParts.length; i++) {\n ctx.print(ast, '${');\n ast.expressions[i - 1].visitExpression(this, ctx);\n ctx.print(ast, `}${ast.serializeI18nTemplatePart(i).raw}`);\n }\n ctx.print(ast, '`');\n return null;\n }\n visitConditionalExpr(ast, ctx) {\n ctx.print(ast, `(`);\n ast.condition.visitExpression(this, ctx);\n ctx.print(ast, '? ');\n ast.trueCase.visitExpression(this, ctx);\n ctx.print(ast, ': ');\n ast.falseCase.visitExpression(this, ctx);\n ctx.print(ast, `)`);\n return null;\n }\n visitNotExpr(ast, ctx) {\n ctx.print(ast, '!');\n ast.condition.visitExpression(this, ctx);\n return null;\n }\n visitUnaryOperatorExpr(ast, ctx) {\n let opStr;\n switch (ast.operator) {\n case UnaryOperator.Plus:\n opStr = '+';\n break;\n case UnaryOperator.Minus:\n opStr = '-';\n break;\n default:\n throw new Error(`Unknown operator ${ast.operator}`);\n }\n if (ast.parens)\n ctx.print(ast, `(`);\n ctx.print(ast, opStr);\n ast.expr.visitExpression(this, ctx);\n if (ast.parens)\n ctx.print(ast, `)`);\n return null;\n }\n visitBinaryOperatorExpr(ast, ctx) {\n let opStr;\n switch (ast.operator) {\n case BinaryOperator.Equals:\n opStr = '==';\n break;\n case BinaryOperator.Identical:\n opStr = '===';\n break;\n case BinaryOperator.NotEquals:\n opStr = '!=';\n break;\n case BinaryOperator.NotIdentical:\n opStr = '!==';\n break;\n case BinaryOperator.And:\n opStr = '&&';\n break;\n case BinaryOperator.BitwiseAnd:\n opStr = '&';\n break;\n case BinaryOperator.Or:\n opStr = '||';\n break;\n case BinaryOperator.Plus:\n opStr = '+';\n break;\n case BinaryOperator.Minus:\n opStr = '-';\n break;\n case BinaryOperator.Divide:\n opStr = '/';\n break;\n case BinaryOperator.Multiply:\n opStr = '*';\n break;\n case BinaryOperator.Modulo:\n opStr = '%';\n break;\n case BinaryOperator.Lower:\n opStr = '<';\n break;\n case BinaryOperator.LowerEquals:\n opStr = '<=';\n break;\n case BinaryOperator.Bigger:\n opStr = '>';\n break;\n case BinaryOperator.BiggerEquals:\n opStr = '>=';\n break;\n case BinaryOperator.NullishCoalesce:\n opStr = '??';\n break;\n default:\n throw new Error(`Unknown operator ${ast.operator}`);\n }\n if (ast.parens)\n ctx.print(ast, `(`);\n ast.lhs.visitExpression(this, ctx);\n ctx.print(ast, ` ${opStr} `);\n ast.rhs.visitExpression(this, ctx);\n if (ast.parens)\n ctx.print(ast, `)`);\n return null;\n }\n visitReadPropExpr(ast, ctx) {\n ast.receiver.visitExpression(this, ctx);\n ctx.print(ast, `.`);\n ctx.print(ast, ast.name);\n return null;\n }\n visitReadKeyExpr(ast, ctx) {\n ast.receiver.visitExpression(this, ctx);\n ctx.print(ast, `[`);\n ast.index.visitExpression(this, ctx);\n ctx.print(ast, `]`);\n return null;\n }\n visitLiteralArrayExpr(ast, ctx) {\n ctx.print(ast, `[`);\n this.visitAllExpressions(ast.entries, ctx, ',');\n ctx.print(ast, `]`);\n return null;\n }\n visitLiteralMapExpr(ast, ctx) {\n ctx.print(ast, `{`);\n this.visitAllObjects(entry => {\n ctx.print(ast, `${escapeIdentifier(entry.key, this._escapeDollarInStrings, entry.quoted)}:`);\n entry.value.visitExpression(this, ctx);\n }, ast.entries, ctx, ',');\n ctx.print(ast, `}`);\n return null;\n }\n visitCommaExpr(ast, ctx) {\n ctx.print(ast, '(');\n this.visitAllExpressions(ast.parts, ctx, ',');\n ctx.print(ast, ')');\n return null;\n }\n visitAllExpressions(expressions, ctx, separator) {\n this.visitAllObjects(expr => expr.visitExpression(this, ctx), expressions, ctx, separator);\n }\n visitAllObjects(handler, expressions, ctx, separator) {\n let incrementedIndent = false;\n for (let i = 0; i < expressions.length; i++) {\n if (i > 0) {\n if (ctx.lineLength() > 80) {\n ctx.print(null, separator, true);\n if (!incrementedIndent) {\n // continuation are marked with double indent.\n ctx.incIndent();\n ctx.incIndent();\n incrementedIndent = true;\n }\n }\n else {\n ctx.print(null, separator, false);\n }\n }\n handler(expressions[i]);\n }\n if (incrementedIndent) {\n // continuation are marked with double indent.\n ctx.decIndent();\n ctx.decIndent();\n }\n }\n visitAllStatements(statements, ctx) {\n statements.forEach((stmt) => stmt.visitStatement(this, ctx));\n }\n}\nfunction escapeIdentifier(input, escapeDollar, alwaysQuote = true) {\n if (input == null) {\n return null;\n }\n const body = input.replace(_SINGLE_QUOTE_ESCAPE_STRING_RE, (...match) => {\n if (match[0] == '$') {\n return escapeDollar ? '\\\\$' : '$';\n }\n else if (match[0] == '\\n') {\n return '\\\\n';\n }\n else if (match[0] == '\\r') {\n return '\\\\r';\n }\n else {\n return `\\\\${match[0]}`;\n }\n });\n const requiresQuotes = alwaysQuote || !_LEGAL_IDENTIFIER_RE.test(body);\n return requiresQuotes ? `'${body}'` : body;\n}\nfunction _createIndent(count) {\n let res = '';\n for (let i = 0; i < count; i++) {\n res += _INDENT_WITH;\n }\n return res;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction typeWithParameters(type, numParams) {\n if (numParams === 0) {\n return expressionType(type);\n }\n const params = [];\n for (let i = 0; i < numParams; i++) {\n params.push(DYNAMIC_TYPE);\n }\n return expressionType(type, undefined, params);\n}\nconst ANIMATE_SYMBOL_PREFIX = '@';\nfunction prepareSyntheticPropertyName(name) {\n return `${ANIMATE_SYMBOL_PREFIX}${name}`;\n}\nfunction prepareSyntheticListenerName(name, phase) {\n return `${ANIMATE_SYMBOL_PREFIX}${name}.${phase}`;\n}\nfunction getSafePropertyAccessString(accessor, name) {\n const escapedName = escapeIdentifier(name, false, false);\n return escapedName !== name ? `${accessor}[${escapedName}]` : `${accessor}.${name}`;\n}\nfunction prepareSyntheticListenerFunctionName(name, phase) {\n return `animation_${name}_${phase}`;\n}\nfunction jitOnlyGuardedExpression(expr) {\n return guardedExpression('ngJitMode', expr);\n}\nfunction devOnlyGuardedExpression(expr) {\n return guardedExpression('ngDevMode', expr);\n}\nfunction guardedExpression(guard, expr) {\n const guardExpr = new ExternalExpr({ name: guard, moduleName: null });\n const guardNotDefined = new BinaryOperatorExpr(BinaryOperator.Identical, new TypeofExpr(guardExpr), literal('undefined'));\n const guardUndefinedOrTrue = new BinaryOperatorExpr(BinaryOperator.Or, guardNotDefined, guardExpr, /* type */ undefined, \n /* sourceSpan */ undefined, true);\n return new BinaryOperatorExpr(BinaryOperator.And, guardUndefinedOrTrue, expr);\n}\nfunction wrapReference(value) {\n const wrapped = new WrappedNodeExpr(value);\n return { value: wrapped, type: wrapped };\n}\nfunction refsToArray(refs, shouldForwardDeclare) {\n const values = literalArr(refs.map(ref => ref.value));\n return shouldForwardDeclare ? fn([], [new ReturnStatement(values)]) : values;\n}\nfunction createMayBeForwardRefExpression(expression, forwardRef) {\n return { expression, forwardRef };\n}\n/**\n * Convert a `MaybeForwardRefExpression` to an `Expression`, possibly wrapping its expression in a\n * `forwardRef()` call.\n *\n * If `MaybeForwardRefExpression.forwardRef` is `ForwardRefHandling.Unwrapped` then the expression\n * was originally wrapped in a `forwardRef()` call to prevent the value from being eagerly evaluated\n * in the code.\n *\n * See `packages/compiler-cli/src/ngtsc/annotations/src/injectable.ts` and\n * `packages/compiler/src/jit_compiler_facade.ts` for more information.\n */\nfunction convertFromMaybeForwardRefExpression({ expression, forwardRef }) {\n switch (forwardRef) {\n case 0 /* ForwardRefHandling.None */:\n case 1 /* ForwardRefHandling.Wrapped */:\n return expression;\n case 2 /* ForwardRefHandling.Unwrapped */:\n return generateForwardRef(expression);\n }\n}\n/**\n * Generate an expression that has the given `expr` wrapped in the following form:\n *\n * ```\n * forwardRef(() => expr)\n * ```\n */\nfunction generateForwardRef(expr) {\n return importExpr(Identifiers.forwardRef).callFn([fn([], [new ReturnStatement(expr)])]);\n}\n\nvar R3FactoryDelegateType;\n(function (R3FactoryDelegateType) {\n R3FactoryDelegateType[R3FactoryDelegateType[\"Class\"] = 0] = \"Class\";\n R3FactoryDelegateType[R3FactoryDelegateType[\"Function\"] = 1] = \"Function\";\n})(R3FactoryDelegateType || (R3FactoryDelegateType = {}));\nvar FactoryTarget$1;\n(function (FactoryTarget) {\n FactoryTarget[FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n FactoryTarget[FactoryTarget[\"Component\"] = 1] = \"Component\";\n FactoryTarget[FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n FactoryTarget[FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n FactoryTarget[FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n})(FactoryTarget$1 || (FactoryTarget$1 = {}));\n/**\n * Construct a factory function expression for the given `R3FactoryMetadata`.\n */\nfunction compileFactoryFunction(meta) {\n const t = variable('t');\n let baseFactoryVar = null;\n // The type to instantiate via constructor invocation. If there is no delegated factory, meaning\n // this type is always created by constructor invocation, then this is the type-to-create\n // parameter provided by the user (t) if specified, or the current type if not. If there is a\n // delegated factory (which is used to create the current type) then this is only the type-to-\n // create parameter (t).\n const typeForCtor = !isDelegatedFactoryMetadata(meta) ?\n new BinaryOperatorExpr(BinaryOperator.Or, t, meta.internalType) :\n t;\n let ctorExpr = null;\n if (meta.deps !== null) {\n // There is a constructor (either explicitly or implicitly defined).\n if (meta.deps !== 'invalid') {\n ctorExpr = new InstantiateExpr(typeForCtor, injectDependencies(meta.deps, meta.target));\n }\n }\n else {\n // There is no constructor, use the base class' factory to construct typeForCtor.\n baseFactoryVar = variable(`ɵ${meta.name}_BaseFactory`);\n ctorExpr = baseFactoryVar.callFn([typeForCtor]);\n }\n const body = [];\n let retExpr = null;\n function makeConditionalFactory(nonCtorExpr) {\n const r = variable('r');\n body.push(r.set(NULL_EXPR).toDeclStmt());\n const ctorStmt = ctorExpr !== null ? r.set(ctorExpr).toStmt() :\n importExpr(Identifiers.invalidFactory).callFn([]).toStmt();\n body.push(ifStmt(t, [ctorStmt], [r.set(nonCtorExpr).toStmt()]));\n return r;\n }\n if (isDelegatedFactoryMetadata(meta)) {\n // This type is created with a delegated factory. If a type parameter is not specified, call\n // the factory instead.\n const delegateArgs = injectDependencies(meta.delegateDeps, meta.target);\n // Either call `new delegate(...)` or `delegate(...)` depending on meta.delegateType.\n const factoryExpr = new (meta.delegateType === R3FactoryDelegateType.Class ?\n InstantiateExpr :\n InvokeFunctionExpr)(meta.delegate, delegateArgs);\n retExpr = makeConditionalFactory(factoryExpr);\n }\n else if (isExpressionFactoryMetadata(meta)) {\n // TODO(alxhub): decide whether to lower the value here or in the caller\n retExpr = makeConditionalFactory(meta.expression);\n }\n else {\n retExpr = ctorExpr;\n }\n if (retExpr === null) {\n // The expression cannot be formed so render an `ɵɵinvalidFactory()` call.\n body.push(importExpr(Identifiers.invalidFactory).callFn([]).toStmt());\n }\n else if (baseFactoryVar !== null) {\n // This factory uses a base factory, so call `ɵɵgetInheritedFactory()` to compute it.\n const getInheritedFactoryCall = importExpr(Identifiers.getInheritedFactory).callFn([meta.internalType]);\n // Memoize the base factoryFn: `baseFactory || (baseFactory = ɵɵgetInheritedFactory(...))`\n const baseFactory = new BinaryOperatorExpr(BinaryOperator.Or, baseFactoryVar, baseFactoryVar.set(getInheritedFactoryCall));\n body.push(new ReturnStatement(baseFactory.callFn([typeForCtor])));\n }\n else {\n // This is straightforward factory, just return it.\n body.push(new ReturnStatement(retExpr));\n }\n let factoryFn = fn([new FnParam('t', DYNAMIC_TYPE)], body, INFERRED_TYPE, undefined, `${meta.name}_Factory`);\n if (baseFactoryVar !== null) {\n // There is a base factory variable so wrap its declaration along with the factory function into\n // an IIFE.\n factoryFn = fn([], [\n new DeclareVarStmt(baseFactoryVar.name), new ReturnStatement(factoryFn)\n ]).callFn([], /* sourceSpan */ undefined, /* pure */ true);\n }\n return {\n expression: factoryFn,\n statements: [],\n type: createFactoryType(meta),\n };\n}\nfunction createFactoryType(meta) {\n const ctorDepsType = meta.deps !== null && meta.deps !== 'invalid' ? createCtorDepsType(meta.deps) : NONE_TYPE;\n return expressionType(importExpr(Identifiers.FactoryDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount), ctorDepsType]));\n}\nfunction injectDependencies(deps, target) {\n return deps.map((dep, index) => compileInjectDependency(dep, target, index));\n}\nfunction compileInjectDependency(dep, target, index) {\n // Interpret the dependency according to its resolved type.\n if (dep.token === null) {\n return importExpr(Identifiers.invalidFactoryDep).callFn([literal(index)]);\n }\n else if (dep.attributeNameType === null) {\n // Build up the injection flags according to the metadata.\n const flags = 0 /* InjectFlags.Default */ | (dep.self ? 2 /* InjectFlags.Self */ : 0) |\n (dep.skipSelf ? 4 /* InjectFlags.SkipSelf */ : 0) | (dep.host ? 1 /* InjectFlags.Host */ : 0) |\n (dep.optional ? 8 /* InjectFlags.Optional */ : 0) |\n (target === FactoryTarget$1.Pipe ? 16 /* InjectFlags.ForPipe */ : 0);\n // If this dependency is optional or otherwise has non-default flags, then additional\n // parameters describing how to inject the dependency must be passed to the inject function\n // that's being used.\n let flagsParam = (flags !== 0 /* InjectFlags.Default */ || dep.optional) ? literal(flags) : null;\n // Build up the arguments to the injectFn call.\n const injectArgs = [dep.token];\n if (flagsParam) {\n injectArgs.push(flagsParam);\n }\n const injectFn = getInjectFn(target);\n return importExpr(injectFn).callFn(injectArgs);\n }\n else {\n // The `dep.attributeTypeName` value is defined, which indicates that this is an `@Attribute()`\n // type dependency. For the generated JS we still want to use the `dep.token` value in case the\n // name given for the attribute is not a string literal. For example given `@Attribute(foo())`,\n // we want to generate `ɵɵinjectAttribute(foo())`.\n //\n // The `dep.attributeTypeName` is only actually used (in `createCtorDepType()`) to generate\n // typings.\n return importExpr(Identifiers.injectAttribute).callFn([dep.token]);\n }\n}\nfunction createCtorDepsType(deps) {\n let hasTypes = false;\n const attributeTypes = deps.map(dep => {\n const type = createCtorDepType(dep);\n if (type !== null) {\n hasTypes = true;\n return type;\n }\n else {\n return literal(null);\n }\n });\n if (hasTypes) {\n return expressionType(literalArr(attributeTypes));\n }\n else {\n return NONE_TYPE;\n }\n}\nfunction createCtorDepType(dep) {\n const entries = [];\n if (dep.attributeNameType !== null) {\n entries.push({ key: 'attribute', value: dep.attributeNameType, quoted: false });\n }\n if (dep.optional) {\n entries.push({ key: 'optional', value: literal(true), quoted: false });\n }\n if (dep.host) {\n entries.push({ key: 'host', value: literal(true), quoted: false });\n }\n if (dep.self) {\n entries.push({ key: 'self', value: literal(true), quoted: false });\n }\n if (dep.skipSelf) {\n entries.push({ key: 'skipSelf', value: literal(true), quoted: false });\n }\n return entries.length > 0 ? literalMap(entries) : null;\n}\nfunction isDelegatedFactoryMetadata(meta) {\n return meta.delegateType !== undefined;\n}\nfunction isExpressionFactoryMetadata(meta) {\n return meta.expression !== undefined;\n}\nfunction getInjectFn(target) {\n switch (target) {\n case FactoryTarget$1.Component:\n case FactoryTarget$1.Directive:\n case FactoryTarget$1.Pipe:\n return Identifiers.directiveInject;\n case FactoryTarget$1.NgModule:\n case FactoryTarget$1.Injectable:\n default:\n return Identifiers.inject;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This is an R3 `Node`-like wrapper for a raw `html.Comment` node. We do not currently\n * require the implementation of a visitor for Comments as they are only collected at\n * the top-level of the R3 AST, and only if `Render3ParseOptions['collectCommentNodes']`\n * is true.\n */\nclass Comment$1 {\n constructor(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n visit(_visitor) {\n throw new Error('visit() not implemented for Comment');\n }\n}\nclass Text$3 {\n constructor(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor) {\n return visitor.visitText(this);\n }\n}\nclass BoundText {\n constructor(value, sourceSpan, i18n) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitBoundText(this);\n }\n}\n/**\n * Represents a text attribute in the template.\n *\n * `valueSpan` may not be present in cases where there is no value `
`.\n * `keySpan` may also not be present for synthetic attributes from ICU expansions.\n */\nclass TextAttribute {\n constructor(name, value, sourceSpan, keySpan, valueSpan, i18n) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitTextAttribute(this);\n }\n}\nclass BoundAttribute {\n constructor(name, type, securityContext, value, unit, sourceSpan, keySpan, valueSpan, i18n) {\n this.name = name;\n this.type = type;\n this.securityContext = securityContext;\n this.value = value;\n this.unit = unit;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n this.i18n = i18n;\n }\n static fromBoundElementProperty(prop, i18n) {\n if (prop.keySpan === undefined) {\n throw new Error(`Unexpected state: keySpan must be defined for bound attributes but was not for ${prop.name}: ${prop.sourceSpan}`);\n }\n return new BoundAttribute(prop.name, prop.type, prop.securityContext, prop.value, prop.unit, prop.sourceSpan, prop.keySpan, prop.valueSpan, i18n);\n }\n visit(visitor) {\n return visitor.visitBoundAttribute(this);\n }\n}\nclass BoundEvent {\n constructor(name, type, handler, target, phase, sourceSpan, handlerSpan, keySpan) {\n this.name = name;\n this.type = type;\n this.handler = handler;\n this.target = target;\n this.phase = phase;\n this.sourceSpan = sourceSpan;\n this.handlerSpan = handlerSpan;\n this.keySpan = keySpan;\n }\n static fromParsedEvent(event) {\n const target = event.type === 0 /* ParsedEventType.Regular */ ? event.targetOrPhase : null;\n const phase = event.type === 1 /* ParsedEventType.Animation */ ? event.targetOrPhase : null;\n if (event.keySpan === undefined) {\n throw new Error(`Unexpected state: keySpan must be defined for bound event but was not for ${event.name}: ${event.sourceSpan}`);\n }\n return new BoundEvent(event.name, event.type, event.handler, target, phase, event.sourceSpan, event.handlerSpan, event.keySpan);\n }\n visit(visitor) {\n return visitor.visitBoundEvent(this);\n }\n}\nclass Element$1 {\n constructor(name, attributes, inputs, outputs, children, references, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n this.name = name;\n this.attributes = attributes;\n this.inputs = inputs;\n this.outputs = outputs;\n this.children = children;\n this.references = references;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitElement(this);\n }\n}\nclass Template {\n constructor(\n // tagName is the name of the container element, if applicable.\n // `null` is a special case for when there is a structural directive on an `ng-template` so\n // the renderer can differentiate between the synthetic template and the one written in the\n // file.\n tagName, attributes, inputs, outputs, templateAttrs, children, references, variables, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n this.tagName = tagName;\n this.attributes = attributes;\n this.inputs = inputs;\n this.outputs = outputs;\n this.templateAttrs = templateAttrs;\n this.children = children;\n this.references = references;\n this.variables = variables;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitTemplate(this);\n }\n}\nclass Content {\n constructor(selector, attributes, sourceSpan, i18n) {\n this.selector = selector;\n this.attributes = attributes;\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n this.name = 'ng-content';\n }\n visit(visitor) {\n return visitor.visitContent(this);\n }\n}\nclass Variable {\n constructor(name, value, sourceSpan, keySpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n }\n visit(visitor) {\n return visitor.visitVariable(this);\n }\n}\nclass Reference {\n constructor(name, value, sourceSpan, keySpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n }\n visit(visitor) {\n return visitor.visitReference(this);\n }\n}\nclass Icu$1 {\n constructor(vars, placeholders, sourceSpan, i18n) {\n this.vars = vars;\n this.placeholders = placeholders;\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n }\n visit(visitor) {\n return visitor.visitIcu(this);\n }\n}\nclass NullVisitor {\n visitElement(element) { }\n visitTemplate(template) { }\n visitContent(content) { }\n visitVariable(variable) { }\n visitReference(reference) { }\n visitTextAttribute(attribute) { }\n visitBoundAttribute(attribute) { }\n visitBoundEvent(attribute) { }\n visitText(text) { }\n visitBoundText(text) { }\n visitIcu(icu) { }\n}\nclass RecursiveVisitor$1 {\n visitElement(element) {\n visitAll$1(this, element.attributes);\n visitAll$1(this, element.inputs);\n visitAll$1(this, element.outputs);\n visitAll$1(this, element.children);\n visitAll$1(this, element.references);\n }\n visitTemplate(template) {\n visitAll$1(this, template.attributes);\n visitAll$1(this, template.inputs);\n visitAll$1(this, template.outputs);\n visitAll$1(this, template.children);\n visitAll$1(this, template.references);\n visitAll$1(this, template.variables);\n }\n visitContent(content) { }\n visitVariable(variable) { }\n visitReference(reference) { }\n visitTextAttribute(attribute) { }\n visitBoundAttribute(attribute) { }\n visitBoundEvent(attribute) { }\n visitText(text) { }\n visitBoundText(text) { }\n visitIcu(icu) { }\n}\nclass TransformVisitor {\n visitElement(element) {\n const newAttributes = transformAll(this, element.attributes);\n const newInputs = transformAll(this, element.inputs);\n const newOutputs = transformAll(this, element.outputs);\n const newChildren = transformAll(this, element.children);\n const newReferences = transformAll(this, element.references);\n if (newAttributes != element.attributes || newInputs != element.inputs ||\n newOutputs != element.outputs || newChildren != element.children ||\n newReferences != element.references) {\n return new Element$1(element.name, newAttributes, newInputs, newOutputs, newChildren, newReferences, element.sourceSpan, element.startSourceSpan, element.endSourceSpan);\n }\n return element;\n }\n visitTemplate(template) {\n const newAttributes = transformAll(this, template.attributes);\n const newInputs = transformAll(this, template.inputs);\n const newOutputs = transformAll(this, template.outputs);\n const newTemplateAttrs = transformAll(this, template.templateAttrs);\n const newChildren = transformAll(this, template.children);\n const newReferences = transformAll(this, template.references);\n const newVariables = transformAll(this, template.variables);\n if (newAttributes != template.attributes || newInputs != template.inputs ||\n newOutputs != template.outputs || newTemplateAttrs != template.templateAttrs ||\n newChildren != template.children || newReferences != template.references ||\n newVariables != template.variables) {\n return new Template(template.tagName, newAttributes, newInputs, newOutputs, newTemplateAttrs, newChildren, newReferences, newVariables, template.sourceSpan, template.startSourceSpan, template.endSourceSpan);\n }\n return template;\n }\n visitContent(content) {\n return content;\n }\n visitVariable(variable) {\n return variable;\n }\n visitReference(reference) {\n return reference;\n }\n visitTextAttribute(attribute) {\n return attribute;\n }\n visitBoundAttribute(attribute) {\n return attribute;\n }\n visitBoundEvent(attribute) {\n return attribute;\n }\n visitText(text) {\n return text;\n }\n visitBoundText(text) {\n return text;\n }\n visitIcu(icu) {\n return icu;\n }\n}\nfunction visitAll$1(visitor, nodes) {\n const result = [];\n if (visitor.visit) {\n for (const node of nodes) {\n const newNode = visitor.visit(node) || node.visit(visitor);\n }\n }\n else {\n for (const node of nodes) {\n const newNode = node.visit(visitor);\n if (newNode) {\n result.push(newNode);\n }\n }\n }\n return result;\n}\nfunction transformAll(visitor, nodes) {\n const result = [];\n let changed = false;\n for (const node of nodes) {\n const newNode = node.visit(visitor);\n if (newNode) {\n result.push(newNode);\n }\n changed = changed || newNode != node;\n }\n return changed ? result : nodes;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass Message {\n /**\n * @param nodes message AST\n * @param placeholders maps placeholder names to static content and their source spans\n * @param placeholderToMessage maps placeholder names to messages (used for nested ICU messages)\n * @param meaning\n * @param description\n * @param customId\n */\n constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {\n this.nodes = nodes;\n this.placeholders = placeholders;\n this.placeholderToMessage = placeholderToMessage;\n this.meaning = meaning;\n this.description = description;\n this.customId = customId;\n this.id = this.customId;\n /** The ids to use if there are no custom id and if `i18nLegacyMessageIdFormat` is not empty */\n this.legacyIds = [];\n this.messageString = serializeMessage(this.nodes);\n if (nodes.length) {\n this.sources = [{\n filePath: nodes[0].sourceSpan.start.file.url,\n startLine: nodes[0].sourceSpan.start.line + 1,\n startCol: nodes[0].sourceSpan.start.col + 1,\n endLine: nodes[nodes.length - 1].sourceSpan.end.line + 1,\n endCol: nodes[0].sourceSpan.start.col + 1\n }];\n }\n else {\n this.sources = [];\n }\n }\n}\nclass Text$2 {\n constructor(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitText(this, context);\n }\n}\n// TODO(vicb): do we really need this node (vs an array) ?\nclass Container {\n constructor(children, sourceSpan) {\n this.children = children;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitContainer(this, context);\n }\n}\nclass Icu {\n constructor(expression, type, cases, sourceSpan) {\n this.expression = expression;\n this.type = type;\n this.cases = cases;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitIcu(this, context);\n }\n}\nclass TagPlaceholder {\n constructor(tag, attrs, startName, closeName, children, isVoid, \n // TODO sourceSpan should cover all (we need a startSourceSpan and endSourceSpan)\n sourceSpan, startSourceSpan, endSourceSpan) {\n this.tag = tag;\n this.attrs = attrs;\n this.startName = startName;\n this.closeName = closeName;\n this.children = children;\n this.isVoid = isVoid;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitTagPlaceholder(this, context);\n }\n}\nclass Placeholder {\n constructor(value, name, sourceSpan) {\n this.value = value;\n this.name = name;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitPlaceholder(this, context);\n }\n}\nclass IcuPlaceholder {\n constructor(value, name, sourceSpan) {\n this.value = value;\n this.name = name;\n this.sourceSpan = sourceSpan;\n }\n visit(visitor, context) {\n return visitor.visitIcuPlaceholder(this, context);\n }\n}\n// Clone the AST\nclass CloneVisitor {\n visitText(text, context) {\n return new Text$2(text.value, text.sourceSpan);\n }\n visitContainer(container, context) {\n const children = container.children.map(n => n.visit(this, context));\n return new Container(children, container.sourceSpan);\n }\n visitIcu(icu, context) {\n const cases = {};\n Object.keys(icu.cases).forEach(key => cases[key] = icu.cases[key].visit(this, context));\n const msg = new Icu(icu.expression, icu.type, cases, icu.sourceSpan);\n msg.expressionPlaceholder = icu.expressionPlaceholder;\n return msg;\n }\n visitTagPlaceholder(ph, context) {\n const children = ph.children.map(n => n.visit(this, context));\n return new TagPlaceholder(ph.tag, ph.attrs, ph.startName, ph.closeName, children, ph.isVoid, ph.sourceSpan, ph.startSourceSpan, ph.endSourceSpan);\n }\n visitPlaceholder(ph, context) {\n return new Placeholder(ph.value, ph.name, ph.sourceSpan);\n }\n visitIcuPlaceholder(ph, context) {\n return new IcuPlaceholder(ph.value, ph.name, ph.sourceSpan);\n }\n}\n// Visit all the nodes recursively\nclass RecurseVisitor {\n visitText(text, context) { }\n visitContainer(container, context) {\n container.children.forEach(child => child.visit(this));\n }\n visitIcu(icu, context) {\n Object.keys(icu.cases).forEach(k => {\n icu.cases[k].visit(this);\n });\n }\n visitTagPlaceholder(ph, context) {\n ph.children.forEach(child => child.visit(this));\n }\n visitPlaceholder(ph, context) { }\n visitIcuPlaceholder(ph, context) { }\n}\n/**\n * Serialize the message to the Localize backtick string format that would appear in compiled code.\n */\nfunction serializeMessage(messageNodes) {\n const visitor = new LocalizeMessageStringVisitor();\n const str = messageNodes.map(n => n.visit(visitor)).join('');\n return str;\n}\nclass LocalizeMessageStringVisitor {\n visitText(text) {\n return text.value;\n }\n visitContainer(container) {\n return container.children.map(child => child.visit(this)).join('');\n }\n visitIcu(icu) {\n const strCases = Object.keys(icu.cases).map((k) => `${k} {${icu.cases[k].visit(this)}}`);\n return `{${icu.expressionPlaceholder}, ${icu.type}, ${strCases.join(' ')}}`;\n }\n visitTagPlaceholder(ph) {\n const children = ph.children.map(child => child.visit(this)).join('');\n return `{$${ph.startName}}${children}{$${ph.closeName}}`;\n }\n visitPlaceholder(ph) {\n return `{$${ph.name}}`;\n }\n visitIcuPlaceholder(ph) {\n return `{$${ph.name}}`;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass Serializer {\n // Creates a name mapper, see `PlaceholderMapper`\n // Returning `null` means that no name mapping is used.\n createNameMapper(message) {\n return null;\n }\n}\n/**\n * A simple mapper that take a function to transform an internal name to a public name\n */\nclass SimplePlaceholderMapper extends RecurseVisitor {\n // create a mapping from the message\n constructor(message, mapName) {\n super();\n this.mapName = mapName;\n this.internalToPublic = {};\n this.publicToNextId = {};\n this.publicToInternal = {};\n message.nodes.forEach(node => node.visit(this));\n }\n toPublicName(internalName) {\n return this.internalToPublic.hasOwnProperty(internalName) ?\n this.internalToPublic[internalName] :\n null;\n }\n toInternalName(publicName) {\n return this.publicToInternal.hasOwnProperty(publicName) ? this.publicToInternal[publicName] :\n null;\n }\n visitText(text, context) {\n return null;\n }\n visitTagPlaceholder(ph, context) {\n this.visitPlaceholderName(ph.startName);\n super.visitTagPlaceholder(ph, context);\n this.visitPlaceholderName(ph.closeName);\n }\n visitPlaceholder(ph, context) {\n this.visitPlaceholderName(ph.name);\n }\n visitIcuPlaceholder(ph, context) {\n this.visitPlaceholderName(ph.name);\n }\n // XMB placeholders could only contains A-Z, 0-9 and _\n visitPlaceholderName(internalName) {\n if (!internalName || this.internalToPublic.hasOwnProperty(internalName)) {\n return;\n }\n let publicName = this.mapName(internalName);\n if (this.publicToInternal.hasOwnProperty(publicName)) {\n // Create a new XMB when it has already been used\n const nextId = this.publicToNextId[publicName];\n this.publicToNextId[publicName] = nextId + 1;\n publicName = `${publicName}_${nextId}`;\n }\n else {\n this.publicToNextId[publicName] = 1;\n }\n this.internalToPublic[internalName] = publicName;\n this.publicToInternal[publicName] = internalName;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass _Visitor$2 {\n visitTag(tag) {\n const strAttrs = this._serializeAttributes(tag.attrs);\n if (tag.children.length == 0) {\n return `<${tag.name}${strAttrs}/>`;\n }\n const strChildren = tag.children.map(node => node.visit(this));\n return `<${tag.name}${strAttrs}>${strChildren.join('')}`;\n }\n visitText(text) {\n return text.value;\n }\n visitDeclaration(decl) {\n return ``;\n }\n _serializeAttributes(attrs) {\n const strAttrs = Object.keys(attrs).map((name) => `${name}=\"${attrs[name]}\"`).join(' ');\n return strAttrs.length > 0 ? ' ' + strAttrs : '';\n }\n visitDoctype(doctype) {\n return ``;\n }\n}\nconst _visitor = new _Visitor$2();\nfunction serialize(nodes) {\n return nodes.map((node) => node.visit(_visitor)).join('');\n}\nclass Declaration {\n constructor(unescapedAttrs) {\n this.attrs = {};\n Object.keys(unescapedAttrs).forEach((k) => {\n this.attrs[k] = escapeXml(unescapedAttrs[k]);\n });\n }\n visit(visitor) {\n return visitor.visitDeclaration(this);\n }\n}\nclass Doctype {\n constructor(rootTag, dtd) {\n this.rootTag = rootTag;\n this.dtd = dtd;\n }\n visit(visitor) {\n return visitor.visitDoctype(this);\n }\n}\nclass Tag {\n constructor(name, unescapedAttrs = {}, children = []) {\n this.name = name;\n this.children = children;\n this.attrs = {};\n Object.keys(unescapedAttrs).forEach((k) => {\n this.attrs[k] = escapeXml(unescapedAttrs[k]);\n });\n }\n visit(visitor) {\n return visitor.visitTag(this);\n }\n}\nclass Text$1 {\n constructor(unescapedValue) {\n this.value = escapeXml(unescapedValue);\n }\n visit(visitor) {\n return visitor.visitText(this);\n }\n}\nclass CR extends Text$1 {\n constructor(ws = 0) {\n super(`\\n${new Array(ws + 1).join(' ')}`);\n }\n}\nconst _ESCAPED_CHARS = [\n [/&/g, '&'],\n [/\"/g, '"'],\n [/'/g, '''],\n [//g, '>'],\n];\n// Escape `_ESCAPED_CHARS` characters in the given text with encoded entities\nfunction escapeXml(text) {\n return _ESCAPED_CHARS.reduce((text, entry) => text.replace(entry[0], entry[1]), text);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _MESSAGES_TAG = 'messagebundle';\nconst _MESSAGE_TAG = 'msg';\nconst _PLACEHOLDER_TAG$3 = 'ph';\nconst _EXAMPLE_TAG = 'ex';\nconst _SOURCE_TAG$2 = 'source';\nconst _DOCTYPE = `\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n`;\nclass Xmb extends Serializer {\n write(messages, locale) {\n const exampleVisitor = new ExampleVisitor();\n const visitor = new _Visitor$1();\n let rootNode = new Tag(_MESSAGES_TAG);\n messages.forEach(message => {\n const attrs = { id: message.id };\n if (message.description) {\n attrs['desc'] = message.description;\n }\n if (message.meaning) {\n attrs['meaning'] = message.meaning;\n }\n let sourceTags = [];\n message.sources.forEach((source) => {\n sourceTags.push(new Tag(_SOURCE_TAG$2, {}, [new Text$1(`${source.filePath}:${source.startLine}${source.endLine !== source.startLine ? ',' + source.endLine : ''}`)]));\n });\n rootNode.children.push(new CR(2), new Tag(_MESSAGE_TAG, attrs, [...sourceTags, ...visitor.serialize(message.nodes)]));\n });\n rootNode.children.push(new CR());\n return serialize([\n new Declaration({ version: '1.0', encoding: 'UTF-8' }),\n new CR(),\n new Doctype(_MESSAGES_TAG, _DOCTYPE),\n new CR(),\n exampleVisitor.addDefaultExamples(rootNode),\n new CR(),\n ]);\n }\n load(content, url) {\n throw new Error('Unsupported');\n }\n digest(message) {\n return digest(message);\n }\n createNameMapper(message) {\n return new SimplePlaceholderMapper(message, toPublicName);\n }\n}\nclass _Visitor$1 {\n visitText(text, context) {\n return [new Text$1(text.value)];\n }\n visitContainer(container, context) {\n const nodes = [];\n container.children.forEach((node) => nodes.push(...node.visit(this)));\n return nodes;\n }\n visitIcu(icu, context) {\n const nodes = [new Text$1(`{${icu.expressionPlaceholder}, ${icu.type}, `)];\n Object.keys(icu.cases).forEach((c) => {\n nodes.push(new Text$1(`${c} {`), ...icu.cases[c].visit(this), new Text$1(`} `));\n });\n nodes.push(new Text$1(`}`));\n return nodes;\n }\n visitTagPlaceholder(ph, context) {\n const startTagAsText = new Text$1(`<${ph.tag}>`);\n const startEx = new Tag(_EXAMPLE_TAG, {}, [startTagAsText]);\n // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n const startTagPh = new Tag(_PLACEHOLDER_TAG$3, { name: ph.startName }, [startEx, startTagAsText]);\n if (ph.isVoid) {\n // void tags have no children nor closing tags\n return [startTagPh];\n }\n const closeTagAsText = new Text$1(``);\n const closeEx = new Tag(_EXAMPLE_TAG, {}, [closeTagAsText]);\n // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n const closeTagPh = new Tag(_PLACEHOLDER_TAG$3, { name: ph.closeName }, [closeEx, closeTagAsText]);\n return [startTagPh, ...this.serialize(ph.children), closeTagPh];\n }\n visitPlaceholder(ph, context) {\n const interpolationAsText = new Text$1(`{{${ph.value}}}`);\n // Example tag needs to be not-empty for TC.\n const exTag = new Tag(_EXAMPLE_TAG, {}, [interpolationAsText]);\n return [\n // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n new Tag(_PLACEHOLDER_TAG$3, { name: ph.name }, [exTag, interpolationAsText])\n ];\n }\n visitIcuPlaceholder(ph, context) {\n const icuExpression = ph.value.expression;\n const icuType = ph.value.type;\n const icuCases = Object.keys(ph.value.cases).map((value) => value + ' {...}').join(' ');\n const icuAsText = new Text$1(`{${icuExpression}, ${icuType}, ${icuCases}}`);\n const exTag = new Tag(_EXAMPLE_TAG, {}, [icuAsText]);\n return [\n // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n new Tag(_PLACEHOLDER_TAG$3, { name: ph.name }, [exTag, icuAsText])\n ];\n }\n serialize(nodes) {\n return [].concat(...nodes.map(node => node.visit(this)));\n }\n}\nfunction digest(message) {\n return decimalDigest(message);\n}\n// TC requires at least one non-empty example on placeholders\nclass ExampleVisitor {\n addDefaultExamples(node) {\n node.visit(this);\n return node;\n }\n visitTag(tag) {\n if (tag.name === _PLACEHOLDER_TAG$3) {\n if (!tag.children || tag.children.length == 0) {\n const exText = new Text$1(tag.attrs['name'] || '...');\n tag.children = [new Tag(_EXAMPLE_TAG, {}, [exText])];\n }\n }\n else if (tag.children) {\n tag.children.forEach(node => node.visit(this));\n }\n }\n visitText(text) { }\n visitDeclaration(decl) { }\n visitDoctype(doctype) { }\n}\n// XMB/XTB placeholders can only contain A-Z, 0-9 and _\nfunction toPublicName(internalName) {\n return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, '_');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/* Closure variables holding messages must be named `MSG_[A-Z0-9]+` */\nconst CLOSURE_TRANSLATION_VAR_PREFIX = 'MSG_';\n/**\n * Prefix for non-`goog.getMsg` i18n-related vars.\n * Note: the prefix uses lowercase characters intentionally due to a Closure behavior that\n * considers variables like `I18N_0` as constants and throws an error when their value changes.\n */\nconst TRANSLATION_VAR_PREFIX = 'i18n_';\n/** Name of the i18n attributes **/\nconst I18N_ATTR = 'i18n';\nconst I18N_ATTR_PREFIX = 'i18n-';\n/** Prefix of var expressions used in ICUs */\nconst I18N_ICU_VAR_PREFIX = 'VAR_';\n/** Prefix of ICU expressions for post processing */\nconst I18N_ICU_MAPPING_PREFIX = 'I18N_EXP_';\n/** Placeholder wrapper for i18n expressions **/\nconst I18N_PLACEHOLDER_SYMBOL = '�';\nfunction isI18nAttribute(name) {\n return name === I18N_ATTR || name.startsWith(I18N_ATTR_PREFIX);\n}\nfunction isI18nRootNode(meta) {\n return meta instanceof Message;\n}\nfunction isSingleI18nIcu(meta) {\n return isI18nRootNode(meta) && meta.nodes.length === 1 && meta.nodes[0] instanceof Icu;\n}\nfunction hasI18nMeta(node) {\n return !!node.i18n;\n}\nfunction hasI18nAttrs(element) {\n return element.attrs.some((attr) => isI18nAttribute(attr.name));\n}\nfunction icuFromI18nMessage(message) {\n return message.nodes[0];\n}\nfunction wrapI18nPlaceholder(content, contextId = 0) {\n const blockId = contextId > 0 ? `:${contextId}` : '';\n return `${I18N_PLACEHOLDER_SYMBOL}${content}${blockId}${I18N_PLACEHOLDER_SYMBOL}`;\n}\nfunction assembleI18nBoundString(strings, bindingStartIndex = 0, contextId = 0) {\n if (!strings.length)\n return '';\n let acc = '';\n const lastIdx = strings.length - 1;\n for (let i = 0; i < lastIdx; i++) {\n acc += `${strings[i]}${wrapI18nPlaceholder(bindingStartIndex + i, contextId)}`;\n }\n acc += strings[lastIdx];\n return acc;\n}\nfunction getSeqNumberGenerator(startsAt = 0) {\n let current = startsAt;\n return () => current++;\n}\nfunction placeholdersToParams(placeholders) {\n const params = {};\n placeholders.forEach((values, key) => {\n params[key] = literal(values.length > 1 ? `[${values.join('|')}]` : values[0]);\n });\n return params;\n}\nfunction updatePlaceholderMap(map, name, ...values) {\n const current = map.get(name) || [];\n current.push(...values);\n map.set(name, current);\n}\nfunction assembleBoundTextPlaceholders(meta, bindingStartIndex = 0, contextId = 0) {\n const startIdx = bindingStartIndex;\n const placeholders = new Map();\n const node = meta instanceof Message ? meta.nodes.find(node => node instanceof Container) : meta;\n if (node) {\n node\n .children\n .filter((child) => child instanceof Placeholder)\n .forEach((child, idx) => {\n const content = wrapI18nPlaceholder(startIdx + idx, contextId);\n updatePlaceholderMap(placeholders, child.name, content);\n });\n }\n return placeholders;\n}\n/**\n * Format the placeholder names in a map of placeholders to expressions.\n *\n * The placeholder names are converted from \"internal\" format (e.g. `START_TAG_DIV_1`) to \"external\"\n * format (e.g. `startTagDiv_1`).\n *\n * @param params A map of placeholder names to expressions.\n * @param useCamelCase whether to camelCase the placeholder name when formatting.\n * @returns A new map of formatted placeholder names to expressions.\n */\nfunction formatI18nPlaceholderNamesInMap(params = {}, useCamelCase) {\n const _params = {};\n if (params && Object.keys(params).length) {\n Object.keys(params).forEach(key => _params[formatI18nPlaceholderName(key, useCamelCase)] = params[key]);\n }\n return _params;\n}\n/**\n * Converts internal placeholder names to public-facing format\n * (for example to use in goog.getMsg call).\n * Example: `START_TAG_DIV_1` is converted to `startTagDiv_1`.\n *\n * @param name The placeholder name that should be formatted\n * @returns Formatted placeholder name\n */\nfunction formatI18nPlaceholderName(name, useCamelCase = true) {\n const publicName = toPublicName(name);\n if (!useCamelCase) {\n return publicName;\n }\n const chunks = publicName.split('_');\n if (chunks.length === 1) {\n // if no \"_\" found - just lowercase the value\n return name.toLowerCase();\n }\n let postfix;\n // eject last element if it's a number\n if (/^\\d+$/.test(chunks[chunks.length - 1])) {\n postfix = chunks.pop();\n }\n let raw = chunks.shift().toLowerCase();\n if (chunks.length) {\n raw += chunks.map(c => c.charAt(0).toUpperCase() + c.slice(1).toLowerCase()).join('');\n }\n return postfix ? `${raw}_${postfix}` : raw;\n}\n/**\n * Generates a prefix for translation const name.\n *\n * @param extra Additional local prefix that should be injected into translation var name\n * @returns Complete translation const prefix\n */\nfunction getTranslationConstPrefix(extra) {\n return `${CLOSURE_TRANSLATION_VAR_PREFIX}${extra}`.toUpperCase();\n}\n/**\n * Generate AST to declare a variable. E.g. `var I18N_1;`.\n * @param variable the name of the variable to declare.\n */\nfunction declareI18nVariable(variable) {\n return new DeclareVarStmt(variable.name, undefined, INFERRED_TYPE, undefined, variable.sourceSpan);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Checks whether an object key contains potentially unsafe chars, thus the key should be wrapped in\n * quotes. Note: we do not wrap all keys into quotes, as it may have impact on minification and may\n * bot work in some cases when object keys are mangled by minifier.\n *\n * TODO(FW-1136): this is a temporary solution, we need to come up with a better way of working with\n * inputs that contain potentially unsafe chars.\n */\nconst UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;\n/** Name of the temporary to use during data binding */\nconst TEMPORARY_NAME = '_t';\n/** Name of the context parameter passed into a template function */\nconst CONTEXT_NAME = 'ctx';\n/** Name of the RenderFlag passed into a template function */\nconst RENDER_FLAGS = 'rf';\n/** The prefix reference variables */\nconst REFERENCE_PREFIX = '_r';\n/** The name of the implicit context reference */\nconst IMPLICIT_REFERENCE = '$implicit';\n/** Non bindable attribute name **/\nconst NON_BINDABLE_ATTR = 'ngNonBindable';\n/** Name for the variable keeping track of the context returned by `ɵɵrestoreView`. */\nconst RESTORED_VIEW_CONTEXT_NAME = 'restoredCtx';\n/**\n * Maximum length of a single instruction chain. Because our output AST uses recursion, we're\n * limited in how many expressions we can nest before we reach the call stack limit. This\n * length is set very conservatively in order to reduce the chance of problems.\n */\nconst MAX_CHAIN_LENGTH = 500;\n/** Instructions that support chaining. */\nconst CHAINABLE_INSTRUCTIONS = new Set([\n Identifiers.element,\n Identifiers.elementStart,\n Identifiers.elementEnd,\n Identifiers.elementContainer,\n Identifiers.elementContainerStart,\n Identifiers.elementContainerEnd,\n Identifiers.i18nExp,\n Identifiers.listener,\n Identifiers.classProp,\n Identifiers.syntheticHostListener,\n Identifiers.hostProperty,\n Identifiers.syntheticHostProperty,\n Identifiers.property,\n Identifiers.propertyInterpolate1,\n Identifiers.propertyInterpolate2,\n Identifiers.propertyInterpolate3,\n Identifiers.propertyInterpolate4,\n Identifiers.propertyInterpolate5,\n Identifiers.propertyInterpolate6,\n Identifiers.propertyInterpolate7,\n Identifiers.propertyInterpolate8,\n Identifiers.propertyInterpolateV,\n Identifiers.attribute,\n Identifiers.attributeInterpolate1,\n Identifiers.attributeInterpolate2,\n Identifiers.attributeInterpolate3,\n Identifiers.attributeInterpolate4,\n Identifiers.attributeInterpolate5,\n Identifiers.attributeInterpolate6,\n Identifiers.attributeInterpolate7,\n Identifiers.attributeInterpolate8,\n Identifiers.attributeInterpolateV,\n Identifiers.styleProp,\n Identifiers.stylePropInterpolate1,\n Identifiers.stylePropInterpolate2,\n Identifiers.stylePropInterpolate3,\n Identifiers.stylePropInterpolate4,\n Identifiers.stylePropInterpolate5,\n Identifiers.stylePropInterpolate6,\n Identifiers.stylePropInterpolate7,\n Identifiers.stylePropInterpolate8,\n Identifiers.stylePropInterpolateV,\n Identifiers.textInterpolate,\n Identifiers.textInterpolate1,\n Identifiers.textInterpolate2,\n Identifiers.textInterpolate3,\n Identifiers.textInterpolate4,\n Identifiers.textInterpolate5,\n Identifiers.textInterpolate6,\n Identifiers.textInterpolate7,\n Identifiers.textInterpolate8,\n Identifiers.textInterpolateV,\n]);\n/** Generates a call to a single instruction. */\nfunction invokeInstruction(span, reference, params) {\n return importExpr(reference, null, span).callFn(params, span);\n}\n/**\n * Creates an allocator for a temporary variable.\n *\n * A variable declaration is added to the statements the first time the allocator is invoked.\n */\nfunction temporaryAllocator(statements, name) {\n let temp = null;\n return () => {\n if (!temp) {\n statements.push(new DeclareVarStmt(TEMPORARY_NAME, undefined, DYNAMIC_TYPE));\n temp = variable(name);\n }\n return temp;\n };\n}\nfunction invalid(arg) {\n throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${arg.constructor.name}`);\n}\nfunction asLiteral(value) {\n if (Array.isArray(value)) {\n return literalArr(value.map(asLiteral));\n }\n return literal(value, INFERRED_TYPE);\n}\nfunction conditionallyCreateMapObjectLiteral(keys, keepDeclared) {\n if (Object.getOwnPropertyNames(keys).length > 0) {\n return mapToExpression(keys, keepDeclared);\n }\n return null;\n}\nfunction mapToExpression(map, keepDeclared) {\n return literalMap(Object.getOwnPropertyNames(map).map(key => {\n // canonical syntax: `dirProp: publicProp`\n const value = map[key];\n let declaredName;\n let publicName;\n let minifiedName;\n let needsDeclaredName;\n if (Array.isArray(value)) {\n [publicName, declaredName] = value;\n minifiedName = key;\n needsDeclaredName = publicName !== declaredName;\n }\n else {\n minifiedName = declaredName = key;\n publicName = value;\n needsDeclaredName = false;\n }\n return {\n key: minifiedName,\n // put quotes around keys that contain potentially unsafe characters\n quoted: UNSAFE_OBJECT_KEY_NAME_REGEXP.test(minifiedName),\n value: (keepDeclared && needsDeclaredName) ?\n literalArr([asLiteral(publicName), asLiteral(declaredName)]) :\n asLiteral(publicName)\n };\n }));\n}\n/**\n * Remove trailing null nodes as they are implied.\n */\nfunction trimTrailingNulls(parameters) {\n while (isNull(parameters[parameters.length - 1])) {\n parameters.pop();\n }\n return parameters;\n}\nfunction getQueryPredicate(query, constantPool) {\n if (Array.isArray(query.predicate)) {\n let predicate = [];\n query.predicate.forEach((selector) => {\n // Each item in predicates array may contain strings with comma-separated refs\n // (for ex. 'ref, ref1, ..., refN'), thus we extract individual refs and store them\n // as separate array entities\n const selectors = selector.split(',').map(token => literal(token.trim()));\n predicate.push(...selectors);\n });\n return constantPool.getConstLiteral(literalArr(predicate), true);\n }\n else {\n // The original predicate may have been wrapped in a `forwardRef()` call.\n switch (query.predicate.forwardRef) {\n case 0 /* ForwardRefHandling.None */:\n case 2 /* ForwardRefHandling.Unwrapped */:\n return query.predicate.expression;\n case 1 /* ForwardRefHandling.Wrapped */:\n return importExpr(Identifiers.resolveForwardRef).callFn([query.predicate.expression]);\n }\n }\n}\n/**\n * A representation for an object literal used during codegen of definition objects. The generic\n * type `T` allows to reference a documented type of the generated structure, such that the\n * property names that are set can be resolved to their documented declaration.\n */\nclass DefinitionMap {\n constructor() {\n this.values = [];\n }\n set(key, value) {\n if (value) {\n this.values.push({ key: key, value, quoted: false });\n }\n }\n toLiteralMap() {\n return literalMap(this.values);\n }\n}\n/**\n * Extract a map of properties to values for a given element or template node, which can be used\n * by the directive matching machinery.\n *\n * @param elOrTpl the element or template in question\n * @return an object set up for directive matching. For attributes on the element/template, this\n * object maps a property name to its (static) value. For any bindings, this map simply maps the\n * property name to an empty string.\n */\nfunction getAttrsForDirectiveMatching(elOrTpl) {\n const attributesMap = {};\n if (elOrTpl instanceof Template && elOrTpl.tagName !== 'ng-template') {\n elOrTpl.templateAttrs.forEach(a => attributesMap[a.name] = '');\n }\n else {\n elOrTpl.attributes.forEach(a => {\n if (!isI18nAttribute(a.name)) {\n attributesMap[a.name] = a.value;\n }\n });\n elOrTpl.inputs.forEach(i => {\n attributesMap[i.name] = '';\n });\n elOrTpl.outputs.forEach(o => {\n attributesMap[o.name] = '';\n });\n }\n return attributesMap;\n}\n/**\n * Gets the number of arguments expected to be passed to a generated instruction in the case of\n * interpolation instructions.\n * @param interpolation An interpolation ast\n */\nfunction getInterpolationArgsLength(interpolation) {\n const { expressions, strings } = interpolation;\n if (expressions.length === 1 && strings.length === 2 && strings[0] === '' && strings[1] === '') {\n // If the interpolation has one interpolated value, but the prefix and suffix are both empty\n // strings, we only pass one argument, to a special instruction like `propertyInterpolate` or\n // `textInterpolate`.\n return 1;\n }\n else {\n return expressions.length + strings.length;\n }\n}\n/**\n * Generates the final instruction call statements based on the passed in configuration.\n * Will try to chain instructions as much as possible, if chaining is supported.\n */\nfunction getInstructionStatements(instructions) {\n const statements = [];\n let pendingExpression = null;\n let pendingExpressionType = null;\n let chainLength = 0;\n for (const current of instructions) {\n const resolvedParams = (typeof current.paramsOrFn === 'function' ? current.paramsOrFn() : current.paramsOrFn) ??\n [];\n const params = Array.isArray(resolvedParams) ? resolvedParams : [resolvedParams];\n // If the current instruction is the same as the previous one\n // and it can be chained, add another call to the chain.\n if (chainLength < MAX_CHAIN_LENGTH && pendingExpressionType === current.reference &&\n CHAINABLE_INSTRUCTIONS.has(pendingExpressionType)) {\n // We'll always have a pending expression when there's a pending expression type.\n pendingExpression = pendingExpression.callFn(params, pendingExpression.sourceSpan);\n chainLength++;\n }\n else {\n if (pendingExpression !== null) {\n statements.push(pendingExpression.toStmt());\n }\n pendingExpression = invokeInstruction(current.span, current.reference, params);\n pendingExpressionType = current.reference;\n chainLength = 0;\n }\n }\n // Since the current instruction adds the previous one to the statements,\n // we may be left with the final one at the end that is still pending.\n if (pendingExpression !== null) {\n statements.push(pendingExpression.toStmt());\n }\n return statements;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction compileInjectable(meta, resolveForwardRefs) {\n let result = null;\n const factoryMeta = {\n name: meta.name,\n type: meta.type,\n internalType: meta.internalType,\n typeArgumentCount: meta.typeArgumentCount,\n deps: [],\n target: FactoryTarget$1.Injectable,\n };\n if (meta.useClass !== undefined) {\n // meta.useClass has two modes of operation. Either deps are specified, in which case `new` is\n // used to instantiate the class with dependencies injected, or deps are not specified and\n // the factory of the class is used to instantiate it.\n //\n // A special case exists for useClass: Type where Type is the injectable type itself and no\n // deps are specified, in which case 'useClass' is effectively ignored.\n const useClassOnSelf = meta.useClass.expression.isEquivalent(meta.internalType);\n let deps = undefined;\n if (meta.deps !== undefined) {\n deps = meta.deps;\n }\n if (deps !== undefined) {\n // factory: () => new meta.useClass(...deps)\n result = compileFactoryFunction({\n ...factoryMeta,\n delegate: meta.useClass.expression,\n delegateDeps: deps,\n delegateType: R3FactoryDelegateType.Class,\n });\n }\n else if (useClassOnSelf) {\n result = compileFactoryFunction(factoryMeta);\n }\n else {\n result = {\n statements: [],\n expression: delegateToFactory(meta.type.value, meta.useClass.expression, resolveForwardRefs)\n };\n }\n }\n else if (meta.useFactory !== undefined) {\n if (meta.deps !== undefined) {\n result = compileFactoryFunction({\n ...factoryMeta,\n delegate: meta.useFactory,\n delegateDeps: meta.deps || [],\n delegateType: R3FactoryDelegateType.Function,\n });\n }\n else {\n result = {\n statements: [],\n expression: fn([], [new ReturnStatement(meta.useFactory.callFn([]))])\n };\n }\n }\n else if (meta.useValue !== undefined) {\n // Note: it's safe to use `meta.useValue` instead of the `USE_VALUE in meta` check used for\n // client code because meta.useValue is an Expression which will be defined even if the actual\n // value is undefined.\n result = compileFactoryFunction({\n ...factoryMeta,\n expression: meta.useValue.expression,\n });\n }\n else if (meta.useExisting !== undefined) {\n // useExisting is an `inject` call on the existing token.\n result = compileFactoryFunction({\n ...factoryMeta,\n expression: importExpr(Identifiers.inject).callFn([meta.useExisting.expression]),\n });\n }\n else {\n result = {\n statements: [],\n expression: delegateToFactory(meta.type.value, meta.internalType, resolveForwardRefs)\n };\n }\n const token = meta.internalType;\n const injectableProps = new DefinitionMap();\n injectableProps.set('token', token);\n injectableProps.set('factory', result.expression);\n // Only generate providedIn property if it has a non-null value\n if (meta.providedIn.expression.value !== null) {\n injectableProps.set('providedIn', convertFromMaybeForwardRefExpression(meta.providedIn));\n }\n const expression = importExpr(Identifiers.ɵɵdefineInjectable)\n .callFn([injectableProps.toLiteralMap()], undefined, true);\n return {\n expression,\n type: createInjectableType(meta),\n statements: result.statements,\n };\n}\nfunction createInjectableType(meta) {\n return new ExpressionType(importExpr(Identifiers.InjectableDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount)]));\n}\nfunction delegateToFactory(type, internalType, unwrapForwardRefs) {\n if (type.node === internalType.node) {\n // The types are the same, so we can simply delegate directly to the type's factory.\n // ```\n // factory: type.ɵfac\n // ```\n return internalType.prop('ɵfac');\n }\n if (!unwrapForwardRefs) {\n // The type is not wrapped in a `forwardRef()`, so we create a simple factory function that\n // accepts a sub-type as an argument.\n // ```\n // factory: function(t) { return internalType.ɵfac(t); }\n // ```\n return createFactoryFunction(internalType);\n }\n // The internalType is actually wrapped in a `forwardRef()` so we need to resolve that before\n // calling its factory.\n // ```\n // factory: function(t) { return core.resolveForwardRef(type).ɵfac(t); }\n // ```\n const unwrappedType = importExpr(Identifiers.resolveForwardRef).callFn([internalType]);\n return createFactoryFunction(unwrappedType);\n}\nfunction createFactoryFunction(type) {\n return fn([new FnParam('t', DYNAMIC_TYPE)], [new ReturnStatement(type.prop('ɵfac').callFn([variable('t')]))]);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst UNUSABLE_INTERPOLATION_REGEXPS = [\n /^\\s*$/,\n /[<>]/,\n /^[{}]$/,\n /&(#|[a-z])/i,\n /^\\/\\//, // comment\n];\nfunction assertInterpolationSymbols(identifier, value) {\n if (value != null && !(Array.isArray(value) && value.length == 2)) {\n throw new Error(`Expected '${identifier}' to be an array, [start, end].`);\n }\n else if (value != null) {\n const start = value[0];\n const end = value[1];\n // Check for unusable interpolation symbols\n UNUSABLE_INTERPOLATION_REGEXPS.forEach(regexp => {\n if (regexp.test(start) || regexp.test(end)) {\n throw new Error(`['${start}', '${end}'] contains unusable interpolation symbol.`);\n }\n });\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass InterpolationConfig {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n static fromArray(markers) {\n if (!markers) {\n return DEFAULT_INTERPOLATION_CONFIG;\n }\n assertInterpolationSymbols('interpolation', markers);\n return new InterpolationConfig(markers[0], markers[1]);\n }\n}\nconst DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig('{{', '}}');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst $EOF = 0;\nconst $BSPACE = 8;\nconst $TAB = 9;\nconst $LF = 10;\nconst $VTAB = 11;\nconst $FF = 12;\nconst $CR = 13;\nconst $SPACE = 32;\nconst $BANG = 33;\nconst $DQ = 34;\nconst $HASH = 35;\nconst $$ = 36;\nconst $PERCENT = 37;\nconst $AMPERSAND = 38;\nconst $SQ = 39;\nconst $LPAREN = 40;\nconst $RPAREN = 41;\nconst $STAR = 42;\nconst $PLUS = 43;\nconst $COMMA = 44;\nconst $MINUS = 45;\nconst $PERIOD = 46;\nconst $SLASH = 47;\nconst $COLON = 58;\nconst $SEMICOLON = 59;\nconst $LT = 60;\nconst $EQ = 61;\nconst $GT = 62;\nconst $QUESTION = 63;\nconst $0 = 48;\nconst $7 = 55;\nconst $9 = 57;\nconst $A = 65;\nconst $E = 69;\nconst $F = 70;\nconst $X = 88;\nconst $Z = 90;\nconst $LBRACKET = 91;\nconst $BACKSLASH = 92;\nconst $RBRACKET = 93;\nconst $CARET = 94;\nconst $_ = 95;\nconst $a = 97;\nconst $b = 98;\nconst $e = 101;\nconst $f = 102;\nconst $n = 110;\nconst $r = 114;\nconst $t = 116;\nconst $u = 117;\nconst $v = 118;\nconst $x = 120;\nconst $z = 122;\nconst $LBRACE = 123;\nconst $BAR = 124;\nconst $RBRACE = 125;\nconst $NBSP = 160;\nconst $PIPE = 124;\nconst $TILDA = 126;\nconst $AT = 64;\nconst $BT = 96;\nfunction isWhitespace(code) {\n return (code >= $TAB && code <= $SPACE) || (code == $NBSP);\n}\nfunction isDigit(code) {\n return $0 <= code && code <= $9;\n}\nfunction isAsciiLetter(code) {\n return code >= $a && code <= $z || code >= $A && code <= $Z;\n}\nfunction isAsciiHexDigit(code) {\n return code >= $a && code <= $f || code >= $A && code <= $F || isDigit(code);\n}\nfunction isNewLine(code) {\n return code === $LF || code === $CR;\n}\nfunction isOctalDigit(code) {\n return $0 <= code && code <= $7;\n}\nfunction isQuote(code) {\n return code === $SQ || code === $DQ || code === $BT;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass ParseLocation {\n constructor(file, offset, line, col) {\n this.file = file;\n this.offset = offset;\n this.line = line;\n this.col = col;\n }\n toString() {\n return this.offset != null ? `${this.file.url}@${this.line}:${this.col}` : this.file.url;\n }\n moveBy(delta) {\n const source = this.file.content;\n const len = source.length;\n let offset = this.offset;\n let line = this.line;\n let col = this.col;\n while (offset > 0 && delta < 0) {\n offset--;\n delta++;\n const ch = source.charCodeAt(offset);\n if (ch == $LF) {\n line--;\n const priorLine = source.substring(0, offset - 1).lastIndexOf(String.fromCharCode($LF));\n col = priorLine > 0 ? offset - priorLine : offset;\n }\n else {\n col--;\n }\n }\n while (offset < len && delta > 0) {\n const ch = source.charCodeAt(offset);\n offset++;\n delta--;\n if (ch == $LF) {\n line++;\n col = 0;\n }\n else {\n col++;\n }\n }\n return new ParseLocation(this.file, offset, line, col);\n }\n // Return the source around the location\n // Up to `maxChars` or `maxLines` on each side of the location\n getContext(maxChars, maxLines) {\n const content = this.file.content;\n let startOffset = this.offset;\n if (startOffset != null) {\n if (startOffset > content.length - 1) {\n startOffset = content.length - 1;\n }\n let endOffset = startOffset;\n let ctxChars = 0;\n let ctxLines = 0;\n while (ctxChars < maxChars && startOffset > 0) {\n startOffset--;\n ctxChars++;\n if (content[startOffset] == '\\n') {\n if (++ctxLines == maxLines) {\n break;\n }\n }\n }\n ctxChars = 0;\n ctxLines = 0;\n while (ctxChars < maxChars && endOffset < content.length - 1) {\n endOffset++;\n ctxChars++;\n if (content[endOffset] == '\\n') {\n if (++ctxLines == maxLines) {\n break;\n }\n }\n }\n return {\n before: content.substring(startOffset, this.offset),\n after: content.substring(this.offset, endOffset + 1),\n };\n }\n return null;\n }\n}\nclass ParseSourceFile {\n constructor(content, url) {\n this.content = content;\n this.url = url;\n }\n}\nclass ParseSourceSpan {\n /**\n * Create an object that holds information about spans of tokens/nodes captured during\n * lexing/parsing of text.\n *\n * @param start\n * The location of the start of the span (having skipped leading trivia).\n * Skipping leading trivia makes source-spans more \"user friendly\", since things like HTML\n * elements will appear to begin at the start of the opening tag, rather than at the start of any\n * leading trivia, which could include newlines.\n *\n * @param end\n * The location of the end of the span.\n *\n * @param fullStart\n * The start of the token without skipping the leading trivia.\n * This is used by tooling that splits tokens further, such as extracting Angular interpolations\n * from text tokens. Such tooling creates new source-spans relative to the original token's\n * source-span. If leading trivia characters have been skipped then the new source-spans may be\n * incorrectly offset.\n *\n * @param details\n * Additional information (such as identifier names) that should be associated with the span.\n */\n constructor(start, end, fullStart = start, details = null) {\n this.start = start;\n this.end = end;\n this.fullStart = fullStart;\n this.details = details;\n }\n toString() {\n return this.start.file.content.substring(this.start.offset, this.end.offset);\n }\n}\nvar ParseErrorLevel;\n(function (ParseErrorLevel) {\n ParseErrorLevel[ParseErrorLevel[\"WARNING\"] = 0] = \"WARNING\";\n ParseErrorLevel[ParseErrorLevel[\"ERROR\"] = 1] = \"ERROR\";\n})(ParseErrorLevel || (ParseErrorLevel = {}));\nclass ParseError {\n constructor(span, msg, level = ParseErrorLevel.ERROR) {\n this.span = span;\n this.msg = msg;\n this.level = level;\n }\n contextualMessage() {\n const ctx = this.span.start.getContext(100, 3);\n return ctx ? `${this.msg} (\"${ctx.before}[${ParseErrorLevel[this.level]} ->]${ctx.after}\")` :\n this.msg;\n }\n toString() {\n const details = this.span.details ? `, ${this.span.details}` : '';\n return `${this.contextualMessage()}: ${this.span.start}${details}`;\n }\n}\n/**\n * Generates Source Span object for a given R3 Type for JIT mode.\n *\n * @param kind Component or Directive.\n * @param typeName name of the Component or Directive.\n * @param sourceUrl reference to Component or Directive source.\n * @returns instance of ParseSourceSpan that represent a given Component or Directive.\n */\nfunction r3JitTypeSourceSpan(kind, typeName, sourceUrl) {\n const sourceFileName = `in ${kind} ${typeName} in ${sourceUrl}`;\n const sourceFile = new ParseSourceFile('', sourceFileName);\n return new ParseSourceSpan(new ParseLocation(sourceFile, -1, -1, -1), new ParseLocation(sourceFile, -1, -1, -1));\n}\nlet _anonymousTypeIndex = 0;\nfunction identifierName(compileIdentifier) {\n if (!compileIdentifier || !compileIdentifier.reference) {\n return null;\n }\n const ref = compileIdentifier.reference;\n if (ref['__anonymousType']) {\n return ref['__anonymousType'];\n }\n if (ref['__forward_ref__']) {\n // We do not want to try to stringify a `forwardRef()` function because that would cause the\n // inner function to be evaluated too early, defeating the whole point of the `forwardRef`.\n return '__forward_ref__';\n }\n let identifier = stringify(ref);\n if (identifier.indexOf('(') >= 0) {\n // case: anonymous functions!\n identifier = `anonymous_${_anonymousTypeIndex++}`;\n ref['__anonymousType'] = identifier;\n }\n else {\n identifier = sanitizeIdentifier(identifier);\n }\n return identifier;\n}\nfunction sanitizeIdentifier(name) {\n return name.replace(/\\W/g, '_');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * In TypeScript, tagged template functions expect a \"template object\", which is an array of\n * \"cooked\" strings plus a `raw` property that contains an array of \"raw\" strings. This is\n * typically constructed with a function called `__makeTemplateObject(cooked, raw)`, but it may not\n * be available in all environments.\n *\n * This is a JavaScript polyfill that uses __makeTemplateObject when it's available, but otherwise\n * creates an inline helper with the same functionality.\n *\n * In the inline function, if `Object.defineProperty` is available we use that to attach the `raw`\n * array.\n */\nconst makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,\"raw\",{value:t}):e.raw=t,e})';\nclass AbstractJsEmitterVisitor extends AbstractEmitterVisitor {\n constructor() {\n super(false);\n }\n visitWrappedNodeExpr(ast, ctx) {\n throw new Error('Cannot emit a WrappedNodeExpr in Javascript.');\n }\n visitDeclareVarStmt(stmt, ctx) {\n ctx.print(stmt, `var ${stmt.name}`);\n if (stmt.value) {\n ctx.print(stmt, ' = ');\n stmt.value.visitExpression(this, ctx);\n }\n ctx.println(stmt, `;`);\n return null;\n }\n visitTaggedTemplateExpr(ast, ctx) {\n // The following convoluted piece of code is effectively the downlevelled equivalent of\n // ```\n // tag`...`\n // ```\n // which is effectively like:\n // ```\n // tag(__makeTemplateObject(cooked, raw), expression1, expression2, ...);\n // ```\n const elements = ast.template.elements;\n ast.tag.visitExpression(this, ctx);\n ctx.print(ast, `(${makeTemplateObjectPolyfill}(`);\n ctx.print(ast, `[${elements.map(part => escapeIdentifier(part.text, false)).join(', ')}], `);\n ctx.print(ast, `[${elements.map(part => escapeIdentifier(part.rawText, false)).join(', ')}])`);\n ast.template.expressions.forEach(expression => {\n ctx.print(ast, ', ');\n expression.visitExpression(this, ctx);\n });\n ctx.print(ast, ')');\n return null;\n }\n visitFunctionExpr(ast, ctx) {\n ctx.print(ast, `function${ast.name ? ' ' + ast.name : ''}(`);\n this._visitParams(ast.params, ctx);\n ctx.println(ast, `) {`);\n ctx.incIndent();\n this.visitAllStatements(ast.statements, ctx);\n ctx.decIndent();\n ctx.print(ast, `}`);\n return null;\n }\n visitDeclareFunctionStmt(stmt, ctx) {\n ctx.print(stmt, `function ${stmt.name}(`);\n this._visitParams(stmt.params, ctx);\n ctx.println(stmt, `) {`);\n ctx.incIndent();\n this.visitAllStatements(stmt.statements, ctx);\n ctx.decIndent();\n ctx.println(stmt, `}`);\n return null;\n }\n visitLocalizedString(ast, ctx) {\n // The following convoluted piece of code is effectively the downlevelled equivalent of\n // ```\n // $localize `...`\n // ```\n // which is effectively like:\n // ```\n // $localize(__makeTemplateObject(cooked, raw), expression1, expression2, ...);\n // ```\n ctx.print(ast, `$localize(${makeTemplateObjectPolyfill}(`);\n const parts = [ast.serializeI18nHead()];\n for (let i = 1; i < ast.messageParts.length; i++) {\n parts.push(ast.serializeI18nTemplatePart(i));\n }\n ctx.print(ast, `[${parts.map(part => escapeIdentifier(part.cooked, false)).join(', ')}], `);\n ctx.print(ast, `[${parts.map(part => escapeIdentifier(part.raw, false)).join(', ')}])`);\n ast.expressions.forEach(expression => {\n ctx.print(ast, ', ');\n expression.visitExpression(this, ctx);\n });\n ctx.print(ast, ')');\n return null;\n }\n _visitParams(params, ctx) {\n this.visitAllObjects(param => ctx.print(null, param.name), params, ctx, ',');\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy;\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy() {\n if (policy === undefined) {\n policy = null;\n if (_global.trustedTypes) {\n try {\n policy =\n _global.trustedTypes.createPolicy('angular#unsafe-jit', {\n createScript: (s) => s,\n });\n }\n catch {\n // trustedTypes.createPolicy throws if called with a name that is\n // already registered, even in report-only mode. Until the API changes,\n // catch the error not to break the applications functionally. In such\n // cases, the code will fall back to using strings.\n }\n }\n }\n return policy;\n}\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security In particular, it must be assured that the provided string will\n * never cause an XSS vulnerability if used in a context that will be\n * interpreted and executed as a script by a browser, e.g. when calling eval.\n */\nfunction trustedScriptFromString(script) {\n return getPolicy()?.createScript(script) || script;\n}\n/**\n * Unsafely call the Function constructor with the given string arguments.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only called from the JIT compiler, as use in other code can lead to XSS\n * vulnerabilities.\n */\nfunction newTrustedFunctionForJIT(...args) {\n if (!_global.trustedTypes) {\n // In environments that don't support Trusted Types, fall back to the most\n // straightforward implementation:\n return new Function(...args);\n }\n // Chrome currently does not support passing TrustedScript to the Function\n // constructor. The following implements the workaround proposed on the page\n // below, where the Chromium bug is also referenced:\n // https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor\n const fnArgs = args.slice(0, -1).join(',');\n const fnBody = args[args.length - 1];\n const body = `(function anonymous(${fnArgs}\n) { ${fnBody}\n})`;\n // Using eval directly confuses the compiler and prevents this module from\n // being stripped out of JS binaries even if not used. The global['eval']\n // indirection fixes that.\n const fn = _global['eval'](trustedScriptFromString(body));\n if (fn.bind === undefined) {\n // Workaround for a browser bug that only exists in Chrome 83, where passing\n // a TrustedScript to eval just returns the TrustedScript back without\n // evaluating it. In that case, fall back to the most straightforward\n // implementation:\n return new Function(...args);\n }\n // To completely mimic the behavior of calling \"new Function\", two more\n // things need to happen:\n // 1. Stringifying the resulting function should return its source code\n fn.toString = () => body;\n // 2. When calling the resulting function, `this` should refer to `global`\n return fn.bind(_global);\n // When Trusted Types support in Function constructors is widely available,\n // the implementation of this function can be simplified to:\n // return new Function(...args.map(a => trustedScriptFromString(a)));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A helper class to manage the evaluation of JIT generated code.\n */\nclass JitEvaluator {\n /**\n *\n * @param sourceUrl The URL of the generated code.\n * @param statements An array of Angular statement AST nodes to be evaluated.\n * @param refResolver Resolves `o.ExternalReference`s into values.\n * @param createSourceMaps If true then create a source-map for the generated code and include it\n * inline as a source-map comment.\n * @returns A map of all the variables in the generated code.\n */\n evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {\n const converter = new JitEmitterVisitor(refResolver);\n const ctx = EmitterVisitorContext.createRoot();\n // Ensure generated code is in strict mode\n if (statements.length > 0 && !isUseStrictStatement(statements[0])) {\n statements = [\n literal('use strict').toStmt(),\n ...statements,\n ];\n }\n converter.visitAllStatements(statements, ctx);\n converter.createReturnStmt(ctx);\n return this.evaluateCode(sourceUrl, ctx, converter.getArgs(), createSourceMaps);\n }\n /**\n * Evaluate a piece of JIT generated code.\n * @param sourceUrl The URL of this generated code.\n * @param ctx A context object that contains an AST of the code to be evaluated.\n * @param vars A map containing the names and values of variables that the evaluated code might\n * reference.\n * @param createSourceMap If true then create a source-map for the generated code and include it\n * inline as a source-map comment.\n * @returns The result of evaluating the code.\n */\n evaluateCode(sourceUrl, ctx, vars, createSourceMap) {\n let fnBody = `\"use strict\";${ctx.toSource()}\\n//# sourceURL=${sourceUrl}`;\n const fnArgNames = [];\n const fnArgValues = [];\n for (const argName in vars) {\n fnArgValues.push(vars[argName]);\n fnArgNames.push(argName);\n }\n if (createSourceMap) {\n // using `new Function(...)` generates a header, 1 line of no arguments, 2 lines otherwise\n // E.g. ```\n // function anonymous(a,b,c\n // /**/) { ... }```\n // We don't want to hard code this fact, so we auto detect it via an empty function first.\n const emptyFn = newTrustedFunctionForJIT(...fnArgNames.concat('return null;')).toString();\n const headerLines = emptyFn.slice(0, emptyFn.indexOf('return null;')).split('\\n').length - 1;\n fnBody += `\\n${ctx.toSourceMapGenerator(sourceUrl, headerLines).toJsComment()}`;\n }\n const fn = newTrustedFunctionForJIT(...fnArgNames.concat(fnBody));\n return this.executeFunction(fn, fnArgValues);\n }\n /**\n * Execute a JIT generated function by calling it.\n *\n * This method can be overridden in tests to capture the functions that are generated\n * by this `JitEvaluator` class.\n *\n * @param fn A function to execute.\n * @param args The arguments to pass to the function being executed.\n * @returns The return value of the executed function.\n */\n executeFunction(fn, args) {\n return fn(...args);\n }\n}\n/**\n * An Angular AST visitor that converts AST nodes into executable JavaScript code.\n */\nclass JitEmitterVisitor extends AbstractJsEmitterVisitor {\n constructor(refResolver) {\n super();\n this.refResolver = refResolver;\n this._evalArgNames = [];\n this._evalArgValues = [];\n this._evalExportedVars = [];\n }\n createReturnStmt(ctx) {\n const stmt = new ReturnStatement(new LiteralMapExpr(this._evalExportedVars.map(resultVar => new LiteralMapEntry(resultVar, variable(resultVar), false))));\n stmt.visitStatement(this, ctx);\n }\n getArgs() {\n const result = {};\n for (let i = 0; i < this._evalArgNames.length; i++) {\n result[this._evalArgNames[i]] = this._evalArgValues[i];\n }\n return result;\n }\n visitExternalExpr(ast, ctx) {\n this._emitReferenceToExternal(ast, this.refResolver.resolveExternalReference(ast.value), ctx);\n return null;\n }\n visitWrappedNodeExpr(ast, ctx) {\n this._emitReferenceToExternal(ast, ast.node, ctx);\n return null;\n }\n visitDeclareVarStmt(stmt, ctx) {\n if (stmt.hasModifier(StmtModifier.Exported)) {\n this._evalExportedVars.push(stmt.name);\n }\n return super.visitDeclareVarStmt(stmt, ctx);\n }\n visitDeclareFunctionStmt(stmt, ctx) {\n if (stmt.hasModifier(StmtModifier.Exported)) {\n this._evalExportedVars.push(stmt.name);\n }\n return super.visitDeclareFunctionStmt(stmt, ctx);\n }\n _emitReferenceToExternal(ast, value, ctx) {\n let id = this._evalArgValues.indexOf(value);\n if (id === -1) {\n id = this._evalArgValues.length;\n this._evalArgValues.push(value);\n const name = identifierName({ reference: value }) || 'val';\n this._evalArgNames.push(`jit_${name}_${id}`);\n }\n ctx.print(ast, this._evalArgNames[id]);\n }\n}\nfunction isUseStrictStatement(statement) {\n return statement.isEquivalent(literal('use strict').toStmt());\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction compileInjector(meta) {\n const definitionMap = new DefinitionMap();\n if (meta.providers !== null) {\n definitionMap.set('providers', meta.providers);\n }\n if (meta.imports.length > 0) {\n definitionMap.set('imports', literalArr(meta.imports));\n }\n const expression = importExpr(Identifiers.defineInjector).callFn([definitionMap.toLiteralMap()], undefined, true);\n const type = createInjectorType(meta);\n return { expression, type, statements: [] };\n}\nfunction createInjectorType(meta) {\n return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Implementation of `CompileReflector` which resolves references to @angular/core\n * symbols at runtime, according to a consumer-provided mapping.\n *\n * Only supports `resolveExternalReference`, all other methods throw.\n */\nclass R3JitReflector {\n constructor(context) {\n this.context = context;\n }\n resolveExternalReference(ref) {\n // This reflector only handles @angular/core imports.\n if (ref.moduleName !== '@angular/core') {\n throw new Error(`Cannot resolve external reference to ${ref.moduleName}, only references to @angular/core are supported.`);\n }\n if (!this.context.hasOwnProperty(ref.name)) {\n throw new Error(`No value provided for @angular/core symbol '${ref.name}'.`);\n }\n return this.context[ref.name];\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * How the selector scope of an NgModule (its declarations, imports, and exports) should be emitted\n * as a part of the NgModule definition.\n */\nvar R3SelectorScopeMode;\n(function (R3SelectorScopeMode) {\n /**\n * Emit the declarations inline into the module definition.\n *\n * This option is useful in certain contexts where it's known that JIT support is required. The\n * tradeoff here is that this emit style prevents directives and pipes from being tree-shaken if\n * they are unused, but the NgModule is used.\n */\n R3SelectorScopeMode[R3SelectorScopeMode[\"Inline\"] = 0] = \"Inline\";\n /**\n * Emit the declarations using a side effectful function call, `ɵɵsetNgModuleScope`, that is\n * guarded with the `ngJitMode` flag.\n *\n * This form of emit supports JIT and can be optimized away if the `ngJitMode` flag is set to\n * false, which allows unused directives and pipes to be tree-shaken.\n */\n R3SelectorScopeMode[R3SelectorScopeMode[\"SideEffect\"] = 1] = \"SideEffect\";\n /**\n * Don't generate selector scopes at all.\n *\n * This is useful for contexts where JIT support is known to be unnecessary.\n */\n R3SelectorScopeMode[R3SelectorScopeMode[\"Omit\"] = 2] = \"Omit\";\n})(R3SelectorScopeMode || (R3SelectorScopeMode = {}));\n/**\n * Construct an `R3NgModuleDef` for the given `R3NgModuleMetadata`.\n */\nfunction compileNgModule(meta) {\n const { adjacentType, internalType, bootstrap, declarations, imports, exports, schemas, containsForwardDecls, selectorScopeMode, id } = meta;\n const statements = [];\n const definitionMap = new DefinitionMap();\n definitionMap.set('type', internalType);\n if (bootstrap.length > 0) {\n definitionMap.set('bootstrap', refsToArray(bootstrap, containsForwardDecls));\n }\n if (selectorScopeMode === R3SelectorScopeMode.Inline) {\n // If requested to emit scope information inline, pass the `declarations`, `imports` and\n // `exports` to the `ɵɵdefineNgModule()` call directly.\n if (declarations.length > 0) {\n definitionMap.set('declarations', refsToArray(declarations, containsForwardDecls));\n }\n if (imports.length > 0) {\n definitionMap.set('imports', refsToArray(imports, containsForwardDecls));\n }\n if (exports.length > 0) {\n definitionMap.set('exports', refsToArray(exports, containsForwardDecls));\n }\n }\n else if (selectorScopeMode === R3SelectorScopeMode.SideEffect) {\n // In this mode, scope information is not passed into `ɵɵdefineNgModule` as it\n // would prevent tree-shaking of the declarations, imports and exports references. Instead, it's\n // patched onto the NgModule definition with a `ɵɵsetNgModuleScope` call that's guarded by the\n // `ngJitMode` flag.\n const setNgModuleScopeCall = generateSetNgModuleScopeCall(meta);\n if (setNgModuleScopeCall !== null) {\n statements.push(setNgModuleScopeCall);\n }\n }\n else {\n // Selector scope emit was not requested, so skip it.\n }\n if (schemas !== null && schemas.length > 0) {\n definitionMap.set('schemas', literalArr(schemas.map(ref => ref.value)));\n }\n if (id !== null) {\n definitionMap.set('id', id);\n // Generate a side-effectful call to register this NgModule by its id, as per the semantics of\n // NgModule ids.\n statements.push(importExpr(Identifiers.registerNgModuleType).callFn([adjacentType, id]).toStmt());\n }\n const expression = importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()], undefined, true);\n const type = createNgModuleType(meta);\n return { expression, type, statements };\n}\n/**\n * This function is used in JIT mode to generate the call to `ɵɵdefineNgModule()` from a call to\n * `ɵɵngDeclareNgModule()`.\n */\nfunction compileNgModuleDeclarationExpression(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('type', new WrappedNodeExpr(meta.type));\n if (meta.bootstrap !== undefined) {\n definitionMap.set('bootstrap', new WrappedNodeExpr(meta.bootstrap));\n }\n if (meta.declarations !== undefined) {\n definitionMap.set('declarations', new WrappedNodeExpr(meta.declarations));\n }\n if (meta.imports !== undefined) {\n definitionMap.set('imports', new WrappedNodeExpr(meta.imports));\n }\n if (meta.exports !== undefined) {\n definitionMap.set('exports', new WrappedNodeExpr(meta.exports));\n }\n if (meta.schemas !== undefined) {\n definitionMap.set('schemas', new WrappedNodeExpr(meta.schemas));\n }\n if (meta.id !== undefined) {\n definitionMap.set('id', new WrappedNodeExpr(meta.id));\n }\n return importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()]);\n}\nfunction createNgModuleType({ type: moduleType, declarations, exports, imports, includeImportTypes, publicDeclarationTypes }) {\n return new ExpressionType(importExpr(Identifiers.NgModuleDeclaration, [\n new ExpressionType(moduleType.type),\n publicDeclarationTypes === null ? tupleTypeOf(declarations) :\n tupleOfTypes(publicDeclarationTypes),\n includeImportTypes ? tupleTypeOf(imports) : NONE_TYPE,\n tupleTypeOf(exports),\n ]));\n}\n/**\n * Generates a function call to `ɵɵsetNgModuleScope` with all necessary information so that the\n * transitive module scope can be computed during runtime in JIT mode. This call is marked pure\n * such that the references to declarations, imports and exports may be elided causing these\n * symbols to become tree-shakeable.\n */\nfunction generateSetNgModuleScopeCall(meta) {\n const { adjacentType: moduleType, declarations, imports, exports, containsForwardDecls } = meta;\n const scopeMap = new DefinitionMap();\n if (declarations.length > 0) {\n scopeMap.set('declarations', refsToArray(declarations, containsForwardDecls));\n }\n if (imports.length > 0) {\n scopeMap.set('imports', refsToArray(imports, containsForwardDecls));\n }\n if (exports.length > 0) {\n scopeMap.set('exports', refsToArray(exports, containsForwardDecls));\n }\n if (Object.keys(scopeMap.values).length === 0) {\n return null;\n }\n // setNgModuleScope(...)\n const fnCall = new InvokeFunctionExpr(\n /* fn */ importExpr(Identifiers.setNgModuleScope), \n /* args */ [moduleType, scopeMap.toLiteralMap()]);\n // (ngJitMode guard) && setNgModuleScope(...)\n const guardedCall = jitOnlyGuardedExpression(fnCall);\n // function() { (ngJitMode guard) && setNgModuleScope(...); }\n const iife = new FunctionExpr(\n /* params */ [], \n /* statements */ [guardedCall.toStmt()]);\n // (function() { (ngJitMode guard) && setNgModuleScope(...); })()\n const iifeCall = new InvokeFunctionExpr(\n /* fn */ iife, \n /* args */ []);\n return iifeCall.toStmt();\n}\nfunction tupleTypeOf(exp) {\n const types = exp.map(ref => typeofExpr(ref.type));\n return exp.length > 0 ? expressionType(literalArr(types)) : NONE_TYPE;\n}\nfunction tupleOfTypes(types) {\n const typeofTypes = types.map(type => typeofExpr(type));\n return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction compilePipeFromMetadata(metadata) {\n const definitionMapValues = [];\n // e.g. `name: 'myPipe'`\n definitionMapValues.push({ key: 'name', value: literal(metadata.pipeName), quoted: false });\n // e.g. `type: MyPipe`\n definitionMapValues.push({ key: 'type', value: metadata.type.value, quoted: false });\n // e.g. `pure: true`\n definitionMapValues.push({ key: 'pure', value: literal(metadata.pure), quoted: false });\n if (metadata.isStandalone) {\n definitionMapValues.push({ key: 'standalone', value: literal(true), quoted: false });\n }\n const expression = importExpr(Identifiers.definePipe).callFn([literalMap(definitionMapValues)], undefined, true);\n const type = createPipeType(metadata);\n return { expression, type, statements: [] };\n}\nfunction createPipeType(metadata) {\n return new ExpressionType(importExpr(Identifiers.PipeDeclaration, [\n typeWithParameters(metadata.type.type, metadata.typeArgumentCount),\n new ExpressionType(new LiteralExpr(metadata.pipeName)),\n new ExpressionType(new LiteralExpr(metadata.isStandalone)),\n ]));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar R3TemplateDependencyKind;\n(function (R3TemplateDependencyKind) {\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"Directive\"] = 0] = \"Directive\";\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"Pipe\"] = 1] = \"Pipe\";\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"NgModule\"] = 2] = \"NgModule\";\n})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass ParserError {\n constructor(message, input, errLocation, ctxLocation) {\n this.input = input;\n this.errLocation = errLocation;\n this.ctxLocation = ctxLocation;\n this.message = `Parser Error: ${message} ${errLocation} [${input}] in ${ctxLocation}`;\n }\n}\nclass ParseSpan {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n toAbsolute(absoluteOffset) {\n return new AbsoluteSourceSpan(absoluteOffset + this.start, absoluteOffset + this.end);\n }\n}\nclass AST {\n constructor(span, \n /**\n * Absolute location of the expression AST in a source code file.\n */\n sourceSpan) {\n this.span = span;\n this.sourceSpan = sourceSpan;\n }\n toString() {\n return 'AST';\n }\n}\nclass ASTWithName extends AST {\n constructor(span, sourceSpan, nameSpan) {\n super(span, sourceSpan);\n this.nameSpan = nameSpan;\n }\n}\nclass EmptyExpr extends AST {\n visit(visitor, context = null) {\n // do nothing\n }\n}\nclass ImplicitReceiver extends AST {\n visit(visitor, context = null) {\n return visitor.visitImplicitReceiver(this, context);\n }\n}\n/**\n * Receiver when something is accessed through `this` (e.g. `this.foo`). Note that this class\n * inherits from `ImplicitReceiver`, because accessing something through `this` is treated the\n * same as accessing it implicitly inside of an Angular template (e.g. `[attr.title]=\"this.title\"`\n * is the same as `[attr.title]=\"title\"`.). Inheriting allows for the `this` accesses to be treated\n * the same as implicit ones, except for a couple of exceptions like `$event` and `$any`.\n * TODO: we should find a way for this class not to extend from `ImplicitReceiver` in the future.\n */\nclass ThisReceiver extends ImplicitReceiver {\n visit(visitor, context = null) {\n return visitor.visitThisReceiver?.(this, context);\n }\n}\n/**\n * Multiple expressions separated by a semicolon.\n */\nclass Chain extends AST {\n constructor(span, sourceSpan, expressions) {\n super(span, sourceSpan);\n this.expressions = expressions;\n }\n visit(visitor, context = null) {\n return visitor.visitChain(this, context);\n }\n}\nclass Conditional extends AST {\n constructor(span, sourceSpan, condition, trueExp, falseExp) {\n super(span, sourceSpan);\n this.condition = condition;\n this.trueExp = trueExp;\n this.falseExp = falseExp;\n }\n visit(visitor, context = null) {\n return visitor.visitConditional(this, context);\n }\n}\nclass PropertyRead extends ASTWithName {\n constructor(span, sourceSpan, nameSpan, receiver, name) {\n super(span, sourceSpan, nameSpan);\n this.receiver = receiver;\n this.name = name;\n }\n visit(visitor, context = null) {\n return visitor.visitPropertyRead(this, context);\n }\n}\nclass PropertyWrite extends ASTWithName {\n constructor(span, sourceSpan, nameSpan, receiver, name, value) {\n super(span, sourceSpan, nameSpan);\n this.receiver = receiver;\n this.name = name;\n this.value = value;\n }\n visit(visitor, context = null) {\n return visitor.visitPropertyWrite(this, context);\n }\n}\nclass SafePropertyRead extends ASTWithName {\n constructor(span, sourceSpan, nameSpan, receiver, name) {\n super(span, sourceSpan, nameSpan);\n this.receiver = receiver;\n this.name = name;\n }\n visit(visitor, context = null) {\n return visitor.visitSafePropertyRead(this, context);\n }\n}\nclass KeyedRead extends AST {\n constructor(span, sourceSpan, receiver, key) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.key = key;\n }\n visit(visitor, context = null) {\n return visitor.visitKeyedRead(this, context);\n }\n}\nclass SafeKeyedRead extends AST {\n constructor(span, sourceSpan, receiver, key) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.key = key;\n }\n visit(visitor, context = null) {\n return visitor.visitSafeKeyedRead(this, context);\n }\n}\nclass KeyedWrite extends AST {\n constructor(span, sourceSpan, receiver, key, value) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.key = key;\n this.value = value;\n }\n visit(visitor, context = null) {\n return visitor.visitKeyedWrite(this, context);\n }\n}\nclass BindingPipe extends ASTWithName {\n constructor(span, sourceSpan, exp, name, args, nameSpan) {\n super(span, sourceSpan, nameSpan);\n this.exp = exp;\n this.name = name;\n this.args = args;\n }\n visit(visitor, context = null) {\n return visitor.visitPipe(this, context);\n }\n}\nclass LiteralPrimitive extends AST {\n constructor(span, sourceSpan, value) {\n super(span, sourceSpan);\n this.value = value;\n }\n visit(visitor, context = null) {\n return visitor.visitLiteralPrimitive(this, context);\n }\n}\nclass LiteralArray extends AST {\n constructor(span, sourceSpan, expressions) {\n super(span, sourceSpan);\n this.expressions = expressions;\n }\n visit(visitor, context = null) {\n return visitor.visitLiteralArray(this, context);\n }\n}\nclass LiteralMap extends AST {\n constructor(span, sourceSpan, keys, values) {\n super(span, sourceSpan);\n this.keys = keys;\n this.values = values;\n }\n visit(visitor, context = null) {\n return visitor.visitLiteralMap(this, context);\n }\n}\nclass Interpolation extends AST {\n constructor(span, sourceSpan, strings, expressions) {\n super(span, sourceSpan);\n this.strings = strings;\n this.expressions = expressions;\n }\n visit(visitor, context = null) {\n return visitor.visitInterpolation(this, context);\n }\n}\nclass Binary extends AST {\n constructor(span, sourceSpan, operation, left, right) {\n super(span, sourceSpan);\n this.operation = operation;\n this.left = left;\n this.right = right;\n }\n visit(visitor, context = null) {\n return visitor.visitBinary(this, context);\n }\n}\n/**\n * For backwards compatibility reasons, `Unary` inherits from `Binary` and mimics the binary AST\n * node that was originally used. This inheritance relation can be deleted in some future major,\n * after consumers have been given a chance to fully support Unary.\n */\nclass Unary extends Binary {\n /**\n * During the deprecation period this constructor is private, to avoid consumers from creating\n * a `Unary` with the fallback properties for `Binary`.\n */\n constructor(span, sourceSpan, operator, expr, binaryOp, binaryLeft, binaryRight) {\n super(span, sourceSpan, binaryOp, binaryLeft, binaryRight);\n this.operator = operator;\n this.expr = expr;\n // Redeclare the properties that are inherited from `Binary` as `never`, as consumers should not\n // depend on these fields when operating on `Unary`.\n this.left = null;\n this.right = null;\n this.operation = null;\n }\n /**\n * Creates a unary minus expression \"-x\", represented as `Binary` using \"0 - x\".\n */\n static createMinus(span, sourceSpan, expr) {\n return new Unary(span, sourceSpan, '-', expr, '-', new LiteralPrimitive(span, sourceSpan, 0), expr);\n }\n /**\n * Creates a unary plus expression \"+x\", represented as `Binary` using \"x - 0\".\n */\n static createPlus(span, sourceSpan, expr) {\n return new Unary(span, sourceSpan, '+', expr, '-', expr, new LiteralPrimitive(span, sourceSpan, 0));\n }\n visit(visitor, context = null) {\n if (visitor.visitUnary !== undefined) {\n return visitor.visitUnary(this, context);\n }\n return visitor.visitBinary(this, context);\n }\n}\nclass PrefixNot extends AST {\n constructor(span, sourceSpan, expression) {\n super(span, sourceSpan);\n this.expression = expression;\n }\n visit(visitor, context = null) {\n return visitor.visitPrefixNot(this, context);\n }\n}\nclass NonNullAssert extends AST {\n constructor(span, sourceSpan, expression) {\n super(span, sourceSpan);\n this.expression = expression;\n }\n visit(visitor, context = null) {\n return visitor.visitNonNullAssert(this, context);\n }\n}\nclass Call extends AST {\n constructor(span, sourceSpan, receiver, args, argumentSpan) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.args = args;\n this.argumentSpan = argumentSpan;\n }\n visit(visitor, context = null) {\n return visitor.visitCall(this, context);\n }\n}\nclass SafeCall extends AST {\n constructor(span, sourceSpan, receiver, args, argumentSpan) {\n super(span, sourceSpan);\n this.receiver = receiver;\n this.args = args;\n this.argumentSpan = argumentSpan;\n }\n visit(visitor, context = null) {\n return visitor.visitSafeCall(this, context);\n }\n}\n/**\n * Records the absolute position of a text span in a source file, where `start` and `end` are the\n * starting and ending byte offsets, respectively, of the text span in a source file.\n */\nclass AbsoluteSourceSpan {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n}\nclass ASTWithSource extends AST {\n constructor(ast, source, location, absoluteOffset, errors) {\n super(new ParseSpan(0, source === null ? 0 : source.length), new AbsoluteSourceSpan(absoluteOffset, source === null ? absoluteOffset : absoluteOffset + source.length));\n this.ast = ast;\n this.source = source;\n this.location = location;\n this.errors = errors;\n }\n visit(visitor, context = null) {\n if (visitor.visitASTWithSource) {\n return visitor.visitASTWithSource(this, context);\n }\n return this.ast.visit(visitor, context);\n }\n toString() {\n return `${this.source} in ${this.location}`;\n }\n}\nclass VariableBinding {\n /**\n * @param sourceSpan entire span of the binding.\n * @param key name of the LHS along with its span.\n * @param value optional value for the RHS along with its span.\n */\n constructor(sourceSpan, key, value) {\n this.sourceSpan = sourceSpan;\n this.key = key;\n this.value = value;\n }\n}\nclass ExpressionBinding {\n /**\n * @param sourceSpan entire span of the binding.\n * @param key binding name, like ngForOf, ngForTrackBy, ngIf, along with its\n * span. Note that the length of the span may not be the same as\n * `key.source.length`. For example,\n * 1. key.source = ngFor, key.span is for \"ngFor\"\n * 2. key.source = ngForOf, key.span is for \"of\"\n * 3. key.source = ngForTrackBy, key.span is for \"trackBy\"\n * @param value optional expression for the RHS.\n */\n constructor(sourceSpan, key, value) {\n this.sourceSpan = sourceSpan;\n this.key = key;\n this.value = value;\n }\n}\nclass RecursiveAstVisitor {\n visit(ast, context) {\n // The default implementation just visits every node.\n // Classes that extend RecursiveAstVisitor should override this function\n // to selectively visit the specified node.\n ast.visit(this, context);\n }\n visitUnary(ast, context) {\n this.visit(ast.expr, context);\n }\n visitBinary(ast, context) {\n this.visit(ast.left, context);\n this.visit(ast.right, context);\n }\n visitChain(ast, context) {\n this.visitAll(ast.expressions, context);\n }\n visitConditional(ast, context) {\n this.visit(ast.condition, context);\n this.visit(ast.trueExp, context);\n this.visit(ast.falseExp, context);\n }\n visitPipe(ast, context) {\n this.visit(ast.exp, context);\n this.visitAll(ast.args, context);\n }\n visitImplicitReceiver(ast, context) { }\n visitThisReceiver(ast, context) { }\n visitInterpolation(ast, context) {\n this.visitAll(ast.expressions, context);\n }\n visitKeyedRead(ast, context) {\n this.visit(ast.receiver, context);\n this.visit(ast.key, context);\n }\n visitKeyedWrite(ast, context) {\n this.visit(ast.receiver, context);\n this.visit(ast.key, context);\n this.visit(ast.value, context);\n }\n visitLiteralArray(ast, context) {\n this.visitAll(ast.expressions, context);\n }\n visitLiteralMap(ast, context) {\n this.visitAll(ast.values, context);\n }\n visitLiteralPrimitive(ast, context) { }\n visitPrefixNot(ast, context) {\n this.visit(ast.expression, context);\n }\n visitNonNullAssert(ast, context) {\n this.visit(ast.expression, context);\n }\n visitPropertyRead(ast, context) {\n this.visit(ast.receiver, context);\n }\n visitPropertyWrite(ast, context) {\n this.visit(ast.receiver, context);\n this.visit(ast.value, context);\n }\n visitSafePropertyRead(ast, context) {\n this.visit(ast.receiver, context);\n }\n visitSafeKeyedRead(ast, context) {\n this.visit(ast.receiver, context);\n this.visit(ast.key, context);\n }\n visitCall(ast, context) {\n this.visit(ast.receiver, context);\n this.visitAll(ast.args, context);\n }\n visitSafeCall(ast, context) {\n this.visit(ast.receiver, context);\n this.visitAll(ast.args, context);\n }\n // This is not part of the AstVisitor interface, just a helper method\n visitAll(asts, context) {\n for (const ast of asts) {\n this.visit(ast, context);\n }\n }\n}\nclass AstTransformer {\n visitImplicitReceiver(ast, context) {\n return ast;\n }\n visitThisReceiver(ast, context) {\n return ast;\n }\n visitInterpolation(ast, context) {\n return new Interpolation(ast.span, ast.sourceSpan, ast.strings, this.visitAll(ast.expressions));\n }\n visitLiteralPrimitive(ast, context) {\n return new LiteralPrimitive(ast.span, ast.sourceSpan, ast.value);\n }\n visitPropertyRead(ast, context) {\n return new PropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name);\n }\n visitPropertyWrite(ast, context) {\n return new PropertyWrite(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name, ast.value.visit(this));\n }\n visitSafePropertyRead(ast, context) {\n return new SafePropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name);\n }\n visitLiteralArray(ast, context) {\n return new LiteralArray(ast.span, ast.sourceSpan, this.visitAll(ast.expressions));\n }\n visitLiteralMap(ast, context) {\n return new LiteralMap(ast.span, ast.sourceSpan, ast.keys, this.visitAll(ast.values));\n }\n visitUnary(ast, context) {\n switch (ast.operator) {\n case '+':\n return Unary.createPlus(ast.span, ast.sourceSpan, ast.expr.visit(this));\n case '-':\n return Unary.createMinus(ast.span, ast.sourceSpan, ast.expr.visit(this));\n default:\n throw new Error(`Unknown unary operator ${ast.operator}`);\n }\n }\n visitBinary(ast, context) {\n return new Binary(ast.span, ast.sourceSpan, ast.operation, ast.left.visit(this), ast.right.visit(this));\n }\n visitPrefixNot(ast, context) {\n return new PrefixNot(ast.span, ast.sourceSpan, ast.expression.visit(this));\n }\n visitNonNullAssert(ast, context) {\n return new NonNullAssert(ast.span, ast.sourceSpan, ast.expression.visit(this));\n }\n visitConditional(ast, context) {\n return new Conditional(ast.span, ast.sourceSpan, ast.condition.visit(this), ast.trueExp.visit(this), ast.falseExp.visit(this));\n }\n visitPipe(ast, context) {\n return new BindingPipe(ast.span, ast.sourceSpan, ast.exp.visit(this), ast.name, this.visitAll(ast.args), ast.nameSpan);\n }\n visitKeyedRead(ast, context) {\n return new KeyedRead(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this));\n }\n visitKeyedWrite(ast, context) {\n return new KeyedWrite(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this), ast.value.visit(this));\n }\n visitCall(ast, context) {\n return new Call(ast.span, ast.sourceSpan, ast.receiver.visit(this), this.visitAll(ast.args), ast.argumentSpan);\n }\n visitSafeCall(ast, context) {\n return new SafeCall(ast.span, ast.sourceSpan, ast.receiver.visit(this), this.visitAll(ast.args), ast.argumentSpan);\n }\n visitAll(asts) {\n const res = [];\n for (let i = 0; i < asts.length; ++i) {\n res[i] = asts[i].visit(this);\n }\n return res;\n }\n visitChain(ast, context) {\n return new Chain(ast.span, ast.sourceSpan, this.visitAll(ast.expressions));\n }\n visitSafeKeyedRead(ast, context) {\n return new SafeKeyedRead(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this));\n }\n}\n// A transformer that only creates new nodes if the transformer makes a change or\n// a change is made a child node.\nclass AstMemoryEfficientTransformer {\n visitImplicitReceiver(ast, context) {\n return ast;\n }\n visitThisReceiver(ast, context) {\n return ast;\n }\n visitInterpolation(ast, context) {\n const expressions = this.visitAll(ast.expressions);\n if (expressions !== ast.expressions)\n return new Interpolation(ast.span, ast.sourceSpan, ast.strings, expressions);\n return ast;\n }\n visitLiteralPrimitive(ast, context) {\n return ast;\n }\n visitPropertyRead(ast, context) {\n const receiver = ast.receiver.visit(this);\n if (receiver !== ast.receiver) {\n return new PropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name);\n }\n return ast;\n }\n visitPropertyWrite(ast, context) {\n const receiver = ast.receiver.visit(this);\n const value = ast.value.visit(this);\n if (receiver !== ast.receiver || value !== ast.value) {\n return new PropertyWrite(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name, value);\n }\n return ast;\n }\n visitSafePropertyRead(ast, context) {\n const receiver = ast.receiver.visit(this);\n if (receiver !== ast.receiver) {\n return new SafePropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name);\n }\n return ast;\n }\n visitLiteralArray(ast, context) {\n const expressions = this.visitAll(ast.expressions);\n if (expressions !== ast.expressions) {\n return new LiteralArray(ast.span, ast.sourceSpan, expressions);\n }\n return ast;\n }\n visitLiteralMap(ast, context) {\n const values = this.visitAll(ast.values);\n if (values !== ast.values) {\n return new LiteralMap(ast.span, ast.sourceSpan, ast.keys, values);\n }\n return ast;\n }\n visitUnary(ast, context) {\n const expr = ast.expr.visit(this);\n if (expr !== ast.expr) {\n switch (ast.operator) {\n case '+':\n return Unary.createPlus(ast.span, ast.sourceSpan, expr);\n case '-':\n return Unary.createMinus(ast.span, ast.sourceSpan, expr);\n default:\n throw new Error(`Unknown unary operator ${ast.operator}`);\n }\n }\n return ast;\n }\n visitBinary(ast, context) {\n const left = ast.left.visit(this);\n const right = ast.right.visit(this);\n if (left !== ast.left || right !== ast.right) {\n return new Binary(ast.span, ast.sourceSpan, ast.operation, left, right);\n }\n return ast;\n }\n visitPrefixNot(ast, context) {\n const expression = ast.expression.visit(this);\n if (expression !== ast.expression) {\n return new PrefixNot(ast.span, ast.sourceSpan, expression);\n }\n return ast;\n }\n visitNonNullAssert(ast, context) {\n const expression = ast.expression.visit(this);\n if (expression !== ast.expression) {\n return new NonNullAssert(ast.span, ast.sourceSpan, expression);\n }\n return ast;\n }\n visitConditional(ast, context) {\n const condition = ast.condition.visit(this);\n const trueExp = ast.trueExp.visit(this);\n const falseExp = ast.falseExp.visit(this);\n if (condition !== ast.condition || trueExp !== ast.trueExp || falseExp !== ast.falseExp) {\n return new Conditional(ast.span, ast.sourceSpan, condition, trueExp, falseExp);\n }\n return ast;\n }\n visitPipe(ast, context) {\n const exp = ast.exp.visit(this);\n const args = this.visitAll(ast.args);\n if (exp !== ast.exp || args !== ast.args) {\n return new BindingPipe(ast.span, ast.sourceSpan, exp, ast.name, args, ast.nameSpan);\n }\n return ast;\n }\n visitKeyedRead(ast, context) {\n const obj = ast.receiver.visit(this);\n const key = ast.key.visit(this);\n if (obj !== ast.receiver || key !== ast.key) {\n return new KeyedRead(ast.span, ast.sourceSpan, obj, key);\n }\n return ast;\n }\n visitKeyedWrite(ast, context) {\n const obj = ast.receiver.visit(this);\n const key = ast.key.visit(this);\n const value = ast.value.visit(this);\n if (obj !== ast.receiver || key !== ast.key || value !== ast.value) {\n return new KeyedWrite(ast.span, ast.sourceSpan, obj, key, value);\n }\n return ast;\n }\n visitAll(asts) {\n const res = [];\n let modified = false;\n for (let i = 0; i < asts.length; ++i) {\n const original = asts[i];\n const value = original.visit(this);\n res[i] = value;\n modified = modified || value !== original;\n }\n return modified ? res : asts;\n }\n visitChain(ast, context) {\n const expressions = this.visitAll(ast.expressions);\n if (expressions !== ast.expressions) {\n return new Chain(ast.span, ast.sourceSpan, expressions);\n }\n return ast;\n }\n visitCall(ast, context) {\n const receiver = ast.receiver.visit(this);\n const args = this.visitAll(ast.args);\n if (receiver !== ast.receiver || args !== ast.args) {\n return new Call(ast.span, ast.sourceSpan, receiver, args, ast.argumentSpan);\n }\n return ast;\n }\n visitSafeCall(ast, context) {\n const receiver = ast.receiver.visit(this);\n const args = this.visitAll(ast.args);\n if (receiver !== ast.receiver || args !== ast.args) {\n return new SafeCall(ast.span, ast.sourceSpan, receiver, args, ast.argumentSpan);\n }\n return ast;\n }\n visitSafeKeyedRead(ast, context) {\n const obj = ast.receiver.visit(this);\n const key = ast.key.visit(this);\n if (obj !== ast.receiver || key !== ast.key) {\n return new SafeKeyedRead(ast.span, ast.sourceSpan, obj, key);\n }\n return ast;\n }\n}\n// Bindings\nclass ParsedProperty {\n constructor(name, expression, type, sourceSpan, keySpan, valueSpan) {\n this.name = name;\n this.expression = expression;\n this.type = type;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n this.isLiteral = this.type === ParsedPropertyType.LITERAL_ATTR;\n this.isAnimation = this.type === ParsedPropertyType.ANIMATION;\n }\n}\nvar ParsedPropertyType;\n(function (ParsedPropertyType) {\n ParsedPropertyType[ParsedPropertyType[\"DEFAULT\"] = 0] = \"DEFAULT\";\n ParsedPropertyType[ParsedPropertyType[\"LITERAL_ATTR\"] = 1] = \"LITERAL_ATTR\";\n ParsedPropertyType[ParsedPropertyType[\"ANIMATION\"] = 2] = \"ANIMATION\";\n})(ParsedPropertyType || (ParsedPropertyType = {}));\nclass ParsedEvent {\n // Regular events have a target\n // Animation events have a phase\n constructor(name, targetOrPhase, type, handler, sourceSpan, handlerSpan, keySpan) {\n this.name = name;\n this.targetOrPhase = targetOrPhase;\n this.type = type;\n this.handler = handler;\n this.sourceSpan = sourceSpan;\n this.handlerSpan = handlerSpan;\n this.keySpan = keySpan;\n }\n}\n/**\n * ParsedVariable represents a variable declaration in a microsyntax expression.\n */\nclass ParsedVariable {\n constructor(name, value, sourceSpan, keySpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n }\n}\nclass BoundElementProperty {\n constructor(name, type, securityContext, value, unit, sourceSpan, keySpan, valueSpan) {\n this.name = name;\n this.type = type;\n this.securityContext = securityContext;\n this.value = value;\n this.unit = unit;\n this.sourceSpan = sourceSpan;\n this.keySpan = keySpan;\n this.valueSpan = valueSpan;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass EventHandlerVars {\n}\nEventHandlerVars.event = variable('$event');\n/**\n * Converts the given expression AST into an executable output AST, assuming the expression is\n * used in an action binding (e.g. an event handler).\n */\nfunction convertActionBinding(localResolver, implicitReceiver, action, bindingId, baseSourceSpan, implicitReceiverAccesses, globals) {\n if (!localResolver) {\n localResolver = new DefaultLocalResolver(globals);\n }\n const actionWithoutBuiltins = convertPropertyBindingBuiltins({\n createLiteralArrayConverter: (argCount) => {\n // Note: no caching for literal arrays in actions.\n return (args) => literalArr(args);\n },\n createLiteralMapConverter: (keys) => {\n // Note: no caching for literal maps in actions.\n return (values) => {\n const entries = keys.map((k, i) => ({\n key: k.key,\n value: values[i],\n quoted: k.quoted,\n }));\n return literalMap(entries);\n };\n },\n createPipeConverter: (name) => {\n throw new Error(`Illegal State: Actions are not allowed to contain pipes. Pipe: ${name}`);\n }\n }, action);\n const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, /* supportsInterpolation */ false, baseSourceSpan, implicitReceiverAccesses);\n const actionStmts = [];\n flattenStatements(actionWithoutBuiltins.visit(visitor, _Mode.Statement), actionStmts);\n prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);\n if (visitor.usesImplicitReceiver) {\n localResolver.notifyImplicitReceiverUse();\n }\n const lastIndex = actionStmts.length - 1;\n if (lastIndex >= 0) {\n const lastStatement = actionStmts[lastIndex];\n // Ensure that the value of the last expression statement is returned\n if (lastStatement instanceof ExpressionStatement) {\n actionStmts[lastIndex] = new ReturnStatement(lastStatement.expr);\n }\n }\n return actionStmts;\n}\nfunction convertPropertyBindingBuiltins(converterFactory, ast) {\n return convertBuiltins(converterFactory, ast);\n}\nclass ConvertPropertyBindingResult {\n constructor(stmts, currValExpr) {\n this.stmts = stmts;\n this.currValExpr = currValExpr;\n }\n}\n/**\n * Converts the given expression AST into an executable output AST, assuming the expression\n * is used in property binding. The expression has to be preprocessed via\n * `convertPropertyBindingBuiltins`.\n */\nfunction convertPropertyBinding(localResolver, implicitReceiver, expressionWithoutBuiltins, bindingId) {\n if (!localResolver) {\n localResolver = new DefaultLocalResolver();\n }\n const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, /* supportsInterpolation */ false);\n const outputExpr = expressionWithoutBuiltins.visit(visitor, _Mode.Expression);\n const stmts = getStatementsFromVisitor(visitor, bindingId);\n if (visitor.usesImplicitReceiver) {\n localResolver.notifyImplicitReceiverUse();\n }\n return new ConvertPropertyBindingResult(stmts, outputExpr);\n}\n/**\n * Given some expression, such as a binding or interpolation expression, and a context expression to\n * look values up on, visit each facet of the given expression resolving values from the context\n * expression such that a list of arguments can be derived from the found values that can be used as\n * arguments to an external update instruction.\n *\n * @param localResolver The resolver to use to look up expressions by name appropriately\n * @param contextVariableExpression The expression representing the context variable used to create\n * the final argument expressions\n * @param expressionWithArgumentsToExtract The expression to visit to figure out what values need to\n * be resolved and what arguments list to build.\n * @param bindingId A name prefix used to create temporary variable names if they're needed for the\n * arguments generated\n * @returns An array of expressions that can be passed as arguments to instruction expressions like\n * `o.importExpr(R3.propertyInterpolate).callFn(result)`\n */\nfunction convertUpdateArguments(localResolver, contextVariableExpression, expressionWithArgumentsToExtract, bindingId) {\n const visitor = new _AstToIrVisitor(localResolver, contextVariableExpression, bindingId, /* supportsInterpolation */ true);\n const outputExpr = visitor.visitInterpolation(expressionWithArgumentsToExtract, _Mode.Expression);\n if (visitor.usesImplicitReceiver) {\n localResolver.notifyImplicitReceiverUse();\n }\n const stmts = getStatementsFromVisitor(visitor, bindingId);\n const args = outputExpr.args;\n return { stmts, args };\n}\nfunction getStatementsFromVisitor(visitor, bindingId) {\n const stmts = [];\n for (let i = 0; i < visitor.temporaryCount; i++) {\n stmts.push(temporaryDeclaration(bindingId, i));\n }\n return stmts;\n}\nfunction convertBuiltins(converterFactory, ast) {\n const visitor = new _BuiltinAstConverter(converterFactory);\n return ast.visit(visitor);\n}\nfunction temporaryName(bindingId, temporaryNumber) {\n return `tmp_${bindingId}_${temporaryNumber}`;\n}\nfunction temporaryDeclaration(bindingId, temporaryNumber) {\n return new DeclareVarStmt(temporaryName(bindingId, temporaryNumber));\n}\nfunction prependTemporaryDecls(temporaryCount, bindingId, statements) {\n for (let i = temporaryCount - 1; i >= 0; i--) {\n statements.unshift(temporaryDeclaration(bindingId, i));\n }\n}\nvar _Mode;\n(function (_Mode) {\n _Mode[_Mode[\"Statement\"] = 0] = \"Statement\";\n _Mode[_Mode[\"Expression\"] = 1] = \"Expression\";\n})(_Mode || (_Mode = {}));\nfunction ensureStatementMode(mode, ast) {\n if (mode !== _Mode.Statement) {\n throw new Error(`Expected a statement, but saw ${ast}`);\n }\n}\nfunction ensureExpressionMode(mode, ast) {\n if (mode !== _Mode.Expression) {\n throw new Error(`Expected an expression, but saw ${ast}`);\n }\n}\nfunction convertToStatementIfNeeded(mode, expr) {\n if (mode === _Mode.Statement) {\n return expr.toStmt();\n }\n else {\n return expr;\n }\n}\nclass _BuiltinAstConverter extends AstTransformer {\n constructor(_converterFactory) {\n super();\n this._converterFactory = _converterFactory;\n }\n visitPipe(ast, context) {\n const args = [ast.exp, ...ast.args].map(ast => ast.visit(this, context));\n return new BuiltinFunctionCall(ast.span, ast.sourceSpan, args, this._converterFactory.createPipeConverter(ast.name, args.length));\n }\n visitLiteralArray(ast, context) {\n const args = ast.expressions.map(ast => ast.visit(this, context));\n return new BuiltinFunctionCall(ast.span, ast.sourceSpan, args, this._converterFactory.createLiteralArrayConverter(ast.expressions.length));\n }\n visitLiteralMap(ast, context) {\n const args = ast.values.map(ast => ast.visit(this, context));\n return new BuiltinFunctionCall(ast.span, ast.sourceSpan, args, this._converterFactory.createLiteralMapConverter(ast.keys));\n }\n}\nclass _AstToIrVisitor {\n constructor(_localResolver, _implicitReceiver, bindingId, supportsInterpolation, baseSourceSpan, implicitReceiverAccesses) {\n this._localResolver = _localResolver;\n this._implicitReceiver = _implicitReceiver;\n this.bindingId = bindingId;\n this.supportsInterpolation = supportsInterpolation;\n this.baseSourceSpan = baseSourceSpan;\n this.implicitReceiverAccesses = implicitReceiverAccesses;\n this._nodeMap = new Map();\n this._resultMap = new Map();\n this._currentTemporary = 0;\n this.temporaryCount = 0;\n this.usesImplicitReceiver = false;\n }\n visitUnary(ast, mode) {\n let op;\n switch (ast.operator) {\n case '+':\n op = UnaryOperator.Plus;\n break;\n case '-':\n op = UnaryOperator.Minus;\n break;\n default:\n throw new Error(`Unsupported operator ${ast.operator}`);\n }\n return convertToStatementIfNeeded(mode, new UnaryOperatorExpr(op, this._visit(ast.expr, _Mode.Expression), undefined, this.convertSourceSpan(ast.span)));\n }\n visitBinary(ast, mode) {\n let op;\n switch (ast.operation) {\n case '+':\n op = BinaryOperator.Plus;\n break;\n case '-':\n op = BinaryOperator.Minus;\n break;\n case '*':\n op = BinaryOperator.Multiply;\n break;\n case '/':\n op = BinaryOperator.Divide;\n break;\n case '%':\n op = BinaryOperator.Modulo;\n break;\n case '&&':\n op = BinaryOperator.And;\n break;\n case '||':\n op = BinaryOperator.Or;\n break;\n case '==':\n op = BinaryOperator.Equals;\n break;\n case '!=':\n op = BinaryOperator.NotEquals;\n break;\n case '===':\n op = BinaryOperator.Identical;\n break;\n case '!==':\n op = BinaryOperator.NotIdentical;\n break;\n case '<':\n op = BinaryOperator.Lower;\n break;\n case '>':\n op = BinaryOperator.Bigger;\n break;\n case '<=':\n op = BinaryOperator.LowerEquals;\n break;\n case '>=':\n op = BinaryOperator.BiggerEquals;\n break;\n case '??':\n return this.convertNullishCoalesce(ast, mode);\n default:\n throw new Error(`Unsupported operation ${ast.operation}`);\n }\n return convertToStatementIfNeeded(mode, new BinaryOperatorExpr(op, this._visit(ast.left, _Mode.Expression), this._visit(ast.right, _Mode.Expression), undefined, this.convertSourceSpan(ast.span)));\n }\n visitChain(ast, mode) {\n ensureStatementMode(mode, ast);\n return this.visitAll(ast.expressions, mode);\n }\n visitConditional(ast, mode) {\n const value = this._visit(ast.condition, _Mode.Expression);\n return convertToStatementIfNeeded(mode, value.conditional(this._visit(ast.trueExp, _Mode.Expression), this._visit(ast.falseExp, _Mode.Expression), this.convertSourceSpan(ast.span)));\n }\n visitPipe(ast, mode) {\n throw new Error(`Illegal state: Pipes should have been converted into functions. Pipe: ${ast.name}`);\n }\n visitImplicitReceiver(ast, mode) {\n ensureExpressionMode(mode, ast);\n this.usesImplicitReceiver = true;\n return this._implicitReceiver;\n }\n visitThisReceiver(ast, mode) {\n return this.visitImplicitReceiver(ast, mode);\n }\n visitInterpolation(ast, mode) {\n if (!this.supportsInterpolation) {\n throw new Error('Unexpected interpolation');\n }\n ensureExpressionMode(mode, ast);\n let args = [];\n for (let i = 0; i < ast.strings.length - 1; i++) {\n args.push(literal(ast.strings[i]));\n args.push(this._visit(ast.expressions[i], _Mode.Expression));\n }\n args.push(literal(ast.strings[ast.strings.length - 1]));\n // If we're dealing with an interpolation of 1 value with an empty prefix and suffix, reduce the\n // args returned to just the value, because we're going to pass it to a special instruction.\n const strings = ast.strings;\n if (strings.length === 2 && strings[0] === '' && strings[1] === '') {\n // Single argument interpolate instructions.\n args = [args[1]];\n }\n else if (ast.expressions.length >= 9) {\n // 9 or more arguments must be passed to the `interpolateV`-style instructions, which accept\n // an array of arguments\n args = [literalArr(args)];\n }\n return new InterpolationExpression(args);\n }\n visitKeyedRead(ast, mode) {\n const leftMostSafe = this.leftMostSafeNode(ast);\n if (leftMostSafe) {\n return this.convertSafeAccess(ast, leftMostSafe, mode);\n }\n else {\n return convertToStatementIfNeeded(mode, this._visit(ast.receiver, _Mode.Expression).key(this._visit(ast.key, _Mode.Expression)));\n }\n }\n visitKeyedWrite(ast, mode) {\n const obj = this._visit(ast.receiver, _Mode.Expression);\n const key = this._visit(ast.key, _Mode.Expression);\n const value = this._visit(ast.value, _Mode.Expression);\n if (obj === this._implicitReceiver) {\n this._localResolver.maybeRestoreView();\n }\n return convertToStatementIfNeeded(mode, obj.key(key).set(value));\n }\n visitLiteralArray(ast, mode) {\n throw new Error(`Illegal State: literal arrays should have been converted into functions`);\n }\n visitLiteralMap(ast, mode) {\n throw new Error(`Illegal State: literal maps should have been converted into functions`);\n }\n visitLiteralPrimitive(ast, mode) {\n // For literal values of null, undefined, true, or false allow type interference\n // to infer the type.\n const type = ast.value === null || ast.value === undefined || ast.value === true || ast.value === true ?\n INFERRED_TYPE :\n undefined;\n return convertToStatementIfNeeded(mode, literal(ast.value, type, this.convertSourceSpan(ast.span)));\n }\n _getLocal(name, receiver) {\n if (this._localResolver.globals?.has(name) && receiver instanceof ThisReceiver) {\n return null;\n }\n return this._localResolver.getLocal(name);\n }\n visitPrefixNot(ast, mode) {\n return convertToStatementIfNeeded(mode, not(this._visit(ast.expression, _Mode.Expression)));\n }\n visitNonNullAssert(ast, mode) {\n return convertToStatementIfNeeded(mode, this._visit(ast.expression, _Mode.Expression));\n }\n visitPropertyRead(ast, mode) {\n const leftMostSafe = this.leftMostSafeNode(ast);\n if (leftMostSafe) {\n return this.convertSafeAccess(ast, leftMostSafe, mode);\n }\n else {\n let result = null;\n const prevUsesImplicitReceiver = this.usesImplicitReceiver;\n const receiver = this._visit(ast.receiver, _Mode.Expression);\n if (receiver === this._implicitReceiver) {\n result = this._getLocal(ast.name, ast.receiver);\n if (result) {\n // Restore the previous \"usesImplicitReceiver\" state since the implicit\n // receiver has been replaced with a resolved local expression.\n this.usesImplicitReceiver = prevUsesImplicitReceiver;\n this.addImplicitReceiverAccess(ast.name);\n }\n }\n if (result == null) {\n result = receiver.prop(ast.name, this.convertSourceSpan(ast.span));\n }\n return convertToStatementIfNeeded(mode, result);\n }\n }\n visitPropertyWrite(ast, mode) {\n const receiver = this._visit(ast.receiver, _Mode.Expression);\n const prevUsesImplicitReceiver = this.usesImplicitReceiver;\n let varExpr = null;\n if (receiver === this._implicitReceiver) {\n const localExpr = this._getLocal(ast.name, ast.receiver);\n if (localExpr) {\n if (localExpr instanceof ReadPropExpr) {\n // If the local variable is a property read expression, it's a reference\n // to a 'context.property' value and will be used as the target of the\n // write expression.\n varExpr = localExpr;\n // Restore the previous \"usesImplicitReceiver\" state since the implicit\n // receiver has been replaced with a resolved local expression.\n this.usesImplicitReceiver = prevUsesImplicitReceiver;\n this.addImplicitReceiverAccess(ast.name);\n }\n else {\n // Otherwise it's an error.\n const receiver = ast.name;\n const value = (ast.value instanceof PropertyRead) ? ast.value.name : undefined;\n throw new Error(`Cannot assign value \"${value}\" to template variable \"${receiver}\". Template variables are read-only.`);\n }\n }\n }\n // If no local expression could be produced, use the original receiver's\n // property as the target.\n if (varExpr === null) {\n varExpr = receiver.prop(ast.name, this.convertSourceSpan(ast.span));\n }\n return convertToStatementIfNeeded(mode, varExpr.set(this._visit(ast.value, _Mode.Expression)));\n }\n visitSafePropertyRead(ast, mode) {\n return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n }\n visitSafeKeyedRead(ast, mode) {\n return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n }\n visitAll(asts, mode) {\n return asts.map(ast => this._visit(ast, mode));\n }\n visitCall(ast, mode) {\n const leftMostSafe = this.leftMostSafeNode(ast);\n if (leftMostSafe) {\n return this.convertSafeAccess(ast, leftMostSafe, mode);\n }\n const convertedArgs = this.visitAll(ast.args, _Mode.Expression);\n if (ast instanceof BuiltinFunctionCall) {\n return convertToStatementIfNeeded(mode, ast.converter(convertedArgs));\n }\n const receiver = ast.receiver;\n if (receiver instanceof PropertyRead &&\n receiver.receiver instanceof ImplicitReceiver &&\n !(receiver.receiver instanceof ThisReceiver) && receiver.name === '$any') {\n if (convertedArgs.length !== 1) {\n throw new Error(`Invalid call to $any, expected 1 argument but received ${convertedArgs.length || 'none'}`);\n }\n return convertToStatementIfNeeded(mode, convertedArgs[0]);\n }\n const call = this._visit(receiver, _Mode.Expression)\n .callFn(convertedArgs, this.convertSourceSpan(ast.span));\n return convertToStatementIfNeeded(mode, call);\n }\n visitSafeCall(ast, mode) {\n return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n }\n _visit(ast, mode) {\n const result = this._resultMap.get(ast);\n if (result)\n return result;\n return (this._nodeMap.get(ast) || ast).visit(this, mode);\n }\n convertSafeAccess(ast, leftMostSafe, mode) {\n // If the expression contains a safe access node on the left it needs to be converted to\n // an expression that guards the access to the member by checking the receiver for blank. As\n // execution proceeds from left to right, the left most part of the expression must be guarded\n // first but, because member access is left associative, the right side of the expression is at\n // the top of the AST. The desired result requires lifting a copy of the left part of the\n // expression up to test it for blank before generating the unguarded version.\n // Consider, for example the following expression: a?.b.c?.d.e\n // This results in the ast:\n // .\n // / \\\n // ?. e\n // / \\\n // . d\n // / \\\n // ?. c\n // / \\\n // a b\n // The following tree should be generated:\n //\n // /---- ? ----\\\n // / | \\\n // a /--- ? ---\\ null\n // / | \\\n // . . null\n // / \\ / \\\n // . c . e\n // / \\ / \\\n // a b . d\n // / \\\n // . c\n // / \\\n // a b\n //\n // Notice that the first guard condition is the left hand of the left most safe access node\n // which comes in as leftMostSafe to this routine.\n let guardedExpression = this._visit(leftMostSafe.receiver, _Mode.Expression);\n let temporary = undefined;\n if (this.needsTemporaryInSafeAccess(leftMostSafe.receiver)) {\n // If the expression has method calls or pipes then we need to save the result into a\n // temporary variable to avoid calling stateful or impure code more than once.\n temporary = this.allocateTemporary();\n // Preserve the result in the temporary variable\n guardedExpression = temporary.set(guardedExpression);\n // Ensure all further references to the guarded expression refer to the temporary instead.\n this._resultMap.set(leftMostSafe.receiver, temporary);\n }\n const condition = guardedExpression.isBlank();\n // Convert the ast to an unguarded access to the receiver's member. The map will substitute\n // leftMostNode with its unguarded version in the call to `this.visit()`.\n if (leftMostSafe instanceof SafeCall) {\n this._nodeMap.set(leftMostSafe, new Call(leftMostSafe.span, leftMostSafe.sourceSpan, leftMostSafe.receiver, leftMostSafe.args, leftMostSafe.argumentSpan));\n }\n else if (leftMostSafe instanceof SafeKeyedRead) {\n this._nodeMap.set(leftMostSafe, new KeyedRead(leftMostSafe.span, leftMostSafe.sourceSpan, leftMostSafe.receiver, leftMostSafe.key));\n }\n else {\n this._nodeMap.set(leftMostSafe, new PropertyRead(leftMostSafe.span, leftMostSafe.sourceSpan, leftMostSafe.nameSpan, leftMostSafe.receiver, leftMostSafe.name));\n }\n // Recursively convert the node now without the guarded member access.\n const access = this._visit(ast, _Mode.Expression);\n // Remove the mapping. This is not strictly required as the converter only traverses each node\n // once but is safer if the conversion is changed to traverse the nodes more than once.\n this._nodeMap.delete(leftMostSafe);\n // If we allocated a temporary, release it.\n if (temporary) {\n this.releaseTemporary(temporary);\n }\n // Produce the conditional\n return convertToStatementIfNeeded(mode, condition.conditional(NULL_EXPR, access));\n }\n convertNullishCoalesce(ast, mode) {\n const left = this._visit(ast.left, _Mode.Expression);\n const right = this._visit(ast.right, _Mode.Expression);\n const temporary = this.allocateTemporary();\n this.releaseTemporary(temporary);\n // Generate the following expression. It is identical to how TS\n // transpiles binary expressions with a nullish coalescing operator.\n // let temp;\n // (temp = a) !== null && temp !== undefined ? temp : b;\n return convertToStatementIfNeeded(mode, temporary.set(left)\n .notIdentical(NULL_EXPR)\n .and(temporary.notIdentical(literal(undefined)))\n .conditional(temporary, right));\n }\n // Given an expression of the form a?.b.c?.d.e then the left most safe node is\n // the (a?.b). The . and ?. are left associative thus can be rewritten as:\n // ((((a?.c).b).c)?.d).e. This returns the most deeply nested safe read or\n // safe method call as this needs to be transformed initially to:\n // a == null ? null : a.c.b.c?.d.e\n // then to:\n // a == null ? null : a.b.c == null ? null : a.b.c.d.e\n leftMostSafeNode(ast) {\n const visit = (visitor, ast) => {\n return (this._nodeMap.get(ast) || ast).visit(visitor);\n };\n return ast.visit({\n visitUnary(ast) {\n return null;\n },\n visitBinary(ast) {\n return null;\n },\n visitChain(ast) {\n return null;\n },\n visitConditional(ast) {\n return null;\n },\n visitCall(ast) {\n return visit(this, ast.receiver);\n },\n visitSafeCall(ast) {\n return visit(this, ast.receiver) || ast;\n },\n visitImplicitReceiver(ast) {\n return null;\n },\n visitThisReceiver(ast) {\n return null;\n },\n visitInterpolation(ast) {\n return null;\n },\n visitKeyedRead(ast) {\n return visit(this, ast.receiver);\n },\n visitKeyedWrite(ast) {\n return null;\n },\n visitLiteralArray(ast) {\n return null;\n },\n visitLiteralMap(ast) {\n return null;\n },\n visitLiteralPrimitive(ast) {\n return null;\n },\n visitPipe(ast) {\n return null;\n },\n visitPrefixNot(ast) {\n return null;\n },\n visitNonNullAssert(ast) {\n return null;\n },\n visitPropertyRead(ast) {\n return visit(this, ast.receiver);\n },\n visitPropertyWrite(ast) {\n return null;\n },\n visitSafePropertyRead(ast) {\n return visit(this, ast.receiver) || ast;\n },\n visitSafeKeyedRead(ast) {\n return visit(this, ast.receiver) || ast;\n }\n });\n }\n // Returns true of the AST includes a method or a pipe indicating that, if the\n // expression is used as the target of a safe property or method access then\n // the expression should be stored into a temporary variable.\n needsTemporaryInSafeAccess(ast) {\n const visit = (visitor, ast) => {\n return ast && (this._nodeMap.get(ast) || ast).visit(visitor);\n };\n const visitSome = (visitor, ast) => {\n return ast.some(ast => visit(visitor, ast));\n };\n return ast.visit({\n visitUnary(ast) {\n return visit(this, ast.expr);\n },\n visitBinary(ast) {\n return visit(this, ast.left) || visit(this, ast.right);\n },\n visitChain(ast) {\n return false;\n },\n visitConditional(ast) {\n return visit(this, ast.condition) || visit(this, ast.trueExp) || visit(this, ast.falseExp);\n },\n visitCall(ast) {\n return true;\n },\n visitSafeCall(ast) {\n return true;\n },\n visitImplicitReceiver(ast) {\n return false;\n },\n visitThisReceiver(ast) {\n return false;\n },\n visitInterpolation(ast) {\n return visitSome(this, ast.expressions);\n },\n visitKeyedRead(ast) {\n return false;\n },\n visitKeyedWrite(ast) {\n return false;\n },\n visitLiteralArray(ast) {\n return true;\n },\n visitLiteralMap(ast) {\n return true;\n },\n visitLiteralPrimitive(ast) {\n return false;\n },\n visitPipe(ast) {\n return true;\n },\n visitPrefixNot(ast) {\n return visit(this, ast.expression);\n },\n visitNonNullAssert(ast) {\n return visit(this, ast.expression);\n },\n visitPropertyRead(ast) {\n return false;\n },\n visitPropertyWrite(ast) {\n return false;\n },\n visitSafePropertyRead(ast) {\n return false;\n },\n visitSafeKeyedRead(ast) {\n return false;\n }\n });\n }\n allocateTemporary() {\n const tempNumber = this._currentTemporary++;\n this.temporaryCount = Math.max(this._currentTemporary, this.temporaryCount);\n return new ReadVarExpr(temporaryName(this.bindingId, tempNumber));\n }\n releaseTemporary(temporary) {\n this._currentTemporary--;\n if (temporary.name != temporaryName(this.bindingId, this._currentTemporary)) {\n throw new Error(`Temporary ${temporary.name} released out of order`);\n }\n }\n /**\n * Creates an absolute `ParseSourceSpan` from the relative `ParseSpan`.\n *\n * `ParseSpan` objects are relative to the start of the expression.\n * This method converts these to full `ParseSourceSpan` objects that\n * show where the span is within the overall source file.\n *\n * @param span the relative span to convert.\n * @returns a `ParseSourceSpan` for the given span or null if no\n * `baseSourceSpan` was provided to this class.\n */\n convertSourceSpan(span) {\n if (this.baseSourceSpan) {\n const start = this.baseSourceSpan.start.moveBy(span.start);\n const end = this.baseSourceSpan.start.moveBy(span.end);\n const fullStart = this.baseSourceSpan.fullStart.moveBy(span.start);\n return new ParseSourceSpan(start, end, fullStart);\n }\n else {\n return null;\n }\n }\n /** Adds the name of an AST to the list of implicit receiver accesses. */\n addImplicitReceiverAccess(name) {\n if (this.implicitReceiverAccesses) {\n this.implicitReceiverAccesses.add(name);\n }\n }\n}\nfunction flattenStatements(arg, output) {\n if (Array.isArray(arg)) {\n arg.forEach((entry) => flattenStatements(entry, output));\n }\n else {\n output.push(arg);\n }\n}\nfunction unsupported() {\n throw new Error('Unsupported operation');\n}\nclass InterpolationExpression extends Expression {\n constructor(args) {\n super(null, null);\n this.args = args;\n this.isConstant = unsupported;\n this.isEquivalent = unsupported;\n this.visitExpression = unsupported;\n }\n}\nclass DefaultLocalResolver {\n constructor(globals) {\n this.globals = globals;\n }\n notifyImplicitReceiverUse() { }\n maybeRestoreView() { }\n getLocal(name) {\n if (name === EventHandlerVars.event.name) {\n return EventHandlerVars.event;\n }\n return null;\n }\n}\nclass BuiltinFunctionCall extends Call {\n constructor(span, sourceSpan, args, converter) {\n super(span, sourceSpan, new EmptyExpr(span, sourceSpan), args, null);\n this.converter = converter;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// =================================================================================================\n// =================================================================================================\n// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P ===========\n// =================================================================================================\n// =================================================================================================\n//\n// DO NOT EDIT THIS LIST OF SECURITY SENSITIVE PROPERTIES WITHOUT A SECURITY REVIEW!\n// Reach out to mprobst for details.\n//\n// =================================================================================================\n/** Map from tagName|propertyName to SecurityContext. Properties applying to all tags use '*'. */\nlet _SECURITY_SCHEMA;\nfunction SECURITY_SCHEMA() {\n if (!_SECURITY_SCHEMA) {\n _SECURITY_SCHEMA = {};\n // Case is insignificant below, all element and attribute names are lower-cased for lookup.\n registerContext(SecurityContext.HTML, [\n 'iframe|srcdoc',\n '*|innerHTML',\n '*|outerHTML',\n ]);\n registerContext(SecurityContext.STYLE, ['*|style']);\n // NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.\n registerContext(SecurityContext.URL, [\n '*|formAction',\n 'area|href',\n 'area|ping',\n 'audio|src',\n 'a|href',\n 'a|ping',\n 'blockquote|cite',\n 'body|background',\n 'del|cite',\n 'form|action',\n 'img|src',\n 'input|src',\n 'ins|cite',\n 'q|cite',\n 'source|src',\n 'track|src',\n 'video|poster',\n 'video|src',\n ]);\n registerContext(SecurityContext.RESOURCE_URL, [\n 'applet|code',\n 'applet|codebase',\n 'base|href',\n 'embed|src',\n 'frame|src',\n 'head|profile',\n 'html|manifest',\n 'iframe|src',\n 'link|href',\n 'media|src',\n 'object|codebase',\n 'object|data',\n 'script|src',\n ]);\n }\n return _SECURITY_SCHEMA;\n}\nfunction registerContext(ctx, specs) {\n for (const spec of specs)\n _SECURITY_SCHEMA[spec.toLowerCase()] = ctx;\n}\n/**\n * The set of security-sensitive attributes of an `